By Alibaba Cloud database team
Leci is an word memorization and vocabulary development app developed by New Oriental Education & Technology Group Inc.. The app covers a wide range of vocabulary levels, including high school, IELTS, TOEFL, GRE, and SAT. The main features of Leci include scientific planning for word roots memorization, authoritative and detailed word definitions, and a complete video teaching system. In this article, we will look at how New Oriental Education supports its wide user base by using Alibaba Cloud Tair (Redis® OSS-Compatible) in their architecture.
The Leci system has more than 100,000 daily active users. In order to provide users with stable and reliable services, we are facing with high requirements on the availability of our system. Redis®*, a currently popular Key-Value NoSQL storage component in the industry can help us solve this technical challenge.
We are a startup. We build our own systems, and we do the O&M on ourselves. This means large initial investment and high O&M costs. With the growing business scale, the horizontal and vertical resource scaling problems will become our unavoidable pain points in the future. Therefore, we have been trying our best to build our systems using third-party services. When choosing technical components of basic services, our primary expectations are stability, reliability, ease of build, elastic scaling, and light O&M, which are significant for smooth and stable business implementation. Finally, we chose Alibaba Cloud's Tair (Redis® OSS-Compatible) to replace our self-built database.
Alibaba Cloud Tair (Redis® OSS-Compatible) high availability architecture diagram (standard version - dual-node):
We use the 8 GB Master/Slave version (advanced) instances. Running under a single thread mechanism, Redis® can achieve a maximum performance of about 100,000 QPS.
The caching layer for business services involves our core services, such as word book, user memorization method, notes, and group activities. The Cache-Aside mode allows the service program to maintain the cache logic by itself:
Read scenario: first reads data from the cache, retrieves data from the DB (if there is no hit in the cache), and then caches the data for future use.
Write scenario: first writes data to the DB, and then synchronizes the data to the cache (or possibly deletes the expired cache).
We use the Lock component of the Redisson framework (official recommendation of Redis®) to implement distributed locks. Its mechanism is to implement the lock logic by sending atomic lua (2.6 and later versions are now supported by Alibaba Cloud Tair (Redis® OSS-Compatible)) scripts to Redis®. The steps are:
We use the Guava Cache + Redis® solution to scale down our service resources. The basic logic is as follows:
Using Redis®' zset data structure to implement the word memorization group leaderboard is simple and efficient.
We use Delayed Queue of Redisson framework to implement delayed trigger execution of group sale results.
We have been using Alibaba Cloud Tair (Redis® OSS-Compatible) for more than a year. We have never encountered any serious data server problems, and the overall performance is relatively stable. Redis® has greatly reduced our O&M costs. The Alibaba Cloud technical team has also been providing strong technical support to our development team. When we have any technical problems, we can always get a prompt response. They have helped us troubleshoot many development problems. It turned out that we have made a wise choice.
Looking ahead, we can expect exponential growth of our data volume with the expansion of our business. We believe that Alibaba technologies will continue providing us with solid infrastructure service support.
Therefore, we will continue our cooperation with Alibaba Cloud. We will also give feedback on operational issues to the Alibaba Cloud technology community, to help the Alibaba Cloud technical team make better and better data products.
*Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd. Any use by Alibaba Cloud is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between Redis and Alibaba Cloud.
2,599 posts | 762 followers
FollowAlibaba Clouder - March 24, 2021
Alibaba Clouder - January 21, 2021
祎程 - August 22, 2024
Alibaba Clouder - February 14, 2020
Alibaba Cloud Community - March 25, 2022
Alibaba Clouder - November 27, 2017
2,599 posts | 762 followers
FollowA key value database service that offers in-memory caching and high-speed access to applications hosted on the cloud
Learn MoreSet up an all-in-one live shopping platform quickly and simply and bring the in-person shopping experience to online audiences through a fast and reliable global network
Learn MoreA financial-grade distributed relational database that features high stability, high scalability, and high performance.
Learn MoreA database engine fully compatible with Apache Cassandra with enterprise-level SLA assurance.
Learn MoreMore Posts by Alibaba Clouder