ProxySQL Design Goals
Maximum Uptime
ProxySQL prioritizes continuous availability through several mechanisms.
Configuration Management
The user is able to modify most configuration variables through the admin interface, without having to restart the server. This includes runtime modifications to listening interfaces, backend servers, and operational timeouts.
Crash Prevention
The system employs:
- Integration tests via Docker
- Performance testing with sysbench
- Memory leak detection using valgrind
- An "angel process" that monitors and automatically restarts ProxySQL when needed
Maximum Scalability
Three key optimization areas:
New Connection Speed
ProxySQL maintains a thread pool using the accept() system call to receive incoming connections
rapidly.
Backend Connection Pooling
Idle connections to backend servers are maintained to reduce connection establishment overhead.
Multi-Core Performance
Multi-threaded architecture where threads handle bidirectional message routing between clients and backends, demonstrating strong scaling efficiency.
Cascade Possibilities
ProxySQL supports multi-layer deployments:
A -> P1 -----> {P2, P3, P4 ..} ------> {B1, B2, B3, ..}
This architecture provides fault tolerance where failures in middle-layer proxies or backends are transparently handled without requiring application-level modifications.