InMemorySessionStore stores session metadata in the server’s memory. This is the default storage provider when no custom sessionStore is provided.
Usage
Characteristics
Advantages
- ✅ Fast - No I/O overhead, all operations are in-memory
- ✅ No dependencies - Works out of the box, no Redis or database needed
- ✅ Simple - Zero configuration required
- ✅ All features work - Notifications, sampling, subscriptions all work on a single server
Limitations
- ❌ Sessions lost on restart - All session data is cleared when the server restarts
- ❌ Not distributed - Cannot share sessions across multiple server instances
- ❌ Memory bound - All sessions must fit in server memory
When to Upgrade
Upgrade to Redis Storage when you need:- Sessions to persist across server restarts
- Multiple server instances behind a load balancer
- Distributed notifications/sampling across servers