The difference between the Redis cache and the non-go cache TPS is significantly different.

Source: Internet
Author: User
Tags redis

Interface processing logic: Get weather forecast information, 1500 City weather: The first time the program processing, will first determine whether the Redis key exists, if there is, directly return the corresponding data; if there is no key, read the MySQL corresponding table data, cache the data to Redis, and return the data     If the second time in the access to the same data, go directly redis get the corresponding data. Compare the MySQL and Redis processing performance of the business:

Break off Redis service, do not go redis, go MySQL fetch data, 1000 concurrent pressure test 5 minutes Result:

avg=2.86s,tps=312, as shown in figure:

Start Redis service, get Redis data, walk Redis cache, 1000 concurrent 5 minutes result of pressure test:

Avg=0.4s,tps=2033, as shown in figure:

Conclusion: Similarly, the same business configuration and the pressure test scheme, go redis cache, improve performance, TPS from 312 to 2033,

Avg dropped from 2.86S to 0.4S

Other: Get the exchange rate interface, the same conclusion, as shown in figure:

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.