I have :
- 3 AWS EKS clusters, each in diff regions (us, eu, and as). Each cluster runs the same application, but with a localized database (nearest to the deployment region).
- Each cluster has a load balancer, to distribute the traffic to multiple ec2 instances.
Now I want to distribute the HTTP traffic based on the region provided in the 'x-user-region' (custom)header.
So if Header x-user-region == 'us' , it should be directed to 'us-loadbalancer', if Header is equal to 'eu', it should be directed to 'eu-loadbalancer', and default will go to the third load balancer.
I tried achieving this by making a new AWS Application Load Balancer, but it only works in a single VPC. I tried AWS Global Accelerator, but sadly it works with ip, and custom routing does not provide any means to put conditions on Headers values.
What could be a possible solution/approach? Any help is highly appreciated.