ProxySQL is a MySQL and PostgreSQL protocol-aware proxy server written in C++11/17. It implements a multi-threaded architecture with connection pooling, query routing, caching, and monitoring capabilities.
ProxySQL is a MySQL and PostgreSQL protocol-aware proxy server written in C++11/17. It implements a multi-threaded architecture with connection pooling, query routing, caching, and monitoring.
## System Architecture
### Core Design Patterns
1. **Multi-Threaded Worker Model**
- MySQL worker threads (`MySQL_Thread`) handling client connections
- MySQL worker threads (`MySQL_Thread`) handle client connections
- PgSQL worker threads (`PgSQL_Thread`) for PostgreSQL support
ProxySQL is a database proxy server written in C++ that provides protocol-aware proxying for MySQL and PostgreSQL databases. The system implements a multi-threaded, event-driven architecture with connection pooling, query routing, and monitoring. Built with C++11/17, it uses a modular design with separation between protocol handlers, session management, and administrative interfaces, backed by an embedded SQLite3 configuration database.
ProxySQL is a database proxy server written in C++ providing protocol-aware proxying for MySQL and PostgreSQL databases. It implements a multi-threaded, event-driven architecture with connection pooling, query routing, and monitoring. Built with C++11/17, it uses modular design separating protocol handlers, session management, and administrative interfaces, backed by embedded SQLite3 configuration.
## Key Components
- **Dual-protocol architecture**: MySQL and PostgreSQL wire protocol implementations
- **Multi-threaded design**: Separate worker threads for connections, admin, monitoring, and clustering