Session persistence between multiple Rails / Unicorn servers with Redis as session_store on AWS

Posted by d_ethier on Server Fault See other posts from Server Fault or by d_ethier
Published on 2012-09-15T13:46:57Z Indexed on 2012/09/15 15:39 UTC
Read the original article Hit count: 226

I've got 2 nginx EC2 instances pointing to 2 Unicorn EC2 instances in a round robin load balanced configuration. The two nginx instances are being the Elastic Load Balancer.

Both Unicorn instances have a Redis session_store configured which is in a master/slave configuration with an Elastic IP attached to the master.

I've tried configuring the session stickiness on the load balancer, but sessions are lost on each page refresh.

I'm using the redis-store gem for the session_store configuration and redis support.

Anyone have any ideas as to why this is not working?

© Server Fault or respective owner

Related posts about nginx

Related posts about amazon-ec2