Kingshard is a MySQL database proxy and sharding middleware that routes SQL traffic between clients and multiple database nodes. It functions as a load balancer, read-write splitter, and SQL query firewall to manage how data is accessed and distributed across a database infrastructure.
The system implements data sharding using hash, range, or date strategies to split tables across multiple nodes. It enables read-write splitting by directing data modification requests to a master node while distributing read-only queries across a pool of slave replicas.
The proxy provides traffic management through backend connection pooling and query routing, including the ability to direct queries to specific nodes via manual comments. Security is handled through client IP access control and the filtering of forbidden SQL patterns via a blacklist.
The project supports packaging as a container image for consistent deployment.