XiaoMi/Gaea

Gaea is a mysql proxy, it's developed by xiaomi b2c-dev team.

Owned by Xiaomi

View on GitHub ↗Jump to charts ↓

XiaoMi/Gaea has 2.5k+ stars and 400+ forks on GitHub, is written in Go, and was last pushed on Mar 18, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 24 minutes ago
Added to GitGenius on October 12th, 2026
Created on May 22nd, 2019
Open Issues & Pull Requests: 67 (+0)
GitHub issues: Enabled
Number of forks: 447
Total Stargazers: 2,763 (+0)
Total Subscribers: 79 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 24.2 days
Mean response time: 38.7 days
90th percentile: 112.9 days
Tracked items: 11

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 8
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 482 days
Stale 30+ days: 8
Stale 90+ days: 8

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

Gaea is a MySQL proxy middleware that enables transparent SQL routing and sharding across distributed database clusters.

Gaea addresses the challenge of scaling MySQL databases by intercepting and routing SQL queries to appropriate backend instances. It supports sharding at both the database and table levels, with table sharding compatible with KingShard's approach and database sharding compatible with MyCAT's routing methods. The tool handles read-write separation with replica load balancing, connection pooling, and custom SQL interception and filtering. It includes slow query fingerprinting, error SQL fingerprinting, and annotation-based routing to direct queries to specific shards. Configuration changes can be applied without restarting the proxy through hot-reload functionality.

Gaea suits organizations running large-scale MySQL deployments that need transparent sharding without application-level changes. It works well for systems requiring read-write splitting and multi-tenant isolation, where different tenants' data can be isolated through namespace configuration. The tool is particularly appropriate for teams already familiar with MyCAT or KingShard, as it incorporates their routing approaches. Gaea provides a centralized control component that manages multiple proxy clusters through a single etcd-backed configuration service, making it suitable for infrastructure teams managing many database instances across different business units.

The project maintains comprehensive documentation covering architecture, multi-tenancy design, connection pool implementation, and configuration management. Development activity includes a defined roadmap with completed features like configuration encryption and planned additions such as execution plan caching, transaction tracing, and distributed transaction support. The codebase includes custom implementations for backend connection management, routing logic, sequence generation, and proxy planning, while reusing established components like TiDB's SQL parser and Google Vitess's statistics collection framework.