Alibaba Cloud ApsaraDB for Redis Case Study: New Oriental Education

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.

Alibaba Cloud ApsaraDB for Redis Advantages

Elastic Resizing

  1. One-click storage resizing: we can use the console to adjust the storage capacity of instances as needed.
  2. Online resizing without service interruption: The instance storage capacity can be resized online without stopping the service or affecting our business.

Data Security

  1. Persistent data storage: With memory + hard disk storage, ApsaraDB for Redis provides high-speed data read/write capability and meets the data persistence requirements.
  2. Master-slave dual-backup for data: All data is backed up both on master and slave nodes.
  3. Password authentication is supported to ensure secure and reliable access.
  4. The automatic backup function ensures higher data security, and allows us to set the backup cycle as needed.

High Availability

  1. We use the 8 GB Master/Slave version (advanced) instances, which adopt the dual-machine hot standby architecture. During system operation, data is synchronized between the master and slave nodes. If the master node fails, the system will automatically switch over to the slave node in seconds. The entire process is automatic without affecting your business. The master/slave architecture ensures the high availability of system services.
  2. Failover system (HA) independently developed by Alibaba Cloud: Alibaba Cloud’s Redis service includes the HA failover system. Whenever an exception is detected on the master node, this system immediately switches over to the slave node to ensure high service availability. This is an effective solution for disk I/O faults, CPU faults, and other problems that lead to service exceptions.
  3. Master/Slave replication mechanism: Alibaba Cloud has customized Redis’ master/slave replication mechanism by using an incremental log format to replicate and transmit data. Under this mechanism, interrupted master/slave replication has limited impact on system performance and stability, thereby avoiding the disadvantages of Redis’ native replication mechanism.
  4. Instance-level resource isolation provides enhanced stability for individual services.

Low R&D and O&M Costs

  1. Redis can be used immediately after purchase, which is convenient for rapid business deployment.
  2. Alibaba Cloud’s professional technical team provides strong online support. This greatly reduces intervention by our own technicians, as well as the costs.
  3. ApsaraDB for Redis provides second-level real-time monitoring and minute-level historical monitoring.
  4. It provides monitoring information for various data structures and interfaces, allowing you to easily monitor access and operations performed on your ApsaraDB for Redis instances.
  5. Redis has a visual management and monitoring panel. The console provides monitoring statistics for multiple metrics and allows us to conveniently manage ApsaraDB for Redis instances.

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:

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:

  1. Lock:
  1. Unlock:

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

  1. At present, we have 100,000+ daily active users. After using Redis, the average daily QPS is 5,000 in ordinary time, and the peak QPS can reach 10,000 (doubled during promotions). The operation is very stable.
  2. Alibaba Cloud Redis supports online instance capacity resizing without service interruption or affecting our business. This is very helpful for us to adapt to agile business changes.
  3. After using Alibaba Cloud Redis for data caching, the backend MySQL database has never had problems, such as congestion and bottlenecks. Besides, resource usage is relatively low, and the overall service performance has been increased by 50%.


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.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

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