Other Redis issues

Source: Internet
Author: User
Tags redis server

How does Redis high concurrency client frequent time out? Now there are 500 million + requests per day on the business, usually redis operations in 2k+ per second or so. When the peak is 3k+, the client will frequently report the connect time out exception.
However, the data says that Redis can reach 10W per second. 3 k far from the W this level ah, do you have any suggestions to optimize the situation now? A: What is the number of Redis connections? Are you exceeding the limits of Max open files?

Direct top to see if Redis is running full CPU and so on.

There are also time-outs to configure how much and so on.

A: You can use the deployment environment described in your application, what kind of client, long connection or short connection, Redis is a single-machine environment or cluster environment, REDIS is configured to persist, what kind of persistence, and the Redis server hardware facilities, these described clearly and then analyze the reasons. A lot of Redis was recently used in a large-scale event, and the high concurrency simulations on the previous lines did appear to have problems like the main problem. There are two ways to fix this:
1. Server restrictions on TCP and HTTP (direct deny or timeout)
2.Redis limit on concurrency (maxclients parameter, Once the limit is reached Redis would close all the new connections sending an error ' Max Numbe R of clients reached '.)

By the right, my platform is Windows+.net+redis (ServiceStack)

Single Thread properties for Redis

Redis uses a single-threaded design, which means that a single thread serves all client requests, using a reusable technique. In this case, Redis can process a single request at any time, so all requests are processed sequentially. This is like the way node. JS works, and all outputs usually don't feel slow, because the time to process a single request is very short, but most importantly, these products are designed to be non-blocking system calls, such as reading or writing data from a socket.

I mentioned that Redis is almost single-threaded from version 2.4, and we use threads to run some inefficient I/O operations in the background, primarily related to hard disk I/O, but this does not change the fact that Redis uses single-threaded processing for all requests.

Summary: Is reids itself performance no problem, processing concurrency ability OK, is cross-server remote access to other servers reids, concurrency, network delay, etc., will appear to take Reids card dead.

Other Redis issues

Related Article

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.