Redis 3.0.0 stable发布了,最引入注目的特性可能就是cluster了。
对很多早已使用Twemproxy的项目,这个特性有什么特殊意义吗?
或者说,Redis cluster相比Twemproxy有什么优势?
阿神2017-04-22 09:01:57
They are all solutions for Redis distributed clusters. I just saw an article pushed by InfoQ through WeChat at noon - "Best Practices for Efficient Operation and Maintenance (03): Redis Cluster Technology and Codis Practice", which is quite detailed. Targetedly, it improves the "heavy" nature of Redis Cluster and also points out the shortcomings of twemproxy. Unfortunately, this article was not found on the InfoQ website. I don’t know if it was not updated in time, so I cannot post the link. You can follow it.
ringa_lee2017-04-22 09:01:57
Let’s talk about a few problems with twemproxy, and you will know the advantages of redis cluster
(1) Fully asynchronous implementation, more complicated to understand
(2) The cheating auto_eject_hosts
(3) Dynamic addition of server is not supported
(4) mget will be automatically split, affecting performance
PHP中文网2017-04-22 09:01:57
Redis cluster updates the client's node routing rules through communication between the client and the server, and between the server and the server, ensuring that the client's requests are always sent to the correct server node. In most cases, the client to the server only needs One communication.
And Twemproxy acts as a proxy to distribute requests to nodes, with an additional layer of communication in the middle.
Theoretically speaking, redis cluster performance is efficient.
Of course, the implementation is much more complicated and needs to be tested in practice.
Personally, I think the redis cluster method will be the mainstream in the future.