Coder Social home page Coder Social logo

gaea's Introduction

LICENSE Build Status Go Report Card

简介

Gaea是小米**区电商研发部研发的基于mysql协议的数据库中间件,目前在小米商城大陆和海外得到广泛使用,包括订单、社区、活动等多个业务。Gaea支持分库分表、sql路由、读写分离等基本特性,更多详细功能可以参照下面的功能列表。其中分库分表方案兼容了mycat和kingshard两个项目的路由方式。Gaea在设计、实现阶段参照了mycat、kingshard和vitess,并使用tidb parser作为内置的sql parser,在此表达诚挚感谢。为了方便使用和学习Gaea,我们也提供了详细的使用和设计文档,也欢迎大家多多参与。

功能列表

基础功能

  • 多集群
  • 多租户
  • SQL透明转发
  • 慢SQL指纹
  • 错误SQL指纹
  • 注解路由
  • 慢日志
  • 读写分离,从库负载均衡
  • 自定义SQL拦截与过滤
  • 连接池
  • 配置热加载
  • IP/IP段白名单
  • 全局序列号

分库、分表功能

  • 分库: 支持mycat分库方式
  • 分表: 支持kingshard分表方式
  • 聚合函数: 支持max、min、sum、count、group by、order by等
  • join: 支持分片表和全局表的join、支持多个分片表但是路由规则相同的join

架构图

gaea架构图

集群部署图

gaea集群部署图

如上图所示, 部署一套gaea-cc和etcd可用来管理多套gaea集群, 负责集群内namespace配置的增删改查. gaea-cc的HTTP接口文档

安装使用

设计与实现

Roadmap

  • 支持配置加密存储,开关
  • 支持执行计划缓存
  • 支持事务追踪
  • 支持二级索引
  • 支持分布式事务
  • 支持平滑的扩容、缩容
  • 后端连接池优化 (按照请求时间排队)

自有开发模块

  • backend
  • cmd
  • log
  • models
  • proxy/plan
  • proxy/router(kingshard路由方式源自kingshard项目本身)
  • proxy/sequence
  • server

外部模块

  • mysql(google vitess、tidb、kingshard都有引入)
  • parser(tidb)
  • stats(google vitess,打点统计)
  • util(混合)

社区

gitter

Gitter

钉钉

钉钉

gaea's People

Contributors

xiyangxixian avatar teckick avatar vix937619348 avatar chicliz avatar niubell avatar panhongrainbow avatar sevennt avatar ianwoolf avatar funnyant avatar uarealoser avatar bopjiang avatar wilkice avatar igoso avatar lcp0578 avatar liuhao1024 avatar saerdna avatar sunny5156 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.