{"id":13601083,"url":"https://github.com/XiaoMi/Gaea","last_synced_at":"2025-04-11T01:30:56.960Z","repository":{"id":37359305,"uuid":"187998161","full_name":"XiaoMi/Gaea","owner":"XiaoMi","description":"Gaea is a mysql proxy, it's developed by xiaomi b2c-dev team.","archived":false,"fork":false,"pushed_at":"2024-09-26T08:06:02.000Z","size":29309,"stargazers_count":2633,"open_issues_count":58,"forks_count":425,"subscribers_count":84,"default_branch":"master","last_synced_at":"2024-10-29T15:27:24.256Z","etag":null,"topics":["database","middleware"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XiaoMi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-22T08:39:57.000Z","updated_at":"2024-10-28T06:19:50.000Z","dependencies_parsed_at":"2023-01-21T04:19:47.257Z","dependency_job_id":"4422fe18-cbbe-472c-a47e-217b771e812c","html_url":"https://github.com/XiaoMi/Gaea","commit_stats":{"total_commits":183,"total_committers":25,"mean_commits":7.32,"dds":0.8032786885245902,"last_synced_commit":"9e16060c4afcabe8ca910313e2abde4113e9af79"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaoMi%2FGaea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaoMi%2FGaea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaoMi%2FGaea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiaoMi%2FGaea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XiaoMi","download_url":"https://codeload.github.com/XiaoMi/Gaea/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223453398,"owners_count":17147669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","middleware"],"created_at":"2024-08-01T18:00:55.306Z","updated_at":"2025-04-11T01:30:56.953Z","avatar_url":"https://github.com/XiaoMi.png","language":"Go","funding_links":[],"categories":["开源类库","Go","Open source library","DBProxy","HarmonyOS"],"sub_categories":["数据库","Database","Windows Manager"],"readme":"[![LICENSE](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/XiaoMi/Gaea/blob/master/LICENSE)\n[![Build Status](https://travis-ci.org/XiaoMi/Gaea.svg?branch=master)](https://travis-ci.org/XiaoMi/Gaea)\n[![Go Report Card](https://goreportcard.com/badge/github.com/XiaoMi/Gaea)](https://goreportcard.com/report/github.com/XiaoMi/Gaea)\n\n## 简介\n\nGaea是小米集团自研的基于 MySQL 协议的数据库中间件，目前在国内和海外得到了广泛使用，具体包括手机、汽车、生态链、金融、互联网等多个业务。Gaea支持分库分表、sql路由、读写分离等基本特性，更多详细功能可以参照下面的功能列表。其中分库分表方案兼容了mycat和kingshard两个项目的路由方式。Gaea在设计、实现阶段参照了mycat、kingshard和vitess，并使用tidb parser作为内置的sql parser，在此表达诚挚感谢。为了方便使用和学习Gaea，我们也提供了详细的使用和设计文档，也欢迎大家多多参与。\n\n## 功能列表\n\n#### 基础功能\n\n- 多集群\n- 多租户\n- SQL透明转发\n- 慢SQL指纹\n- 错误SQL指纹\n- 注解路由\n- 慢日志\n- 读写分离，从库负载均衡\n- 自定义SQL拦截与过滤\n- 连接池\n- 配置热加载\n- IP/IP段白名单\n- 全局序列号\n\n#### 分库、分表功能\n\n- 分库: 支持mycat分库方式\n- 分表: 支持kingshard分表方式\n- 聚合函数: 支持max、min、sum、count、group by、order by等\n- join: 支持分片表和全局表的join、支持多个分片表但是路由规则相同的join\n\n## 架构图\n\n![gaea架构图](docs/assets/architecture.png)\n\n## 集群部署图  \n\n![gaea集群部署图](docs/assets/deployment.png)  \n\n如上图所示, 部署一套gaea-cc和etcd可用来管理多套gaea集群, 负责集群内namespace配置的增删改查.\n[gaea-cc的HTTP接口文档](docs/gaea-cc.md)\n\n## 安装使用\n\n- [快速入门](docs/quickstart.md)\n- [配置说明](docs/configuration.md)\n- [监控配置说明](docs/grafana.md)\n- [全局序列号配置说明](docs/sequence-id.md)\n- [基本概念](docs/concepts.md)\n- [SQL兼容性](docs/compatibility.md)\n- [FAQ](docs/faq.md)\n\n## 设计与实现\n\n- [整体架构](docs/architecture.md)\n- [多租户的设计与实现](docs/multi-tenant.md)\n- [gaea配置热加载设计与实现](docs/config-reloading.md)\n- [gaea proxy后端连接池的设计与实现](docs/connection-pool.md)\n- [prepare的设计与实现](docs/prepare.md)\n\n## 性能测试\n\n- [gaea 2.3.7 ](docs/performance-test-report.md)\n\n## Roadmap\n\n- [x] 支持配置加密存储，开关\n- [ ] 支持执行计划缓存\n- [ ] 支持事务追踪\n- [ ] 支持二级索引\n- [ ] 支持分布式事务\n- [ ] 支持平滑的扩容、缩容\n- [ ] 后端连接池优化 (按照请求时间排队)\n\n## 自有开发模块\n\n- backend  \n- cmd  \n- log  \n- models  \n- proxy/plan  \n- proxy/router(kingshard路由方式源自kingshard项目本身)  \n- proxy/sequence\n- server  \n\n## 外部模块\n\n- mysql(google vitess、tidb、kingshard都有引入)  \n- parser(tidb)  \n- stats(google vitess，打点统计)  \n- util(混合)\n\n\n## 社区\n\n### gitter\n[![Gitter](https://badges.gitter.im/xiaomi-b2c/Gaea.svg)](https://gitter.im/xiaomi-b2c/Gaea?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n### 飞书\n\u003cimg src=\"docs/assets/feishu_talk.jpeg\" alt=\"飞书\" style=\"width: 200px;\"/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXiaoMi%2FGaea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXiaoMi%2FGaea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXiaoMi%2FGaea/lists"}