What are the reasons for redis's high performance?

Source: Internet
Author: User

1. From the storage medium, its data is stored in the memory, which is quite fast. Similar to hashmap, it also exists in the memory.

2. The storage of set key values is very simple, which means fast.

3. reids are single-threaded and single-process. There is no resource competition problem, and multi-thread will have resource competition problems.

4. multiplexing. What is multiplexing? Multiple network connections, network requests, and a single thread are used to process many requests. Because they are single-threaded, when a large number of requests come, they are put in the list queue in order, first-Come requests are processed first, similar to the pipeline principle. Because it is operated in the memory, even a single thread will be very fast.

5. redis adopts the RESP protocol, which is called the simplest command.

Set age 5 --> Break this command into the following commands:

* 3 --> indicates that there are three groups.

$3 --> indicates the length of the first group.

Set --> indicates the specific command

$3 --> indicates the length of the second group.

Age --> specific commands

$1 --> third group Length

5 --> specific value or command

What are the reasons for redis's high performance?

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.