My company has a customer-facing web application distributed across several servers for the purpose of load balancing and fault tolerance. The application is written in Ruby (Rack, running under Passenger), and authentication to the application is handled via HTTP session cookies.
We currently use a SQL database to store the session data (replicating it as part of our standard database replication), however this solution is not ideal as our SQL database is Postgres, and does not support multi-master operations (during a maintenance outage on the master database logged-in users can check their sessions against a slave, but new users cannot log in). The overhead of SQL queries for every page hit is also not optimal.
I would like to know what practical solutions folks are currently using in production.
Ideally we're looking for:
A shared session store
Users logged in toServer A
should be able to transparently move toServer B
without having to log back in.Good redundancy
Losing a single server shouldn't lose any session state.Low overhead
At a minimum "less intensive than a SQL query for each page hit".