A Database Mesh Project Sponsored by SphereEx

pushedAt 3 months ago


GitHub release License Slack FOSSA Status

Briefly, if applications want a MySQL, just access localhost:3306.


Pisanix [Pi-sanics] is a modern database governance framework for Kubernetes. Pisanix adds SQL-aware traffic control, audit, security and extension abilities to help manage various databases in the Database Mesh way.

Pisanix has 4 major features:

  1. Local Service as Database: Pisanix provides a local database service, that is one applications could access a MySQL at localhost:3306 without any knowledge of the real data source.
  2. Unified Config Management: Pisanix provides a centralized management of Database Mesh configurations, including traffic strategies like read-write splitting, sharding, encryption and concurrency control.
  3. Multi Protocol Support: Pisanix has a bunch of different plugins to help build a Glue Layer for any database protocols.
  4. Cloud Native Architecture: Pisanix takes advantage of the classic control plane and data plane pattern, using Infrastructure as Code to make it a versioned database access behavior.

Current Status

Pisanix now supports TrafficStrategy of Database Mesh Specificiation, besides VirtualDatabase, DatabaseEndpoint, and other features like AuditRequest and AccessControl are also on the way:

  • TrafficStrategy
    • Load Balance
      • Simple LoadBalance
      • Read Write Splitting
        • Static
        • Dynamic
          • Master-Slave Replication
          • MHA
    • Plugins
      • Circuit Break
      • Concurrency Control
  • DataStrategy
    • Sharding
      • Sharding with keys
        • Single Database Sharding Tables
        • Sharding Databases
        • Sharding Databases with Sharding Tables
  • AuditRequest
    • Audit with AWS
  • AccessControl
    • Fine-Grained Access Control
  • QoSClaim
    • TrafficQoS
  • DatabaseClass
    • AWSRdsInstance

Getting Started


Pisanix has 3 components:

  • Pisa-Controller: A Golang control plane designed for sidecar injection and configuration transformation
  • Pisa-Proxy: A high performance Rust data plane used as SQL traffic proxy, support various of traffic governance capabilities.
  • Pisa-Daemon(Coming Soon): A optional data plane works on every node, provide programmable runtime management such as TrafficQoS.


Pisanix has the following goals:

  1. SQL-Aware Traffic Control: supports SQL traffic load balancing, access control, observability.
  2. Runtime Resource-oriented Programming: supports extensible resource control abilities.
  3. Database Reliability Engineering: make DBA's life easier with Kubernetes

Database traffic governance

Applications access databases with SQL, so Pisanix will hijack all SQL traffic. This is a great opportunity to do a lot of things around traffic, like loadbalancing and SQL firewall.


In the past, metrics could be retrieved from database instances and display in kinds of charts. Now with Pisanix, DBAs could have more chances to achieve better observability.


For DBAs who could and would like to solve problems with programming. Pisanix supports many kinds of plugin mechanism, like Lua and Wasm. People will have the chance to 'reshape' the expected behavior of databases.


Full documentation will be available on the Pisanix website.


Please follows Contributing Guide

Community & Support

Mailing List https://groups.google.com/g/database-mesh
Dev Meetings (Starting Feb 16th, 2022), Bi-weekly Wednesday 9:00AM PST https://meet.google.com/yhv-zrby-pyt
Dev Meetings APAC Friendly (Starting April 27th, 2022), Bi-weekly APAC Wednesday 9:00PM GMT+8 https://meeting.tencent.com/dm/6UXDMNsHBVQO
Wechat Broker pisanix
Slack https://join.slack.com/t/databasemesh/shared_invite/zt-19rhvnxkz-USjZ~am~ghd_Q0q~8bAJXA
Meetings Notes https://bit.ly/39Fqt3x
  • Wechat User Group: Broker wechat to add you into the user group.


The Pisanix project is still at an early stage. In the next work, it will focus on enhancing the governance capabilities of traffic, such as data sharding, application data access auditing , and runtime resource QoS, etc. And it will continuously improve the performance and provide an ease of use experience, support plugin extensions to fit different business scenarios.


FOSSA Status