Font Size: a A A

Design And Implementation Of High Concurrency Applications Based On Redis

Posted on:2017-03-29Degree:MasterType:Thesis
Country:ChinaCandidate:J Z XuFull Text:PDF
GTID:2348330488468563Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In recent years, with the booming of various Internet applications such as Internet finance, O2 O and e-commerce, Internet has become an ubiquity in people's everyday life, and the frequency of online interaction is also on the rise. Faced with the massive amount of concurrent access generated by a huge number of Internet users and frequent network interactions, various Internet applications are stressed under increasing load pressure. How to quickly and effectively respond to the massively concurrent requests has become an important research topic of Internet applications. The caching technology solution has drawn extensive attention from the Internet applications due to its low cost and high read-write speed.This paper first analyzes the characteristics of the “Red Envelope” application, and elaborates the problems existing in the current process flow of allocating red envelopes. It is required to identify the users' authentication in the process of allocating red envelopes, in order to avoid the situation that same user is allocated with many red envelopes in the same batch. What's more, thread synchronization mode must be applied for the function module of authentication of users in the program design due to its speciality, so as to ensure that user authentication will be effectively identified. However, the thread synchronization mode leads to low processing efficiency of allocating red envelopes at present. This paper has studied the said problem from the two aspects- thread synchronization and channel expansion, and puts forward that the key to address high-concurrency red envelope application lied in designing a user filtering engine without thread synchronization, through which all the users could be steered to different channels to get red envelopes. From the system test results, we can see that the multi-channel processing mechanism of user filtering engine proposed by this paper is effective.Secondly, Redis caching technology is used in this paper to totally cache all the red envelope information(including unallocated red envelope information and allocated red envelope information) into the memory, greatly improving the read-write speed of the red envelope information through memory read-write mechanism. Meanwhile, combined with consistent hashing technology, the design of user filter engine is completed, and the channel narrowin g problem of allocating red envelopes caused by thread synchronization is avoided. Thus, an extensible multi-channel processing mechanism to allocate red envelopes is built, significantly increasing the efficiency of highly concurrent processing of the app lication system.Finally, the effectiveness of the highly concurrent application design of allocating red envelopes based on Redis is verified through detailed system implementation, test and analysis. After adopting user filtering engine, the test of allocating red envelopes has been carried out in three-channel thread synchronization mode. The result turns out that the system is able to allocate 26,900 red envelopes per second, fully meeting the demands of most application s of red envelope. Therefore, this application has significant scientific and engineering value, and applicable to the professional applications of massive data processing with high concurrency.
Keywords/Search Tags:Redis, High concurrency, Red envelope application, User filtering
PDF Full Text Request
Related items