ApigeeEdge BlueGreen Traffic Route

We are using the below logic to route the traffic on the configured regions, this logic we kept in the common-shared-flow which is used by each proxy to get the region where they need to route the traffic.

It is working as expected with the one proxy. Now my doubt is how it works when we use this same shared flow in multiple proxy to get the region and the KVM is also the same ?

Do we need to create a proxy specific KVM for region selection ?

https://github.com/DinoChiesa/ApigeeEdge-BlueGreen-1

I have attached the proxy code for reference.

0 3 166
3 REPLIES 3

Hi Sartaj,

I think it's up to you, and your requirements. You may want to have a per-proxy selection, or you may want to do it system wide.

You might even want to make it smart so that the logic looks for an entry in the KVM using a key that includes the apiproxy.name as one component, and if it does not find such an entry, it falls back to a general entry that applies system wide.

Hi Dino,

Thanks for an update.

Yes, I am following the same approach where based on the proxy-name, I am picking the proxy specific config and if not present then it fall under default KVM .

Now the challenge is as this algorithm does not maintain any previous value/count specific to the proxy then if my individual proxies kvm all values are same as described below then it will not guarantee to route traffic 90-10 ratio to individual proxy, correct ? (because algorithm just check the total and then decide the weight based on the random function )

proxy-1.london-region = 90
proxy-1.belgium-region = 10


proxy-2.london-region = 90
proxy-2.belgium-region = 10


proxy-3.london-region = 90
proxy-3.belgium-region = 10


proxy-4.london-region = 90
proxy-4.belgium-region = 10
<br>

For the algorithm its always 90-10 which will be applicable to all requests across the envs & not the proxy specific .