About twemproxy and redis distributed

Source: Internet
Author: User
Why do we need to use twemproxy? For two reasons: 1redis is a single-threaded instance. To achieve multi-core benefits, only multiple instances can be implemented. data cannot be shared between instances, but sharding2 can only be used. If the data volume is too large, redis must be deployed in a distributed manner. sharding can be categorized into two reasons: how to deploy redis in a distributed manner. While redis

Why do we need to use twemproxy for two reasons: 1. redis is a single-threaded instance. To achieve multi-core benefits, only multiple instances can be implemented, and data cannot be shared between instances, only sharding 2. If the data volume is too large, redis must be deployed in a distributed manner. sharding can be used for two reasons: how to deploy redis in a distributed manner. While redis

Why use twemproxy?

For two reasons:

1. redis is a single-threaded instance. To achieve multi-core benefits, only multiple instances can be implemented. Hong Kong servers and instances cannot share data, but can only sharding.

2. If the data volume is too large, you must deploy redis in a distributed manner and use sharding.

There are two possible reasons: how to deploy redis in a distributed manner. Redis itself does not support distributed deployment. It only supports master-slave and Hong Kong servers. If the client directly operates redis, you must write sharding and node monitoring code at the application layer.

If twemproxy is used as the proxy, the client does not directly operate on redis but only accesses rwemproxy. sharding, node monitoring, and other troublesome work rwemproxy are all done for us. For us servers, you only need to configure them.

During project application, we may use redis as the data storage or cache. In the first case, we need to perform static ing in the configuration, in the second case, we allow automatic uninstallation of failed nodes and retry for a while. At this time, data may be written to another node, resulting in weak consistency.

Note: 1. twemproxy is also a single-threaded instance. In the production environment, you may need to start multiple instances to provide multi-core capabilities.

2. redis batch processing commands except mget and del are not supported, such as multiple set intersections.

3. Script eval is not supported.

4twemproxy cannot use slave nodes as an alternative solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.