
MySQL Ecosystem Proxy
Expert ProxySQL Load Balancer Services
Professional ProxySQL Implementation for MySQL Ecosystem
Partner with certified ProxySQL experts to optimize MySQL, Percona, MariaDB, and StarRocks performance with advanced connection multiplexing, intelligent query caching, and seamless failover management. Our ProxySQL consultants deliver enterprise-grade database proxy solutions.
- ProxySQL Setup & Configuration
- Professional installation and configuration of ProxySQL with custom routing rules and connection pooling.
- Connection Multiplexing
- Optimize database connections with intelligent multiplexing and connection reuse strategies.
- Query Caching & Optimization
- Implement advanced query caching and routing rules for improved application performance.

Database Ecosystem
Comprehensive Database Support
ProxySQL provides seamless integration and optimization across the entire MySQL ecosystem.

MySQL
Native support for all MySQL versions with advanced query routing and connection pooling.
Percona MySQL
Optimized integration with Percona MySQL Server and Percona XtraDB Cluster.

MariaDB
Full compatibility with MariaDB Server and Galera Cluster configurations.

StarRocks
Advanced analytics workload management and query optimization for StarRocks.
Complete ProxySQL Suite
ProxySQL Load Balancer Services We Provide
From initial setup to advanced optimization, we provide comprehensive ProxySQL services to maximize your database infrastructure performance.
ProxySQL Capabilities
What's Included in Our ProxySQL Services
ProxySQL at Enterprise Scale
Our ProxySQL implementations deliver consistent, reliable performance across all MySQL ecosystem databases.
- Connection Overhead
- -60%
- Query Performance
- +35%
- System Uptime
- 99.95%
- Response Time
- <24h
Architecture
How ProxySQL Works: Internal Architecture
Understanding ProxySQL's multi-threaded architecture and runtime configuration system helps you maximize performance and flexibility.
Core Components
Connection Layer
Handles client connections using a multi-threaded architecture. Each thread manages multiple connections using epoll/kqueue for high-concurrency performance. Supports TLS termination and multiple authentication backends.
Query Processor
Parses and analyzes every query to apply routing rules, rewriting logic, and caching decisions. The query digest system fingerprints queries for statistics and rule matching without parsing overhead.
Backend Manager
Maintains connection pools to backend servers, tracks health status, and manages hostgroup routing. Automatically handles connection multiplexing and session state.
Runtime Configuration System
ProxySQL uses a unique three-layer configuration system that allows live changes without restarts:
RUNTIME
Active configuration in memory that ProxySQL currently uses. Changes here take effect immediately.
MEMORY
In-memory SQLite database where you make configuration changes via SQL commands. Changes don't take effect until loaded to RUNTIME.
DISK
Persistent SQLite database file. Save configuration here to survive restarts. Load from disk to restore previous configurations.
Hostgroup-Based Routing
ProxySQL organizes backend servers into hostgroups, enabling powerful traffic routing strategies:
Primary Writers
All INSERT, UPDATE, DELETE queries routed here
Read Replicas
SELECT queries distributed across replicas
Analytics
Heavy reporting queries isolated here
Offline/Backup
Standby servers for failover
Configuration
ProxySQL Query Rules & Configuration
Real-world configuration examples for read/write splitting, query caching, and traffic management.
Read/Write Splitting Rules
Route reads to replicas, writes to primary
-- Configure backend servers in hostgroups
INSERT INTO mysql_servers (hostgroup_id, hostname, port, weight) VALUES
(0, 'primary.db.internal', 3306, 1000), -- Writer hostgroup
(1, 'replica1.db.internal', 3306, 500), -- Reader hostgroup
(1, 'replica2.db.internal', 3306, 500); -- Reader hostgroup
-- Read/Write splitting query rules
INSERT INTO mysql_query_rules (rule_id, active, match_digest, destination_hostgroup, apply) VALUES
(100, 1, '^SELECT .* FOR UPDATE', 0, 1), -- FOR UPDATE goes to writer
(200, 1, '^SELECT', 1, 1), -- All other SELECTs to readers
(300, 1, '.*', 0, 1); -- Everything else to writer
-- Load configuration to runtime
LOAD MYSQL SERVERS TO RUNTIME;
LOAD MYSQL QUERY RULES TO RUNTIME;
SAVE MYSQL SERVERS TO DISK;
SAVE MYSQL QUERY RULES TO DISK;Query Caching Configuration
Cache frequently executed queries to reduce backend load
-- Enable query cache globally
UPDATE global_variables SET variable_value='true'
WHERE variable_name='mysql-query_cache_enabled';
UPDATE global_variables SET variable_value='268435456'
WHERE variable_name='mysql-query_cache_size_MB';
-- Cache specific query patterns
INSERT INTO mysql_query_rules
(rule_id, active, match_pattern, cache_ttl, apply) VALUES
(500, 1, '^SELECT .* FROM products WHERE category_id', 60000, 1),
(501, 1, '^SELECT .* FROM users WHERE id = \?', 30000, 1),
(502, 1, '^SELECT COUNT\(\*\) FROM', 120000, 1);
-- Apply changes
LOAD MYSQL QUERY RULES TO RUNTIME;
LOAD MYSQL VARIABLES TO RUNTIME;Connection Limits & Query Throttling
Protect backends from connection storms and runaway queries
-- Set per-user connection limits
INSERT INTO mysql_users (username, password, default_hostgroup, max_connections) VALUES
('app_user', 'hashed_password', 0, 100),
('reporting', 'hashed_password', 2, 20),
('admin', 'hashed_password', 0, 5);
-- Set per-server connection limits
UPDATE mysql_servers SET max_connections=50 WHERE hostgroup_id=0;
UPDATE mysql_servers SET max_connections=100 WHERE hostgroup_id=1;
-- Throttle expensive queries
INSERT INTO mysql_query_rules
(rule_id, active, match_pattern, max_lag_ms, delay, apply) VALUES
(600, 1, 'SELECT .* JOIN .* JOIN .* JOIN', 100, 1000, 1),
(601, 1, 'SELECT .* ORDER BY .* LIMIT [0-9]{5,}', 50, 2000, 1);
LOAD MYSQL USERS TO RUNTIME;
LOAD MYSQL SERVERS TO RUNTIME;
LOAD MYSQL QUERY RULES TO RUNTIME;ProxySQL Configuration Best Practices
Performance Tuning
- • Set mysql-max_connections slightly lower than backend max_connections
- • Use connection multiplexing for high-concurrency applications
- • Monitor query digests to identify slow query patterns
High Availability
- • Deploy ProxySQL in a cluster with shared configuration
- • Use Galera support for automatic topology detection
- • Configure reader_hostgroup and writer_hostgroup for replication groups
Security
- • Always use TLS for client and backend connections
- • Hash passwords with mysql_native_password or caching_sha2
- • Restrict admin interface to localhost or VPN
Monitoring
- • Export stats_mysql_* tables to Prometheus
- • Alert on connection pool exhaustion
- • Track query cache hit rates for optimization
FAQ
Frequently Asked Questions
Common questions about our ProxySQL load balancer services and MySQL ecosystem optimization.
Ready to Optimize Your Database with ProxySQL?
Get expert ProxySQL implementation from certified database professionals. We'll analyze your current MySQL ecosystem setup and provide a detailed optimization plan with measurable performance improvements.
Join hundreds of companies that trust JusDB for their ProxySQL and MySQL ecosystem consulting needs.