0

I've tried searching for an answer for this question, but I'm not sure if there is a specific term for it and so far I can't find any information.

If I had a popular app that consumed some web services, I would obviously use a load balancer to distribute the load across my services. In theory the end user is just hitting a hostname and this is resolved to the load balancer which then forwards these requests to a web service instance. If my web services then also made a call to another external/3rd party web service, would this 3rd party see the individual IP from the web server in question?

For example if the 3rd party web service said I had to provide 3 ip addresses and only these 3 could access their services how would this work bearing in mind I could have 6 instances behind my load balancer and any one of these could be required to make the request? As the request is made from an individual web server, I'm guessing it wouldn't 'go out' of the load balancer. Although this is quite a generic question, an example of how this might be set-up on AWS infrastructure would be useful

Thanks

2 Answers 2

0

You could accomplish what you need by putting your app servers in a private subnet in a VPC, which routes 0.0.0.0/0 to a NAT instance in a public subnet. All requests to the 3rd part service would appear from the NAT's external IP (assign an Elastic IP to keep it consistent).

The NAT will be a bottleneck for these requests, so you'll need to make sure it's adequately scaled. If you have 3 IPs you could whitelist, you could put your app servers and NAT devices across 3 AZ's with a separate NAT instance in each AZ.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html

2

The request would typically not go to the 3rd party API via your load balancers.
But it's still possible.

And that is pretty much all that can be answered here, what really happens just depends on how you designed your network.
It's possible that every webserver requests it directly.
It's possible that outgoing requests get NAT'ed and appear all to be coming from one IP.
It's possible that you've setup a proxy and all requests are going over it.
And there are probably more possibilities that I couldn't think of right now...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .