In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail the advantages of redis separation of reading and writing. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Advantages of Redis read-write separation
Transparent and compatible
Read-write separation is the same as ordinary cluster specifications, both use redis-proxy for request forwarding, and there are certain restrictions on the use of multi-shard, but read-write separation from master-slave upgrade single-shard, or from cluster to multi-shard read-write separation cluster can be fully compatible.
When the user establishes a connection with redis-proxy, redis-proxy will identify whether the request sent by the client connection is read or written, and then load balance the request according to weight, forward the request to different DB nodes at the backend, forward the write request to master, and forward the read operation to read-only replica (master also provides read by default, which can be controlled by weight).
Users only need to purchase instances with read-write separation specifications and use any client directly. The business can begin to enjoy the huge performance improvement brought by the read-write separation service without any modification, and the access cost is almost zero.
High availability
The High availability Module (HA) monitors the health status of all DB nodes to protect the availability of the entire instance. Master automatically switches to the new master when it goes down. If a read-only replica goes down, the HA can sense it in time, and then build a new read-only replica and offline the downtime node.
In addition to HA, redis-proxy can also perceive the state of each read-only replica in real time. During a read-only replica exception, redis-proxy will automatically reduce the weight of this node. If it is found that a read-only replica fails more than a certain number of times, it will temporarily block the exception node until the exception disappears before returning to its normal weight.
Redis-proxy and HA work together to minimize business perception of back-end exceptions and improve service availability.
High performance
For business scenarios that read more and write less, it is often not the most appropriate solution to use the cluster version directly. Now read-write separation provides more options. Businesses can choose the most appropriate specification according to the scenario and make full use of the resources of each read-only replica.
At present, single shard sells 1 master + 1-3-5 read-only replica with multiple specifications (if there is a greater demand, you can submit a ticket for feedback), providing 600000 QPS and 192 MB/s service capacity, breaking the resource limit of a single machine while fully compatible with all commands.
In the future, the specification limit will be removed, allowing users to freely increase or decrease the number of read-only replica at any time according to business traffic.
So much for sharing the advantages of redis reading and writing separation. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.