Read-write Separate

Last updated: 2020-02-26 16:11:41

PDF

TencentDB for Redis supports read-write separation for business scenarios with more reads but less writes, which can well cope with read requests concentrating on frequently read data. It supports up to 1-master 5-slave mode to offer 5x read performance.

How It Works

Redis version

  • Read/write separation's principle Compatible with standard version and cluster version of Redis 4.0or above, and automatic read/write separation is realized through Proxy layer.
  • Read-write separation weight : After read-write separation is enabled, Proxy will enable access by directing write requests to the master node only and distributing read requests evenly on slave nodes.

CKV version

  • Read/write separation's principle The CKV version system naturally supports read/write separation architecture. All requests go to each node of each cluster through Cloud Load Balancer (CLB) gateway Assign, and each node has global Slot routing information. When read/write separation is enabled, if the read Key falls on this node, the data will be read and returned directly, otherwise repost will be requested to the corresponding node according to the routing information, and the data will be read by the corresponding node and returned to the node, and then returned to the client.
  • Read-write separation weight Requests for the CKV version are distributed by CLB, so the read and write weights are averaged according to the quad of the TCP connection (source IP, source port, destination IP, destination port).