# MyCATApache/Mycat2

MySQL Proxy using Java NIO based on Sharding SQL,Calcite ,simple and fast

Repository: https://github.com/MyCATApache/Mycat2
Canonical: https://ross.abutalabs.com/products/mycat2
Homepage: http://www.mycat.org.cn/
Language: Java
License: GPL-3.0
License Family: copyleft
Topics: mycat, mysql, proxy, calcite, nio, vertx, sharding, sql, mariadb, async, jdbc, server, xa, transcation, slice, mgr, mha, joinclustering, rxjava, java
Last push: 2023-08-15T09:17:05+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3316, "days_push": 1114, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1733, forks 476 (observed 2026-08-28T04:05:28.937168+00:00)

## What it is
Mycat2 is a distributed database middleware written in Java that acts as a MySQL-protocol-compatible proxy, providing transparent data sharding, distributed SQL queries, and read/write splitting across multiple backend databases. It uses a Calcite-based query optimizer and Java NIO/Vert.x for asynchronous, high-throughput connection handling.

## Use cases
- shard a large MySQL table across multiple database nodes transparently
- scale out MySQL reads with read-write splitting behind a single endpoint
- run distributed SQL joins across sharded MySQL databases
- add a proxy layer in front of MySQL or MariaDB without changing client applications
- implement XA distributed transactions across multiple database slices
- migrate a monolithic MySQL database to a horizontally scaled cluster

## When to choose
- you need MySQL-compatible sharding middleware in the Java ecosystem
- you want transparent horizontal scaling of MySQL without rewriting application SQL
- you need read/write splitting and load balancing across MySQL replicas
- you require distributed transactions (XA) across sharded backends

## When to avoid
- you use a database other than MySQL/MariaDB as your primary backend
- you need a fully managed distributed SQL database rather than middleware
- your project requires active community development - releases have slowed since 2023
- you need non-Java 8 runtime support, which is not yet available

## Facets
- artifact type: service
- maturity: maintenance
- function: database, proxy, routing, middleware
- domain: databases, microservices, backend, developer-tools
- platform: jvm, cross-platform, self-hosted
- tags: mysql-proxy, database-sharding, sql-middleware, read-write-splitting, calcite, xa-transactions, sql, linux

## Member repositories
- MyCATApache/Mycat2 (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:28.937168+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-30T03:31:26.836179+00:00, confidence not recorded.
  - readme: https://github.com/MyCATApache/Mycat2 (fetched 2026-08-28T04:05:28.937168+00:00, sha c97742393cd5)
  - homepage: http://www.mycat.org.cn/ (fetched 2026-08-29T11:08:10.424002+00:00, sha 7d81f2fe8a83)
- Data as of 2026-08-30T08:39:29.467469+00:00.
