kingshard
kingshard is a self-hosted, Go-powered proxy for MySQL.
What kingshard is
kingshard is a self-hosted, Go-powered proxy for MySQL. It separates read and write SQL statements, balances reads across multiple slave databases, and supports connection pooling. Sharding can use hash or range methods across nodes, with date sharding also listed. Basic supported statements include select, insert, update, replace, and delete. The project lists prepared statements, single-node transactions, last_insert_id(), and aggregate functions such as max, min, count, and sum. Sharded queries also support join, limit, order by, and group by. Operational controls include backend high availability, connection limits, dynamic online or offline changes, and runtime configuration updates. Client IP ACLs and an SQL blacklist provide access controls. Installation uses Go, a Git source clone, make, a YAML configuration file, and a locally run binary. kingshard is free, open source, and licensed under Apache 2.0. Its guide requires sharded subtables to be created manually, and transactions or updates spanning multiple databases return errors.
Good
- Read/write SQL routing
- Hash and range sharding
- Read balancing across slave databases
- Dynamic backend status changes
- Apache 2.0 open source
Watch out
- Sharded subtables require manual creation
- Cross-database transactions return errors
- Cross-database updates return errors
- Setup requires Go and source build
Who it suits
kingshard suits operators building MySQL clusters that need read/write routing, sharding, pooling, and multiple read replicas. It is aimed at self-hosted deployments managed through Go-based installation steps.
Verdict
kingshard provides MySQL routing, sharding, pooling, and backend controls in a self-hosted package. Its documented cross-database limits and manual table setup matter when planning a cluster.
The facts
Each one read from kingshard's own pages, with the date it was checked.
What it does
- Access controls
- It lists client IP ACL control and an SQL blacklist among its features.checked 8 Oct 2026
- Availability
- It lists high availability for MySQL backends and allows backend databases to be set online or offline dynamically.checked 8 Oct 2026
- Connections
- It supports setting a maximum number of connections to MySQL databases and transactions on a single node.checked 8 Oct 2026
- Cross-node transaction limit
- The guide says transactions are supported only within one database and return errors if they span multiple databases.checked 4 Oct 2026
- Cross-node update limit
- The guide says an update routed across multiple databases returns an error.checked 4 Oct 2026
- Deployment
- The documented installation uses Go, Git clone, make, a YAML configuration file, and a locally run kingshard binary.checked 4 Oct 2026
- Installation
- The documented installation uses Go, a source clone, make, a configuration file, and running the built binary.checked 8 Oct 2026
- License
- The repository says kingshard is licensed under Apache 2.0.checked 8 Oct 2026
- Manual setup limit
- The guide says sharded subtables must be created manually in the appropriate database.checked 4 Oct 2026
- Operations
- It supports MySQL backend high availability, connection limits, dynamic backend online/offline changes, and runtime configuration changes.checked 4 Oct 2026
- Performance claim
- The README says performance is about 80% of connecting directly to MySQL.checked 8 Oct 2026
- Prepared statements
- It supports prepared statement operations including COM_STMT_PREPARE and COM_STMT_EXECUTE.checked 8 Oct 2026
- Product
- kingshard is a Go-powered, high-performance proxy for MySQL.checked 4 Oct 2026
- Purpose
- kingshard is a Go-powered MySQL proxy that routes read and write SQL and aims to simplify MySQL sharding.checked 8 Oct 2026
- Query capabilities
- It lists support for prepared statements, single-node transactions, last_insert_id(), and common aggregate functions including max, min, count, and sum.checked 4 Oct 2026
- Query features
- For sharded queries, it lists max, min, count, and sum functions, plus join, limit, order by, and group by.checked 8 Oct 2026
- Read scaling
- It supports multiple slave databases and load balancing between slaves.checked 8 Oct 2026
- Read/write routing
- It splits read and write SQL statements and can balance reads across multiple slave databases.checked 4 Oct 2026
- Release
- The GitHub releases page identifies v1.6 as the latest release and describes multi-user support and configuration hot reload.checked 8 Oct 2026
- Sharding
- It supports hash, range, and date sharding across multiple nodes, as well as sending SQL to a specified node.checked 8 Oct 2026
- SQL support
- The README lists select, insert, update, replace, and delete as supported basic statements.checked 8 Oct 2026
- Use case
- The usage guide describes using kingshard to build a MySQL cluster for read/write splitting, table sharding, and connection pooling.checked 4 Oct 2026
Alternatives to kingshard
- 1
OceanBase Database
Free planOpen sourceWebAPILinuxmacOS8.2$2.38 usage-based - 2

MySQL
Free planAPILinuxmacOSSelf-hosted7.9Free plan - 3
Supavisor
Free planOpen sourceAPILinuxSelf-hosted7.6From $25 a month - 4
Avidemux
Free planOpen sourceWebLinuxmacOSWindows7.3Free plan - 5
TiCDC
Free planOpen sourceAPILinuxmacOSSelf-hosted7.2Free plan - 6

Amazon RDS
Free planWebAPISelf-hosted7.1Free plan
