See How Alibaba Cloud Powered Some of China’s Best Classrooms in the Cloud

Image for post
Image for post

In order to win this inevitable battle and fight against COVID-19, we must work together and share our experiences around the world. Join us in the fight against the outbreak through the Global MediXchange for Combating COVID-19 (GMCC) program. Apply now at https://covid-19.alibabacloud.com/

By ApsaraDB.

Onion Academy, formerly known as Onion Mathematics, was established in late 2013. It is an online education company that specializes in K-12 education in Mainland China. Onion Academy courses are not entirely taught by real teachers. Instead, their systems are taught through an innovative system where students interact with Onion Academy’s online system, which is completely powered by artificial intelligence.

When the company was first established, Onion Academy decided to build their business system completely around the computing power and technologies provided by Alibaba Cloud. At that time, back in 2013, only a few Chinese enterprises had made the move to the cloud, making Onion Academy quite ahead of its time.

Image for post
Image for post

Onion Academy chose to partner with Alibaba Cloud as its cloud vendor. A few years ago, a special application scenario seriously affected the company’s online business, so to address this problem Onion Academy and Alibaba Cloud worked together to resolve the problem quickly. As part of their efforts, Alibaba Cloud database experts restarted and backed up Onion Academy’s systems.

Initially, Onion Academy provided mathematics and physics courses for junior high school students. However, as the company continued to grow, it began to offer Chinese and English courses as well. These courses, naturally, are different to mathematics and physics courses and therefore involve learning processes that are much different to those typically applied in math-based courses. In addition to using several infrastructure as a service product from Alibaba Cloud, such as Elastic Compute Service (ECS), Server Load Balancer (SLB), and ApsaraDB databases, Onion Academy worked hard to build new business applications on some new and emerging Alibaba Cloud products like its serverless containerization service Container Service for Kubernetes (ACK), as well as Log Service, Realtime Compute, and Application Real-Time Monitoring Service (ARMS). Through these products, Onion Academy was able to address their increasingly complex and diverse business needs.

Today, Onion Academy offers a full range of courses for elementary, middle school, and high school students, providing 24-hour online cloud classrooms for more than 1.3 million teachers and over 36 million students.

How Onion Academy Geared up Its Systems during the COVID-19 Epidemic

This year, Onion Academy’s system was abruptly faced with an unprecedented demand due to school closures connected to the COVID-19 epidemic. However, thanks to the elastic services provided by Alibaba Cloud, Onion Academy’s systems remained as strong as a rock.

With school closures due to the COVID-19 outbreak, more than 7 million students and 350 thousand teachers started to use the Onion Academy app to study and teach online. So, what measures did Onion Academy take to be able to cope with the sudden rise in traffic during the epidemic?

Starting some three years ago, Onion Academy began their transition to the serverless and microservices architecture to split and decouple their original complex and monolithic architecture systems. At the same time, they also adopted container technology and migrated from Swarm to Alibaba Cloud’s Container Service for Kubernetes. Originally, each module corresponded to a set of ECS and SLB instances. However, as microservices at Onion Academy became more specialized, there was a rapid increase in resource waste and scheduling complexity. Container Service for Kubernetes can allocate resources more rationally based on the configuration requirements of different modules and automatically scale containers according to defined rules. This is useful as it avoids complicated scheduling and maintenance. Drawing on these strong technical capabilities, Onion Academy also made several optimizations and upgrades of their own.

When the schools were closed this year due to the epidemic in China, most students would study online at the same time. In the face of high traffic volume and highly concurrent access, Onion Academy needed to ensure the stability of its online business. To do this, Onion Academy integrated Container Service for Kubernetes with its existing ApsaraDB database systems. This allowed for quick and smooth scaling of the business without changing the application itself.

Alibaba Cloud Container Service for Kubernetes can expand the underlying resources within minutes, allowing a business to quickly deploy thousands of application instances. At the recommendation of the Alibaba Cloud Container Service team, Onion Academy further optimized the overall ECS configuration by replacing a large number of small ECS instances with a large ECS instance with 30 to 50 CPU cores. This allowed for a easy expansion capacity of 10 times over and for a simplification of O&M and management work.

Taking Full Advantage of Containerization Technology

With brick-and-mortar schools closed, students would likely still follow their regular routines and go online all around the same time. This meant that online learning platforms like Onion Academy would need to prepare for huge traffic volumes and highly concurrent access. To ready their systems, Onion Academy integrated Alibaba Cloud Container Service for Kubernetes and several ApsaraDB database engines. This allowed Onion Academy to quickly and smoothly scale the business without changing the application itself. Alibaba Cloud Container Service can elastically and intelligently expand the underlying resources within minutes, allowing a business to quickly deploy thousands of application instances.

At the recommendation of the Container Service team, Onion Academy further optimized their overall ECS configuration by replacing a large number of small ECS instances with a large ECS instance with 30 to 50 CPU cores. This allowed for a expansion capacity that was 10 times greater than their original expansion capacity.

Upgrading Their Database Management Systems

Next, to ensure the overall stability and “smoothness” of Onion Academy’s underlying platform, Alibaba Cloud provided a comprehensive architectural solution for Onion Academy. At the database layer, ApsaraDB for Redis provides high-speed caching, whereas the combination of ApsaraDB RDS for PostgreSQL and ApsaraDB for MongoDB provides persistent storage. At the application layer, the team adopted modified microservices and containerized deployment. This architecture gave Onion Academy the core capabilities needed to be able to tackle face on the new challenges they faced with more students and teacher logging on.

Onion Academy also optimized the data connected with cold users and its cold and hot data systems. Faced with too many cold users, the company urgently needed to improve cold user processing. This required faster data processing under high pressure. The homework data of teachers and students can be divided into hot and cold data. Data was originally migrated at regular intervals, but the hot data was growing too fast and the original solution could not cope. At the recommendation of Alibaba Cloud data experts, Onion Academy added a cold user cache, upgraded and sharded their databases, and made a series of indexing optimizations and statement modifications.

Next, in the face of the epidemic, Onion Academy upgraded the capacity of dozens of core databases and upgraded to PG-class instances overnight. This was possible due to the extreme elasticity and seamless upgrade and expansion capabilities of Alibaba Cloud database management systems. A single ApsaraDB for Redis cluster can handle tens of millions of access requests with ultra-high performance. This ensures that no business bottleneck occurs even if the traffic multiples dozens of times over. At the same time, the persistent storage provided by ApsaraDB RDS for PostgreSQL and ApsaraDB for MongoDB offered stronger processing capabilities. This solution can cope with complex queries and also allows for extremely elastic horizontal scaling. This provided comprehensive assurance to Onion Academy business operations and ensuring business stability even if its business volume increases by 1000 fold.

Improving Their Monitoring Systems and Fault Detection

Originally, in Onion Academy’s systems, only the scheduled scanning of faulty nodes was supported based on load balancing, and the team of engineers could not promptly identify exceptions. Now, with Container Service Kubernetes, Onion has its own disaster recovery and error detection mechanisms, which allow automatic failover between pods within containers. This greatly reduced the time required for problem discovery. Meanwhile, with Alibaba Cloud CloudMonitor, ARMS Prometheus, ARMS frontend monitoring, as well as Log Service, Onion can monitor cloud resources, container clusters, container nodes, pods, and other metrics in an effective and accurate way, so that, when cluster statuses change, or when pods are created, pulled, or deleted, or when component exceptions occur, an alarm can be automatically triggered, so that faults can be resolved quickly.

In response to massive school closures due to the COVID-19 epidemic, Onion Academy, as a leader in the K-12 online education sector in China, opened up all its core course resources to teachers and students all over Mainland China free of charge. During this period, the number of students who visited the school’s online platform hit record highs each and every day. But, with adopting Alibaba Cloud’s new and improved solution, Onion could handle this huge increase without fail, and the system resource utilization rate had improved by a whopping 60%. And, with the new monitoring systems working in combination with each other, when problems occurred, they could be quickly detected and isolated, so to keep Onion’s classes online and running. — By Li Nuo, the Co-founder and CTO of Onion Academy.

While continuing to wage war against the worldwide outbreak, Alibaba Cloud will play its part and will do all it can to help others in their battles with the coronavirus. Learn how we can support your business continuity at https://www.alibabacloud.com/campaign/supports-your-business-anytime

Original Source:

Written by

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

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