Tryiing to get authoritative information about pros and cons of different ways to store sessions on the server. Does ActiveRecord session storage have issues with concurrency? What is the most common ways to store sessions for active Rails websites? Thanks!
On dev, I use :memory_store. In deployed envs, :mem_cache_store. Done it for years and no problems to report.
1 Like
Context: 3,000 requests/min. ecommerce app – I have had DB-based sessions for a handful of years now and no concurrency issues with them. But, what will be an issue is session invalidation timing and data cleaning.
E.g., if you have sessions valid for two weeks, after two weeks, you want that session data to go away. The ActiveRecord::SessionStore gem has an example data cleaning process. You will want that or something that acts in a similar manner for your specific circumstances.
1 Like