Scaling
Scale Tzylo Auth CE safely for production workloads.
Tzylo Auth CE is designed to be horizontally scalable when deployed with the correct supporting infrastructure.
Stateless design
The Auth CE service itself is stateless.
- No session data is stored in memory
- Multiple instances can run in parallel
- Requests can be routed to any instance
Shared dependencies
All Auth CE instances must share the same backing services:
- A single database (or database cluster)
- A single Redis instance or cluster
Running multiple Auth CE instances without shared Redis can lead to inconsistent token and rate limit behavior.
Load balancing
A load balancer should be placed in front of Auth CE instances.
- Round-robin or least-connections strategies work well
- Sticky sessions are not required
- Health checks should be enabled
Cookie and CORS considerations
When scaling across domains or subdomains:
- Configure
COOKIE_SAME_SITEcorrectly - Use HTTPS in all environments
- Set explicit
CORS_ORIGINvalues
Database scaling
Database performance is critical for authentication systems.
- Use connection pooling
- Monitor slow queries
- Enable read replicas if needed
Redis scaling
Redis is central to scalable Auth CE deployments.
- Use a managed Redis service when possible
- Monitor memory usage
- Configure eviction policies carefully
Failure handling
Plan for partial failures:
- Restart failed instances automatically
- Alert on database or Redis outages
- Gracefully handle rate limit or auth failures
Scaling authentication infrastructure should be done gradually and monitored closely.