By Alibaba Cloud ApsaraDB
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 ApsaraDB for Redis 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 ApsaraDB for Redis to replace our self-built database.
Alibaba Cloud Redis 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 Redis) 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 Redis 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.
Alibaba Clouder - April 6, 2021
Alibaba Clouder - April 1, 2020
ApsaraDB - March 12, 2020
ApsaraDB - April 28, 2020
Alibaba Clouder - March 24, 2021
ApsaraDB - April 17, 2019
A key value database service that offers in-memory caching and high-speed access to applications hosted on the cloudLearn More
Set 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 networkLearn More
Alibaba Cloud e-commerce solutions offer a suite of cloud computing and big data services.Learn More
A financial-grade distributed relational database that features high stability, high scalability, and high performance.Learn More
More Posts by Alibaba Clouder