Overview
ProxySQL is an open-source, high-performance database proxy specifically designed to manage and optimize traffic to MySQL- and PostgreSQL-compatible databases, including MySQL, AWS RDS for MySQL, AWS RDS Aurora MySQL, MariaDB, Percona Server, PostgreSQL, AWS RDS for PostgreSQL and AWS RDS Aurora PostgreSQL. Positioned as a middleware between applications and databases, ProxySQL intelligently routes queries, handles connection pooling, and supports advanced features such as query caching, read-write splitting or query rewrites. Its dynamic, runtime configuration allows changes to be made on the fly without restarting the proxy itself or interrupting client traffic. A standout feature of ProxySQL is its ability to optimize high-traffic database environments, making it ideal for web-scale applications, cloud-based infrastructures, and hybrid setups. It excels in reducing the load on database servers through connection multiplexing, caching, and query routing while enabling horizontal scalability via read-write splitting across multiple replicas. Furthermore, its support for custom query rules empowers developers and database administrators to tailor query behavior based on application needs, user workloads, or even specific query patterns. With built-in monitoring and statistics, ProxySQL provides deep insights into database traffic and performance metrics, helping optimize configurations and identify bottlenecks. Its lightweight architecture and compatibility with various high availability solutions make it a valuable tool for managing modern, distributed database environments. ProxySQL addresses key challenges such as reducing latency, improving throughput, and minimizing the impact of server failures, ensuring a seamless experience for both users and administrators.
Highlights
- Connection Multiplexing: ProxySQL's connection multiplexing optimises client-server interactions by reusing fewer persistent backend connections for multiple client requests, instead of one-to-one mapping. This reduces the overhead of creating and closing connections, minimising resource use and enhancing performance. It enables databases to efficiently handle high-concurrency, large-scale workloads.
- Query Routing and Query Rewrites Based on Rules: ProxySQL offers advanced query routing and rewriting, allowing administrators to control query processing with custom rules based on patterns, user settings, client IPs, or application behavior. It can route queries to specific servers or replicas and modify SQL queries on the fly for performance optimization or schema adaptation. This enhances scalability and ensures compatibility without altering application code.
- Query Caching and Performance Optimization: ProxySQL's query caching stores results of frequently executed queries, reducing repeated execution on backend servers. Configurable caching rules allow control over which queries are cached and for how long. This lowers latency, decreases server load, and enhances performance in high-throughput systems, improving response times for users.
Details
Features and programs
Financing for AWS Marketplace purchases
Pricing
Instance type | Product cost/hour | EC2 cost/hour | Total/hour |
---|---|---|---|
t3.medium | $0.00 | $0.042 | $0.042 |
t3a.medium | $0.00 | $0.038 | $0.038 |
t3a.large | $0.00 | $0.075 | $0.075 |
c1.medium | $0.00 | $0.13 | $0.13 |
c3.large | $0.00 | $0.105 | $0.105 |
c3.xlarge Recommended | $0.00 | $0.21 | $0.21 |
c3.4xlarge | $0.00 | $0.84 | $0.84 |
c3.8xlarge | $0.00 | $1.68 | $1.68 |
c4.large | $0.00 | $0.10 | $0.10 |
c4.xlarge | $0.00 | $0.199 | $0.199 |
Additional AWS infrastructure costs
Type | Cost |
---|---|
EBS General Purpose SSD (gp3) volumes | $0.08/per GB/month of provisioned storage |
Vendor refund policy
Provided as a free product, as-is, with no refund policy.
How can we make this page better?
Legal
Vendor terms and conditions
Content disclaimer
Delivery details
64-bit (x86) Amazon Machine Image (AMI)
Amazon Machine Image (AMI)
An AMI is a virtual image that provides the information required to launch an instance. Amazon EC2 (Elastic Compute Cloud) instances are virtual servers on which you can run your applications and workloads, offering varying combinations of CPU, memory, storage, and networking resources. You can launch as many instances from as many different AMIs as you need.
Version release notes
Additional details
Usage instructions
Step 1: SSH into Your Instance To begin configuration, connect to your instance using SSH: ssh -i your-key.pem ubuntu@your-instance-ip
Step 2: Install MySQL Client To configure ProxySQL, install the MySQL client if not already installed: sudo apt update && sudo apt install mysql-client -y Step 3: Connect to ProxySQL Admin Interface
mysql -u admin -padmin -h 127.0.0.1 -P6032 --prompt 'ProxySQL Admin> '
Step 4: Add Backend MySQL Servers
ProxySQL Admin> INSERT INTO mysql_servers(hostgroup_id,hostname,port) VALUES (1,'10.0.0.1',3306), (1,'10.0.0.2',3306), (1,'10.0.0.3',3306);
Step 5: Configure Read-Only Settings Ensure read-only is properly set on replicas: mysql> SET GLOBAL read_only = 1;
Step 6: Create Monitoring User in MySQL
mysql> CREATE USER 'monitor'@'%' IDENTIFIED BY 'monitor'; mysql> GRANT USAGE, REPLICATION CLIENT ON . TO 'monitor'@'%';
Step 7: Configure Monitoring Credentials in ProxySQL
ProxySQL Admin> UPDATE global_variables SET variable_value='monitor' WHERE variable_name='mysql-monitor_username'; ProxySQL Admin> UPDATE global_variables SET variable_value='monitor' WHERE variable_name='mysql-monitor_password'; Step 8: Configure Monitoring Intervals
ProxySQL Admin> UPDATE global_variables SET variable_value='2000' WHERE variable_name IN ('mysql-monitor_connect_interval','mysql-monitor_ping_interval','mysql-monitor_read_only_interval');
Step 9: Apply and Save Configuration
ProxySQL Admin> LOAD MYSQL VARIABLES TO RUNTIME; ProxySQL Admin> SAVE MYSQL VARIABLES TO DISK; Step 10: Load MySQL Servers to Runtime
ProxySQL Admin> LOAD MYSQL SERVERS TO RUNTIME; ProxySQL Admin> SAVE MYSQL SERVERS TO DISK;
Step 11: Configure Replication Hostgroups ProxySQL Admin> INSERT INTO mysql_replication_hostgroups (writer_hostgroup,reader_hostgroup,comment) VALUES (1,2,'cluster1'); ProxySQL Admin> LOAD MYSQL SERVERS TO RUNTIME; ProxySQL Admin> SAVE MYSQL SERVERS TO DISK;
Step 12: Create MySQL User for Application mysql> CREATE USER 'stnduser'@'%' IDENTIFIED BY 'stnduser'; mysql> GRANT ALL PRIVILEGES ON . TO 'stnduser'@'%'; Step 13: Add User to ProxySQL
ProxySQL Admin> INSERT INTO mysql_users(username,password,default_hostgroup) VALUES ('stnduser','stnduser',1); ProxySQL Admin> LOAD MYSQL USERS TO RUNTIME; ProxySQL Admin> SAVE MYSQL USERS TO DISK;
Step 14: ProxySQL Ready to Serve Traffic ProxySQL is now configured and ready to serve traffic on port 6033.
For more details, refer to: ProxySQL Documentation https://proxysql.com/documentation/proxysql-configuration/
Support
Vendor support
Email: sales@proxysql.com URL:
AWS infrastructure support
AWS Support is a one-on-one, fast-response support channel that is staffed 24x7x365 with experienced and technical support engineers. The service helps customers of all sizes and technical abilities to successfully utilize the products and features provided by Amazon Web Services.