MySQL 中间件-MySQL Router
2015-11-02 10:32:11 阿炯

MySQL Router 是轻量级 MySQL 中间件,提供应用与任意 MySQL 服务器后端的透明路由。MySQL Router 可以广泛应用在各种用例中,比如通过高效路由数据库流量提供高可用性和可伸缩的 MySQL 服务器后端,Oracle 官方出品。采用C/C++开发并在GPL协议下授权。


MySQL Router is lightweight middleware that provides transparent routing between your application and any backend MySQL Servers. It can be used for a wide variety of use cases, such as providing high availability and scalability by effectively routing database traffic to appropriate backend MySQL Servers. The pluggable architecture also enables developers to extend MySQL Router for custom use cases.

连接到 Router 服务:
cnx = mysql.connector.connect(host='router.freeoa.net', port=8500, user='freeoa', password='wwwnet')
cur = cnx.cursor()
cnx.execute("SELECT ...")

MySQL Router 最好和 MySQL Fabric 一起用,不过也不硬性要求,Router 最好和应用运行在同一台机器上。

服务架构:

MySQL Router Architecture

MySQL Router 在应用系统中的位置,也可以运行多个 router 实例:



最新版本:2.0


项目主页:http://dev.mysql.com/doc/mysql-router/en/