In Membrane, you can direct incoming requests to your API using the expression test property. Using the weight
function, we can offload a percentage of traffic to another endpoint. This can be used to slowly roll out a new API as a canary release. In this instance we set the weight to 55%.
<api port="2000" test="weight(55)">
<template>
New API
</template>
<return />
</api>
<api port="2000">
<template>
Old API
</template>
<return />
</api>