Reputation: 41
I am trying to add a new cluster in my vpc by using terraform , this cluster will handle heavy calculation and un other activites. But i have no idea how to configure redirection for request from internet Cluster1 must be sensitive to a cluser1.mydomain.com and cluster to cluster2.mydomain.com
Upvotes: 1
Views: 477
Reputation: 238189
General steps are following:
Register mydomain.com
in Route53 (R53) for example.
Create two A alias records (cluser1.mydomain.com
and cluser2.mydomain.com
) in R53 pointing to ALB DNS.
Setup two target groups (TGs) for the ALB. First TG (TG1) for ECS service one, while the TG2 for service two.
On the ALB setup single listener (e.g. HTTP 80), with two different rules. For example:
Host header
equal to cluser1.mydomain.com
which forwards to TG1.Host header
equal to cluser2.mydomain.com
which forwards to TG2.Upvotes: 2