{"id":13412126,"url":"https://github.com/wesql/wescale","last_synced_at":"2026-03-11T09:01:24.327Z","repository":{"id":194283977,"uuid":"618261121","full_name":"wesql/wescale","owner":"wesql","description":"WeScale is a Modern MySQL proxy that supports read-write-split, read-after-write-consistency, load balancing and OnlineDDL.","archived":false,"fork":false,"pushed_at":"2024-11-06T08:36:23.000Z","size":295457,"stargazers_count":200,"open_issues_count":32,"forks_count":8,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-11-06T09:15:58.616Z","etag":null,"topics":["connection-pool","database-proxy","mysql","mysql-proxy","online-ddl","proxy"],"latest_commit_sha":null,"homepage":"https://wesql.io","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/wesql.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-24T04:49:15.000Z","updated_at":"2024-11-06T07:15:41.000Z","dependencies_parsed_at":"2024-11-13T09:30:09.319Z","dependency_job_id":null,"html_url":"https://github.com/wesql/wescale","commit_stats":null,"previous_names":["wesql/wesql-scale","wesql/wescale"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesql%2Fwescale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesql%2Fwescale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesql%2Fwescale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesql%2Fwescale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wesql","download_url":"https://codeload.github.com/wesql/wescale/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243625013,"owners_count":20321216,"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":["connection-pool","database-proxy","mysql","mysql-proxy","online-ddl","proxy"],"created_at":"2024-07-30T20:01:21.277Z","updated_at":"2025-12-15T20:20:19.183Z","avatar_url":"https://github.com/wesql.png","language":"Go","funding_links":[],"categories":["Database","数据库","Data Integration Frameworks"],"sub_categories":["Database Tools","数据库工具"],"readme":"\n\n\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eWeScale\u003c/h1\u003e\n\n[![LICENSE](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://github.com/wesql/wescale/blob/vitess-release-16.0-dev/LICENSE)\n[![Language](https://img.shields.io/badge/Language-Go-blue.svg)](https://go.dev/)\n\u003cbr/\u003e\n[![Unit Test (mysql57)](https://github.com/wesql/wescale/actions/workflows/unit_test_mysql57.yml/badge.svg?branch=main)](https://github.com/wesql/wescale/actions/workflows/unit_test_mysql57.yml)\n[![Unit Test (mysql80)](https://github.com/wesql/wescale/actions/workflows/unit_test_mysql80.yml/badge.svg?branch=main)](https://github.com/wesql/wescale/actions/workflows/unit_test_mysql80.yml)\n[![E2E Test](https://github.com/wesql/wescale/actions/workflows/cluster_endtoend_wesql.yml/badge.svg?branch=main)](https://github.com/wesql/wescale/actions/workflows/cluster_endtoend_wesql.yml)\n[![MTR Test](https://github.com/wesql/wescale/actions/workflows/wescale_wesql_performance_docker.yml/badge.svg)](https://github.com/wesql/wescale/actions/workflows/wescale_wesql_performance_docker.yml)\n\n\u003c/div\u003e\n\n\n# Introduction\nWeScale is an open-source database proxy built with application developers in mind. It aims to simplify and enhance the \ninteraction between your application and the database, making development more efficient and enjoyable.\n\u003cbr/\u003e\nWhile databases have evolved to include complex and common application requirements like transactions and indexing, \nmodern applications have a growing set of shared needs that aren’t suitable or haven’t yet been integrated into the database layer. \nThis gap has led to the rise of various database middleware solutions such as \nclient-side connection pools, SQL retry libraries, online DDL tools, and more.\n\u003cbr/\u003e\nAs a database proxy, WeScale serves as a crucial bridge between the application layer and the database layer.\nIt leans towards the application side, offering features specifically designed to simplify the developer experience. \n\n# Getting Started\n* To [Get Started On Your Local Machine](doc%2Ftoturial%2F00-Deploy%26Debug.md) with WeScale, simply clone the repository and follow the installation instructions\nprovided in the documentation.\n* To [Deploy WeScale on Kubernetes](doc%2Ftoturial%2F11-Getting-Started-with-Kubernetes.md), \nyou can use the powerful Kubeblocks Operator to quickly launch a WeScale cluster in a Kubernetes cluster. We recommend this method for production environments. \n\n## Getting Started with Docker\nTo Start WeScale with Docker, you can simply run the following command:\n```shell\ndocker network create wescale-network\n\ndocker run -itd --network wescale-network --name mysql-server \\\n  -p 3306:3306 \\\n  -e MYSQL_ROOT_PASSWORD=passwd \\\n  -e MYSQL_ROOT_HOST=% \\\n  -e MYSQL_LOG_CONSOLE=true \\\n  mysql/mysql-server:8.0.32 \\\n  --bind-address=0.0.0.0 \\\n  --port=3306 \\\n  --log-bin=binlog \\\n  --gtid_mode=ON \\\n  --enforce_gtid_consistency=ON \\\n  --log_replica_updates=ON \\\n  --binlog_format=ROW\n\ndocker run -itd --network wescale-network --name wescale \\\n  -p 15306:15306 \\\n  -w /vt/examples/wesql-server \\\n  -e MYSQL_ROOT_USER=root \\\n  -e MYSQL_ROOT_PASSWORD=passwd \\\n  -e MYSQL_PORT=3306 \\\n  -e MYSQL_HOST=mysql-server \\\n  apecloud/apecloud-mysql-scale:0.3.8 \\\n  /vt/examples/wesql-server/init_single_node_cluster.sh\n```\n\nNow you can connect to WeScale and the original MySQL server:\n```shell\n# Connect to WeScale\nmysql -h127.0.0.1 -uroot -ppasswd -P15306\n\n# You can still connect to the original MySQL server\nmysql -h127.0.0.1 -uroot -ppasswd -P3306\n```\n\nTry out Declarative DDL:\n```sql\nSET @@enable_declarative_ddl=true;\n\nCREATE DATABASE if not exists test;\nUSE test;\n\nCREATE TABLE if not exists test_table (\n    id int primary key,\n    name varchar(255)\n);\n\nSHOW CREATE TABLE test_table;\n\nCREATE TABLE if not exists test_table (\n    id int primary key,\n    name varchar(255),\n    email varchar(255),\n    profile varchar(255),\n    index (name, email)\n);\n\nSHOW CREATE TABLE test_table;\n```\n\nClean up the containers:\n```shell\ndocker rm -f mysql-server wescale\ndocker network rm wescale-network\n```\n\n## Community\nJoin our [Discord](https://discord.com/channels/1308609231498510427/1308609231498510430) to discuss features, get help, and connect with other users.\n\n# Features\n* [Declarative-DDL.md](doc%2Ftoturial%2F14-Declarative-DDL.md)\n* [OnlineDDL.md](doc%2Ftoturial%2F07-OnlineDDL.md)\n* [Transaction Chopping.md](doc%2Ftoturial%2F09-Transaction-Chopping.md)\n* [Filters](doc%2Ftoturial%2F12-Filters.md)\n* [Write a Wasm Plugin In WeScale](doc%2Ftoturial%2F13-Write-a-Wasm-Plugin-In-WeScale.md)\n* [Branch](doc%2Ftoturial%2F08-Branch.md)\n* [Show Tablets Query Plans](doc%2Ftoturial%2F10-Show%20Tablets%20Query%20Plans.md)\n* [Transparent Failover.md](doc%2Ftoturial%2F05-Transparent%20Failover.md)\n* [Authentication \u0026 Authorization.md](doc%2Ftoturial%2F06-Authentication%26Authorization.md)\n* [Read-Write-Split \u0026 LoadBalancer.md](doc%2Ftoturial%2F03-Read-Write-Split%20%26%20LoadBalancer.md)\n* [Read-After-Write-Consistency.md](doc%2Ftoturial%2F04-Read-After-Write-Consistency.md)\n\n# Blogs\n* [Architecture.md](doc%2Ftoturial%2F01-Architecture.md)\n* [Life of A Query.md](doc%2Ftoturial%2F02-Life%20of%20A%20Query.md)\n* [Introduction To WeScale.md](doc%2Fblogs%2FIntroduction%20To%20WeScale.md)\n* [Dive into Read-Write-Splitting of WeScale.md](doc%2Fblogs%2FDive%20into%20Read-Write-Splitting%20of%20WeScale.md)\n* [Performance Comparison WeScale vs MySQL.md](doc%2Fblogs%2FPerformance%20Comparison%20WeScale%20vs%20MySQL.md)\n* [Execution Process of DROP TABLE in OnlineDDL Mode.md](doc%2Fblogs%2FExecution%20Process%20of%20DROP%20TABLE%20in%20OnlineDDL%20Mode.md)\n* [Scaling-database-connections.md](doc%2Fblogs%2FScaling-database-connections.md)\n\n# Developer\n* [Use FailPoint Injection In WeScale.md](doc%2Fdeveloper%2FUse%20FailPoint%20Injection%20In%20WeScale.md)\n\n# Monitoring\nOnce you have WeScale up and running, you can monitor the cluster using prometheus and grafana.\n```bash\ncd ./examples/metrics \u0026\u0026 ./start_dashboard.sh\n```\nOpen your browser and navigate to `http://localhost:3000/dashboards` to view the dashboard.\n\n![20241217-164819.jpeg](doc%2F20241217-164819.jpeg)\n\n# Contributing\nWe welcome contributions to WeScale! If you have any ideas, bug reports, or feature requests,\nplease feel free to open an issue or submit a pull request.\n\n# License\nWeScale is released under the Apache 2.0 License.\n\n# Acknowledgements\nWeScale is a fork of the Vitess project, which is a database clustering system for horizontal scaling of MySQL.\nWe would like to thank the Vitess team for their hard work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesql%2Fwescale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwesql%2Fwescale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesql%2Fwescale/lists"}