13. The production environment is how redis deployed?

Author: Chinese Shi Shan

Interview questions

Production environment redis is how to deploy?

Interviewer psychological analysis

See if you do not know understand your company's deployment architecture redis production cluster, if you do not understand, then really you are very remiss, your redis master-slave architecture? Cluster architecture? Which cluster with the program? There is no guarantee availability to do? There is no open persistence mechanism to ensure that data can be restored? Redis line to memory a few G's? What are the parameters set? You redis clusters after pressure measured how much QPS carrying?

Brothers, these children you have to be clear of the door, or you really do not ponder too.

Face questions analysis

redis cluster, 10 machine, 5 main machines deployed redis example, additional 5 machines deployed from the redis example, each linked to a primary instance from example, five nodes provide external reader service, each node qps peak read and write may be up to 50,000 per second, up to five machines is 250,000 read and write requests / s.

What machine configuration? 32G memory + 8-core CPU + 1T disk, but the process is assigned to redis 10g memory, general production line, redis memory as not more than 10g, more than 10g can be problematic.

5 machines provide external reading and writing, a total of 50g memory.

Because each of the main examples are hung from an instance, it is highly available, any one of the primary instance of downtime will automatically failover, redis will automatically become the primary instance from the instance to continue to provide literacy services.

You write to the memory of what data? Each data size is how much? Product data, each data is 10kb. 100 data 1mb, 10 million data is 1g. Permanent memory is 2 million product data, take up memory is 20g, 50% less than the total memory only. Currently the peak of the volume of requests per second is about 3500.

In fact, large companies, there will be infrastructure team responsible for the operation and maintenance cache cluster.

Guess you like

Origin www.cnblogs.com/morganlin/p/11980486.html