Alibaba Cloud ApsaraDB for Redis Case Study: New Oriental Education

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.

New Oriental Education’s Leci System

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 ApsaraDB for Redis Advantages

Elastic Resizing

Data Security

High Availability

Alibaba Cloud Redis high availability architecture diagram (standard version — dual-node):

Low R&D and O&M Costs

Reliable Performance

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.

Application Scenarios

Caching Layer for Services

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).

Implementation of Distributed Locks for Group Sales and Other Services

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:

Service Configuration Information Storage

We use the Guava Cache + Redis solution to scale down our service resources. The basic logic is as follows:

Word Memorization Group Leaderboard

Using Redis’ zset data structure to implement the word memorization group leaderboard is simple and efficient.

Implementation of Delayed Message Queues

We use Delayed Queue of Redisson framework to implement delayed trigger execution of group sale results.

Current Usage Statistics


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.


Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website: