advancedTop 30 Scenario-Based Questions

Design a session management system for a web application handling 100,000 concurrent users.

Redis is the perfect fit: 1) Session data: HSET session:{sessionId} userId 42 role ADMIN lastActivity 1234567890. 2) TTL: EXPIRE session:{sessionId} 1800 (30 min idle timeout). 3) Reset on activity: EXPIRE session:{sessionId} 1800 on every request. 4) Lookup: HGETALL session:{sessionId} on each request. 5) Invalidation on logout: DEL session:{sessionId}. 6) Scale: Redis Cluster with 3 masters (300

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.

Design a session management system for a web application handling 100,000 concurrent users.

Next Step

Continue to Your MongoDB queries are slow on a 100-million document collection. How do you diagnose and fix?← Back to all NoSQL questions