Reputation: 4830
Bit of an odd question about AWS + ELBs.
We have a VPC that contains public and private subnets. Within the private subnets, we have 2 applications (application 1 and application 2) deployed using ASGs, and each is reachable by it's own public ELB.
Application 1 also needs to talk to application 2, one is a website and the other is an API service. I was just wondering if I needed to setup an internal ELB for application 2 given that I already have a public ELB for it?
If it makes a difference, all the instances communicate with the outside world using a NAT. Is AWS clever enough to route the traffic internally, or will it go out and back in? If the latter, it definitely feels like I should add an internal ELB.
Cheers
Upvotes: 2
Views: 455
Reputation: 179462
AWS will not do anything in this case to optimize the routing. To do so would require either manipulating the DNS responses into private addresses or defeating/bypassing your routing table configuration, neither of which would probably be desirable in many cases. It would also have implications for security groups.
Using an external ELB from inside, the traffic will go out the NAT instance and hit a public IP of the external load balancer. Additionally, you'll pay for that traffic to leave the network and come back, at $0.01 per gigabyte transferred, billed against each side of the connection (that is, the NAT instance and the ELB would both be billed $0.01 for the same gigabyte of data transferred between them = $0.02/GB) in most configurations.
http://aws.amazon.com/ec2/pricing/
Upvotes: 2