人大金仓KFS-Tungsten Replicator 7.0 路由模式解析

关键字:

KFS, Tungsten Replicator

Tungsten Replicator概述

Tungsten Replicator™ is a replication engine supporting a variety of different extractor and applier modules. Data can be extracted from MySQL, Amazon RDS MySQL, Amazon Aurora and Google Cloud SQL, and applied to a variety of transactional stores, NoSQL stores and datawarehouse stores.

During replication, Tungsten Replicator assigns data a unique global transaction ID, and enables flexible statement and/or row-based replication of data. This enables data to be exchanged between different databases and different database versions. During replication, information can be filtered and modified, and deployment can be between on-premise or cloud-based databases. For performance, Tungsten Replicator™ provides support for parallel replication, and advanced topologies such as fan-in, star and multi-master, and can be used efficiently in cross-site deployments.

Routing概述

路由方式会影响客户端和数据库的连接方式,并且控制连接器(connector)对连接和statement的检测程度。通过自动对客户端连接的路由转发,可以实现对恰当服务器的连接和负载均衡以及读写分离。

Routing Method

3.1 主备节点选择

RO_RELAXED设置可以以只读额形式转发query到Replica,但在没有Replica的情况下选择PRIMARY

RW_STRICT设置表示语句是Write行为,应该被转发到PRIMARY节点

3.2 连接器负载均衡

DefaultLoadBalancer:永远选择PRIMARY

MostAdvancedSlaveLoadBalancer:选择复制最多event数量的replica

LowestLatencySlaveBalancer:选择延迟最低的replica

RoundRobinSlaveLoadBalancer:以RR算法选择replica

Smart Scale Routing

智能管理读写请求,实现读写分离和严格的读写consistency,但会消耗更多的性能。

如果需要立刻获取刚刚写入的信息,使用smart route。

如果读取需求可以容忍相对落后的脏数据,请使用direct mode。

Direct Routing

Smart routing的简化版本,提供更高效率的读写分离系统,但是不考虑consistency。

适合少量写入,大量读取的业务场景。

SQL Routing

根据SQL语句进行路由,无法进行自动读写分离和主备选择。

Host Routing

通过不同的host端进行读写分离转发,无法和smartscale同时启用,必须在PRIMARY执行。

参考资料

http://help.kingbase.com.cn/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值