Mafiree logo
  • About
  • Services
  • Blogs
  • Careers
  • Products
    • orbit logo Orbit
    • streamer logo Xstreami
  • Contact
Schedule a Call
Menu
  • About
  • Services
  • Blogs
  • Careers
  • Products
    • orbit logo Orbit
    • streamer logo Xstreami
  • Contact
  • Schedule a Call
Database
Database Database Managed Services
MySQL MySQL
MySQL Consulting Services
MySQL Migration Services
MySQL Optimization & Query Tuning
MySQL Database Administration
MySQL Backup & Recovery
MySQL Security & Maintenance
MySQL Cloud Services (AWS RDS, Aurora, Google Cloud SQL, Azure)
MySQL for Ecommerce
MySQL High Availability & Replication
MongoDB MongoDB
MongoDB Consulting Services
MongoDB Migration Services
MongoDB Optimization & Query Tuning
MongoDB Database Administration
MongoDB Backup & Recovery
MongoDB Security & Maintenance
MongoDB Cloud (Atlas)
MongoDB Solutions by Industry
MongoDB High Availability & Replication
PostgreSQL PostgreSQL
PostgreSQL Consulting
PostgreSQL Migration & Upgrades
Performance Tuning & Query Optimization
PostgreSQL Administration & Managed Services
High Availability, Clustering & Replication
PostgreSQL Backup, Recovery & Disaster Planning
PostgreSQL Security, Compliance & Auditing
PostgreSQL for Analytics & Data Warehousing
PostgreSQL on Cloud & Containers
PostgreSQL Extensions & Open-Source Integrations
PostgreSQL for Every Industry
SQL Server MSSQL
MSSQL Consulting Services
MSSQL Migration Services
MSSQL Optimization & Query Tuning Services
MSSQL Database Administration Services
MSSQL Backup & Recovery Services
MSSQL High Availability & Replication Services
MSSQL Security & Compliance Services
MSSQL Performance Monitoring & Health Checks
MSSQL Solutions by Industry
Aerospike Aerospike
Aerospike Consulting Services
Aerospike Migration Services
Aerospike Performance Optimization & Tuning
Aerospike Database Administration
Aerospike Backup & Recovery
Aerospike High Availability
Aerospike Cloud & Hybrid Deployments
Aerospike for Real-Time Applications (AdTech, FinTech, Retail, IoT)
Analytics DB
Analytics DB Analytics DB Services
Clickhouse Clickhouse
ClickHouse Consulting Services
ClickHouse Migration Services
ClickHouse Optimization & Query Tuning
ClickHouse Database Administration
ClickHouse Backup & Recovery
ClickHouse Security & Maintenance
ClickHouse Cloud Services (ClickHouse Cloud, AWS, GCP, Azure)
ClickHouse Solutions by Industry
ClickHouse High Availability & Replication
TiDB TiDB
TiDB Consulting & Architecture Planning
TiDB Administration & Maintenance
TiDB Security and Privacy Maintenance
TiDB Performance & Query Optimization
TiDB Migration Services
TiDB Backup & Disaster Recovery
TiDB High Availability Solutions
TiDB Solutions by Industry
TiDB Cloud Services
ScyllaDB ScyllaDB
ScyllaDB Consulting & Architecture Planning
ScyllaDB Administration & Maintenance
ScyllaDB Security and Privacy Maintenance
ScyllaDB Performance & Query Optimization
ScyllaDB Migration Services
ScyllaDB Backup & Disaster Recovery
ScyllaDB High Availability Solutions
ScyllaDB Solutions by Industry
ScyllaDB Cloud Services
DevOps
DevOps DevOps Services
Version Control Version Control
Kubernetes Kubernetes
Infrastructure Infrastructure Management
Web Servers Web Servers
Networking
Networking Networking Services
Basic Basic
Advanced Advanced
MySQL MySQL
MongoDB MongoDB
PostgreSQL PostgreSQL
MSSQL MSSQL
Aerospike Aerospike
Clickhouse Clickhouse
TiDB TiDB
ScyllaDB ScyllaDB
Version Control Version Control
Kubernetes Kubernetes
Infrastructure Infrastructure Management
Web Servers Web Servers
Basic Basic
Advanced Advanced
MySQL Consulting Services
MySQL Migration Services
MySQL Optimization & Query Tuning
MySQL Database Administration
MySQL Backup & Recovery
MySQL Security & Maintenance
MySQL Cloud Services (AWS RDS, Aurora, Google Cloud SQL, Azure)
MySQL for Ecommerce
MySQL High Availability & Replication
MongoDB Consulting Services
MongoDB Migration Services
MongoDB Optimization & Query Tuning
MongoDB Database Administration
MongoDB Backup & Recovery
MongoDB Security & Maintenance
MongoDB Cloud (Atlas)
MongoDB Solutions by Industry
MongoDB High Availability & Replication
PostgreSQL Consulting
PostgreSQL Migration & Upgrades
Performance Tuning & Query Optimization
PostgreSQL Administration & Managed Services
High Availability, Clustering & Replication
PostgreSQL Backup, Recovery & Disaster Planning
PostgreSQL Security, Compliance & Auditing
PostgreSQL for Analytics & Data Warehousing
PostgreSQL on Cloud & Containers
PostgreSQL Extensions & Open-Source Integrations
PostgreSQL for Every Industry
MSSQL Consulting Services
MSSQL Migration Services
MSSQL Optimization & Query Tuning Services
MSSQL Database Administration Services
MSSQL Backup & Recovery Services
MSSQL High Availability & Replication Services
MSSQL Security & Compliance Services
MSSQL Performance Monitoring & Health Checks
MSSQL Solutions by Industry
Aerospike Consulting Services
Aerospike Migration Services
Aerospike Performance Optimization & Tuning
Aerospike Database Administration
Aerospike Backup & Recovery
Aerospike High Availability
Aerospike Cloud & Hybrid Deployments
Aerospike for Real-Time Applications (AdTech, FinTech, Retail, IoT)
ClickHouse Consulting Services
ClickHouse Migration Services
ClickHouse Optimization & Query Tuning
ClickHouse Database Administration
ClickHouse Backup & Recovery
ClickHouse Security & Maintenance
ClickHouse Cloud Services (ClickHouse Cloud, AWS, GCP, Azure)
ClickHouse Solutions by Industry
ClickHouse High Availability & Replication
TiDB Consulting & Architecture Planning
TiDB Administration & Maintenance
TiDB Security and Privacy Maintenance
TiDB Performance & Query Optimization
TiDB Migration Services
TiDB Backup & Disaster Recovery
TiDB High Availability Solutions
TiDB Solutions by Industry
TiDB Cloud Services
ScyllaDB Consulting & Architecture Planning
ScyllaDB Administration & Maintenance
ScyllaDB Security and Privacy Maintenance
ScyllaDB Performance & Query Optimization
ScyllaDB Migration Services
ScyllaDB Backup & Disaster Recovery
ScyllaDB High Availability Solutions
ScyllaDB Solutions by Industry
ScyllaDB Cloud Services
  1. Home
  2. > Blogs
  3. > Proxysql
  4. > What is ProxySQL

What is ProxySQL

ProxySQL is one of the advanced software load balancer that we have in market. ProxySQL has an in-built abilty to identify the reads,writes and route the write traffic to master and read traffic between the available slaves. One occurence of a Replication delay or server crash or replication breakag

sukan February 16, 2018

Subscribe for email updates

In the database world, it is crucial to keep our databases always highly available with better performance. When we deploy any new application or database, we would get the desired response time but as the traffic/connection/data size increases, the response time goes down. Now the challenge for any DBA is to scale up.

Let us say, DBA has added couple of slaves and routed the read traffic to the slaves and brought back the response time. Next challenge would be routing the traffic when there is replication delay or server crash? Routing manually can still impact the business badly. ProxySQL can address such challenges.

What is a Load Balancer?

Those who know about LB, please move on to “What is ProxySQL”.

Before knowing more about ProxySQL, let’s learn what is LB(Load Balancer). To be simple, a Load balancer distributes the network or application traffic among the available servers. This helps in attaining a better efficiency, reliability, availability & performance of applications by increasing the concurrent users and improving the hardware utilization efficiency.

There are two types of LBs, hardware and software load balancers. Hardware load balancer has a software component which processes the packet. Software load balancer includes a server component build over the network and with a combination of one or more scheduling algorithms. Load balancers hence also reduce the complexity at the application level when there is a DB IP change. Please see below for better clarity.  

 


 


What is ProxySQL?
 
ProxySQL is one of the advanced software load balancer that we have in the market. ProxySQL has an inbuilt ability to identify the reads, writes and route the write traffic to master and read traffic between the available slaves. One occurrence of a Replication delay or server crash or replication breakage, read traffic will be redirected to different slave server automatically. ProxySQL can do much more which I will explain in my next blog. In this blog, I will explain you more about the Load Balancing. Yes, it is open source and free.
 
ProxySQL accepts incoming traffic from an application and forwards it to backend MySQL / MariaDB / Percona servers. In case of any failure in the nodes(servers), ProxySQL understands the issue and routes the traffic to another highly available node. Thus ProxySQL ensures that there is no single point of failure. The application continues to work since the crashed server traffic would be routed to another node by ProxySQL. Using an appropriate load balancing algorithm it helps to maintain an optimal and efficient utilization of the resources.
 
Let’s consider an example of a sample, ProxySQL with 3 MySQL replicas through which the applications hits are being distributed.
 
ProxySQL directs writes to master and reads to all 3 replicas equally.
 
Let’s consider MySQL slave 1 is down.  

 

 

 

This will be identified by ProxySQL and will route the traffic to slave 2 and 3. ProxySQL will mark Slave 1 as a failure node and keep out of the active node lists.

 

 
 


The interesting part is that ProxySQL will monitor the failed node even after the failure case. Once the node comes up, it will be automatically added to the active node list and traffic will be routed to all 3 servers.

All these are happening without making a single change in the application.

Takeaways: 

  • ProxySQL is a software Load Balancer.
  • Read / Write hits will be split equally, based on rations and it is configurable
  • Node failure / Re-joining on the group is automatic.

Author Bio

sukan

Sukan is Database Team Lead at Mafiree with over a decade of experience in database systems, architecture, and performance optimization. He specializes in MySQL, MongoDB, TiDB, and ClickHouse, developing architectural improvements that make data platforms faster, more efficient, and cost-effective. Sukan writes about practical database engineering topics, real-world performance tuning, data replication, and high-scale system design, drawing from extensive hands-on experience solving complex technical challenges.

Leave a Comment

Related Blogs

ProxySQL 3.0 is Here: Top Features for MySQL & PostgreSQL Users

ProxySQL 3.0 introduces powerful capabilities like dynamic query routing, caching, multiplexing, and now PostgreSQL support. This blog explains how ProxySQL improves database performance, enables intelligent load balancing, and helps scale MySQL and PostgreSQL environments without application changes. Backed by real-world use cases from Mafiree, it provides practical insights into when and how to use ProxySQL effectively in production.

  9 views
Dynamic query routing with ProxySQL

How ProxySQL helps in achieving query routing without making a application changes.

  25433 views
Whats new in ProxySQL 2.0

Features of ProxySQL 2.0 Version

  2481 views
ProxySQL Features

Query Caching - Query Routing - Mirroring - Query Rewrite - Data Masking

  2161 views

Subscribe for email updates

Get in touch with us

Highlights

More than 6000 Servers Monitored

Happy Clients

Certified DBAs

24 x 7 x 365 Support

PCI

Database Services

MySQL MongoDB PostgreSQL SQL Server Aerospike Clickhouse TiDB MariaDB Columnstore

Quick Links

Careers Blog Contact Privacy Policy Disclaimer Policy

Contacts

Linkedin Mafiree Facebook Mafiree Twitter Mafiree

Nagercoil Office

Miru IT Park, Vallankumaranvillai,

Nagercoil, Tamilnadu - 629 002.

Bangalore Office

Unit 303, Vanguard Rise,

5th Main, Konena Agrahara,

Old Airport Road, Bangalore - 560 017.

Call: +91 6383016411

Email: sales@mafiree.com


Copyright © - All Rights Reserved - Mafiree