用于数据库分片的 MySQL 代理替代方案 [英] MySQL Proxy Alternatives for Database Sharding

查看:57
本文介绍了用于数据库分片的 MySQL 代理替代方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MySQL 代理是否有任何替代方案.我不想使用它,因为它仍处于 alpha 阶段.

Are there any alternatives for MySQL Proxy. I don't want to use it since it's still in alpha.

我将有 10 个 MySQL 服务器,其中 table_1 table_2 table_3 table_4 ... table_10 分布在 10 个服务器上.每个表的结构都是相同的,它们只是具有不同数据集的分片.

I will have 10 MySQL servers with table_1 table_2 table_3 table_4 ... table_10 spread across the 10 servers. Each table is identical in their structure, their just shards with different data sets.

是否有 MySQL 代理的替代方案,我可以让我的客户端应用程序连接到单个 SQL Server(代理),它查看查询并代表它获取数据.

Is there a alternative to MySQL Proxy, where I can have my client application connect to a single SQL Server (A proxy), which looks at the query and fetches the data on behalf of it.

例如,如果客户端从代理请求SELECT * FROM table_5 WHERE user=123",代理将连接到包含 table_5 的第 5 个 SQL Server 并获取数据?

For example, if the client requests "SELECT * FROM table_5 WHERE user=123" from the Proxy, which connects to the 5th SQL Server that houses table_5 and gets the data?

推荐答案

Spock Proxy 支持基于范围的大型 MySQL 数据库的水平分区.代理拦截来自客户端的 SQL 查询,根据数据库的分区方式将查询发送到正确的数据库,然后聚合来自每个数据库的结果并将它们作为常规 MySQL 结果集返回给客户端.

Spock Proxy supports range-based horizontal paritioning of a large MySQL database. The proxy intercepts SQL queries from the client, sends queries to the correct databases based on how the database is partitioned, then aggregates the results from each database and returns them to the client as a regular MySQL result set.

这篇关于用于数据库分片的 MySQL 代理替代方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆