-1

I have 2 VPCs in cloud. One is running as regular live business website. Second one is my new VPC which is shared. Now I want to test new VPC with 10% of live traffic but old VPC will run with 90% traffic. My back end systems are API calls. How to solve this scenario?

Both VPCs are of same replicated instances such as main e-commnerce app and and databses, caching etc.

I have tried database sync but a lag is expected between VPCs, which will cause issue. (VPC peering)

I have firewall enabled and traffic diversion is possible at DNS level. But applications in VPCs may conflict in live.

  • If these are live business systems and you're not sure how to do this, you probably want to contact Google Cloud Support to help with this and make sure everything is designed well. This is a complex architecture that will be difficult to answer on Stackoverflow. – Travis Webb Oct 03 '19 at 20:19

1 Answers1

0

I understand that you have 2 VPCs in cloud and want to direct 10% of live traffic to one of that VPC and 90% to the other. I will do my best to advise you on this.

You can use a Traffic Director to serve your purpose. Here is a general overview of Traffic Director:[1]. Traffic Director allows you to easily deploy global load balancing across clusters and VM instances in multiple regions and offload health checking from the sidecar proxies. Here is more information about traffic management with Traffic Director:[2].

For your better understanding, here is a use case of it:[3]. Please note that, as shown in this example, Traffic splitting is typically used for deploying new versions, A/B testing, service migration, and similar processes. Also, please take into consideration that you would need to use sidecar proxy with it such as envoy. Here is a link for your reference, which gives you more information regarding envoy:[4]

Alternatively, you can use Google Cloud Load Balancers to distribute load-balanced compute resources in single or multiple regions, to meet your high availability requirements, to put your resources behind a single anycast IP and to scale your resources up or down with intelligent Autoscaling. However, load balancer distributes the traffic in a round robin process instead of the percentage base. Here is an overview of Load Balancing:[5]

[1] https://cloud.google.com/traffic-director/

[2] https://cloud.google.com/traffic-director/docs/traffic-control

[3] https://cloud.google.com/traffic-director/docs/traffic-control#use_case_examples

[4] https://www.envoyproxy.io/docs/envoy/latest/intro/what_is_envoy#

[5] https://cloud.google.com/load-balancing/docs/load-balancing-overview