当前位置:网站首页>Taoist friend, what is the relationship between your use of redis in the project and the three Virgin Mary?

Taoist friend, what is the relationship between your use of redis in the project and the three Virgin Mary?

2022-06-09 12:42:00 Hua Weiyun

Confused Taoist : well , Zouyang, I heard that you are working on a product called " Insight psychic analysis system " Products , And introduced Redis Middleware ?

Zuoyang : Yeah , Do introduce Redis 了

Confused Taoist : Oh , Can you tell me what makes you use Redis Well ? introduce Redis Any good ?

Zuoyang : Why do I use Redis Well ?

Our system has more monthly statistics , Quarterly statistics are needed Mysql Associate seven or eight tables and it takes hundreds of milliseconds or even seconds to find out, and then find out the data that will not change for a long time , Users need to check every request Mysql Wait a long time to respond to the data , In this case, users would have been furious .

 picture

 

It's OK for users to get angry , So how to deal with it ? throw Redis In the cache , One Key, One Value, The next time you have a user request, just look at Redis Is there any , If you have one, don't go to the database . The user initiates a request , Crack , Data is returned in two milliseconds . This is why I use Redis, High performance , Ah, silky .

 picture

 

Zuoyang : introduce Redis What are the benefits ?

 picture

 

This is not recent 【 Three virgin 】 And her son 【 Aloe 】 to " Insight psychic analysis system " Did you speak for me , As a result, our daily living users have 2 More than ten thousand immortals have exploded to 20 Myriad Immortals , Lead to business peak QPS By per second 1000 Up to... Per second 10000, Frequent business queries Mysql, Many times he could not bear the pressure and became autistic .


 picture

 

By 【 Three virgin 】 On xianbo diss after , We learned from the bitter experience and thought about how to rectify it ? At this time, Zuo Yang thought of the above mentioned Redis, The left sheep is testing Redis I found that it can resist 7 Wan to 9 Million per second QPS, So we hit all of them to Mysql Your query request goes to Redis On , It is used to resist the influx of a large number of requests into the system to ensure its availability when the current scenario is highly concurrent . This is it. Redis High concurrency use of , Feel well ~


 picture

 

Confused Taoist : ah ! Learning is never too old ~

原网站

版权声明
本文为[Hua Weiyun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206091151288129.html