Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Apologies if this has been answered before; my google skills failed me.

Even larger apologies if this is a n00b's question.

We are planning on using AWS cloud formations to drive some load testing through our public apis.

Our apis sit behind load balancers which base their decisions on among other things; the source ip of the requestor.

Let's say we have a cloud formation of a thousand EC2 VMs; each making requests to our public apis; do these requestors appear as if coming from the one location or will they all have different source ip addresses? We are concerned that our load balancers may not behave in a real world manner.

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

Requests from the instances will show up with that particular instance's public IP.

The one exception is for instances in a private VPC subnet, which will show up with the IP of their NAT instance, as private VPC instances have no external facing IP.

share|improve this answer
    
So in effect; each instance will present to our load balancer with a different ip address? –  daveL Jun 14 '13 at 8:10
    
Yes, that's correct. –  ceejayoz Jun 14 '13 at 11:42
    
Lovely jubbly. Thanks. –  daveL Jun 14 '13 at 14:21
add comment

AWS EC2 instances are assigned a static IP address at boot. This address will change each time you reboot the instance.

If you want a persistent IP address for a specific instance, you then need to get a Elastic IP address. This can be mapped to a specific instance. These IPs are 1:1 NAT on the public side. You assign the IP to the instance in the AWS console.

See:

http://aws.amazon.com/articles/1145?_encoding=UTF8&jiveRedirect=1#10

http://aws.amazon.com/articles/1346

share|improve this answer
add comment

I think ceejayoz nailed the answer, however I just want to clarify that the fact that your API servers are behind a load balancer is irrelevant. The API servers see the client's IP regardless of the existence of the load balancers. All the load balancers do is provide a single entry point for the API to the clients, and of course balance the requests across the multiple API servers.

If the clients are on a private network behind a shared public IP (like ceejayoz's example with the VPC), then the API servers will only be able to see the shared public IP, unless the API Load Balancer is also on that same private network, which is highly unlikely unless you own the clients too.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.