1.6.1 Session management in Load Balancing Flashcards
What is an HTTP session?
A continuous sequence of interactions between a user and a web application that maintains state
A session spans multiple user interactions, maintaining user-specific information for a defined period.
What are the components of an HTTP session?
- Session State
- Session Attributes
- Timespan
- Scope
- Storage
What is the timespan of an HTTP session?
Begins with the first interaction and typically ends after inactivity (often 30 minutes)
The scope encompasses all interactions between a single user and the application.
What is the role of a Unique Session ID in HTTP sessions?
Assigned to each user to maintain a mapping between Session ID and user data
Client sends Session ID with each request, usually via cookie.
What does serialization in session management refer to?
The process of converting session objects into a format that can be stored or transmitted
It enables session data to be stored persistently and transmitted between servers.
What are the technical requirements for serialization in session management?
- All session attributes must implement Serializable interface
- Complex objects must have all components serializable
- Transient fields excluded from serialization
- Version IDs should be managed for class changes
What is sticky session load balancing?
Ensures user requests consistently route to the same server
It creates affinity between user and server to maintain session continuity.
What are the implementation methods for sticky sessions?
- Cookie-Based
- IP-Based
- Server-Side
What are the advantages of sticky session load balancing?
- Consistent session access
- Reduced session replication
- Better cache utilization
- Improved performance
- Simplified session management
What are the disadvantages of sticky session load balancing?
- Server failure impacts users
- Uneven load distribution possible
- More complex configuration
- Potential scalability limitations
- Additional memory usage
What are the different session storage architectures in distributed systems?
- Centralized Session Store
- Distributed Cache
- Database Storage
How does session replication work in clustered environments?
Sessions are copied between servers with primary and backup copies maintained
It includes automatic synchronization between nodes and failover capability.
What are the challenges of session replication?
- Network bandwidth consumption
- Increased memory usage
- Serialization overhead
- Consistency management
- Failover complexity
- Performance impact
- Resource synchronization
What are the performance considerations for session management?
- Session Size Management
- Data Storage Optimization
- Serialization Optimization
- Network Considerations
What strategies can be used for optimizing session size?
- Keep sessions small (<1KB ideal)
- Only store essential data
- Use lazy loading when possible
- Clean up unused attributes
- Monitor session growth
- Implement size limits
- Regular session cleanup
What is the primary-backup model in high availability for session management?
An architecture with an active primary server and hot standby backup
It includes automatic failover and data synchronization.
What are the security considerations for session management?
- Secure session creation
- Strong session IDs
- Session timeout policies
- Re-authentication for sensitive actions
- Role-based access control
- Session fixation prevention
- Cross-site scripting protection
What are the backup strategies for disaster recovery in session management?
- Regular session backups
- Incremental backups
- Point-in-time recovery
- Geographic redundancy
- Backup verification
- Recovery testing
- Automated backup procedures
What monitoring areas are essential for session management?
- Performance Metrics
- Health Checks
What are the tasks involved in monitoring session management?
- Regular cleanup of expired sessions
- Performance optimization
- Security updates
- Configuration reviews
- Capacity planning
- Backup verification
- System updates
What are the migration strategies for session migration?
- Live Migration
- Scheduled Migration
Fill in the blank: The process of _______ allows session data to be transmitted between servers.
[serialization]