# Meituan-Dianping/Zebra

美团点评集团统一使用的MySQL数据库访问层的中间件。主要提供对业务开发透明、读写分库、分库分表能力，并提供了端到端SQL监控的集成方案。

Repository: https://github.com/Meituan-Dianping/Zebra
Canonical: https://ross.abutalabs.com/products/zebra
Language: Java
License: Apache-2.0
License Family: permissive
Topics: mysql, dynamic-datasource, read-write-separation, zebra, database-sharding, mybatis
Last push: 2022-12-08T00:53:32+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3666, "days_push": 1365, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2761, forks 707 (observed 2026-08-28T04:07:18.474369+00:00)

## What it is
Zebra is Meituan-Dianping's JDBC-based database access layer middleware for MySQL, providing transparent read-write splitting and database/table sharding. It includes centralized configuration management, multi-datasource support, async requests, and end-to-end SQL monitoring integration with the CAT platform.

## Use cases
- shard mysql tables transparently for a java application
- add read-write splitting to a mysql-backed service
- scale a mysql database across multiple shards without changing business code
- monitor sql queries end to end with cat
- manage multiple dynamic datasources in a spring/mybatis app
- migrate a single-database app to a sharded setup

## When to choose
- you run mysql on the jvm and need sharding or read-write splitting with minimal code changes
- you want integrated sql monitoring and centralized config management
- you use mybatis and want async dao extensions

## When to avoid
- you use postgresql or a non-jvm stack
- you want a proxy-based sharding solution rather than a client library
- you need a project with frequent recent releases

## Facets
- artifact type: library
- maturity: maintenance
- function: database, database-driver, monitoring, routing, middleware
- domain: databases, backend, developer-tools, monitoring
- platform: jvm, cross-platform
- tags: mysql, read-write-splitting, database-sharding, jdbc, mybatis, dynamic-datasource, sql-monitoring, cat

## Member repositories
- Meituan-Dianping/Zebra (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:18.474369+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:18:43.869914+00:00, confidence not recorded.
  - readme: https://github.com/Meituan-Dianping/Zebra (fetched 2026-08-28T04:07:18.474369+00:00, sha d8409a7b37bc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
