I am designing a scalable micro-service architecture using Kubernetes. The current setup looks like this:
Client --> Route53 --> ALB(Ingress) --> Application (Running inside EKS cluster)
This works fairly well with one Application Load Balancer(ALB). Now I want to scale this architecture by creating multiple EKS clusters in the same/different regions. The architecture diagram I am trying to achieve looks like this:
________ ALB 1(Ingress) --> Application (Running inside EKS cluster 1)
|
Client --> Route53 ----|
|________ ALB 2(Ingress) --> Application (Running inside EKS cluster 1)
There can be n
number of such ALBs available. I want to redirect the request from Route53 --> ALB depending on a particular header value. How can I add custom logic to determine the appropriate ALB?
I am free to use some other service instead of Route53 if required.
2 approaches come to mind-
Any Domain --> ALB --> Nginx (Clustered/Active-Passive) --> Application 1 or Application 2
Domain 1 --> ALB 1 --> Application 1
Domain 2 --> ALB 2 --> Application 2