Should we move our session storage from managed database to in-memory store?
#1
I'm trying to decide if we should move our stateful session storage from our managed database service to a dedicated in-memory data store, but I'm worried about adding operational complexity. The performance boost would be great, but I keep wondering if the added moving part is worth it just for handling user session data.
Reply
#2
We moved ours last quarter. Latency in the authenticated path dropped noticeably, and page loads with user data felt snappier. The hitch was keeping the in memory store in sync with the primary; we added a small cache layer and chose a managed cluster so the ops burden wasn't all on us. Persistence and failover tuning mattered a lot.
Reply
#3
We didn't move yet. Our payload for a session is small and mostly read after the login. The extra network hop and another service to back up sounded like more risk than reward, especially since our DB is horizontally scalable and fast enough for our current load.
Reply
#4
From a product angle, performance is nice but it adds another operational boundary. If you can spare SRE time for watching the cluster, it could pay off in peak traffic, but if not, maybe not. We debated keeping sticky sessions instead of a separate store.
Reply
#5
Have you measured whether the bottleneck is the DB path or the network round trips right now?
Reply
#6
We did a two-week pilot with a managed in memory store. We saw about a 40 percent drop in DB load for login-related calls and a boost in perceived latency. Memory footprint rose, and we hit a couple of eviction storms when traffic spiked. It was a rough ride but instructive.
Reply
#7
I had a failure when eviction policy kicked in and a handful of active sessions got evicted mid-user flows. We recovered quickly, but it underscored how critical a sane TTL and a robust fault domain is for this choice.
Reply
#8
Part of me wonders if the real issue isn't where we store state at all but how we credential and refresh. If you can go stateless with tokens, you might sidestep the ops entirely, though you give up ability to revoke tokens easily.
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: