In a scenario where an application is hosted by multiple instances in Amazon EC2 (with load balancing), are multiple requests from the same user guaranteed to go to the same instance?
In a scenario where an application is hosted by multiple instances in Amazon EC2 (with load balancing), are multiple requests from the same user guaranteed to go to the same instance?
From the Amazon Elastic Load Balancing summary page:
Elastic Load Balancing supports the ability to stick user sessions to specific EC2 instances.
It depends on your configuration. I don't make use of Amazon's Elastic Load Balancing (ELB) service as it doesn't allow me to log the client IP address as all connections appear to come from the LB equipment when seen by the EC2 instance. Instead I do my own load balancing via DNS and multiple Apache front-end servers that are setup to use sticky sessions from the same originating source address.