kingshard is a high-performance MySQL proxy written in Go that enables read-write splitting and horizontal sharding across multiple database nodes.
The tool addresses the complexity of scaling MySQL by providing a proxy layer that intercepts client connections and routes queries intelligently. It supports hash, range, and date-based sharding strategies to distribute data across multiple nodes, while also handling read-write splitting to direct queries to appropriate backends. The proxy implements the MySQL wire protocol, allowing clients to connect without modification. Performance is approximately eighty percent of direct MySQL connections.
Developers should adopt kingshard when building MySQL clusters that require horizontal scaling through sharding. It suits projects needing to distribute large datasets across multiple database instances while maintaining a unified interface for applications. The tool handles common SQL operations including select, insert, update, replace, and delete statements, along with aggregate functions and joins. It includes features for managing multiple read replicas with load balancing, forcing reads from the master when necessary, and supporting prepared statements. Dynamic configuration changes and backend node management allow operational flexibility without restarting the proxy.
The project shows consistent maintenance with regular commits addressing bugs and feature requests. Development activity demonstrates responsiveness to issues raised by users. The codebase receives updates that refine sharding logic and improve stability of the proxy layer. Contributors engage with pull requests and incorporate feedback from the community using the tool in production environments.