Century Mart’s Serverless Exploration during Double 11

Step up the digitalization of your business with Alibaba Cloud 2020 Double 11 Big Sale! Get new user coupons and explore over 16 free trials, 30+ bestselling products, and 6+ solutions for all your needs!

By Alibaba Cloud Serverless

Century Mart, a brand of Hangzhou Lianhua Huashang Group Co., Ltd, has recently ushered in the annual Double 11 global shopping festival with its own set of promotional offers and activities.

Back in 2014, Alipay and several offline brands and shopping malls in Hangzhou jointly launched a 50% discount promotion in conjunction of the “Double 12” event on December 12. The author also experienced this consumption carnival as a consumer. At that time, customers in the Century Mart store in Binjiang District, Hangzhou, had to wait in long lines to check out due to a point of sale (POS) payment system failure caused by a server exception. Six years later, in the exact same store, there were no long queues despite having large crowds of customers as before.

Evolution of Technical Architecture

2014 and Before: Difficulties of a Physical Single-Machine Architecture

The greatest advantage of this architecture is that it is not affected by network quality. Because of this, the stability of a single store can be ensured as much as possible as the network infrastructure was not perfected at that time. However, the biggest problem is that when the machine fails, it is difficult for professional technicians to repair it in time. This means that this approach is susceptible to failures when executed frequently and in large amounts.

During the Double 12 in 2014, payment machines in many stores could not cope with the unexpected boom in customer traffic. What’s worse, it was impossible to repair all machines in different locations at a short time. This situation forced Century Mart to improve its decade-old system.

2014–2018: Evolution of Central Computer Room Architecture

Compared with the architecture before 2014, the new architecture mainly addresses the following issues:

  • Problems can be fixed in a centralized manner;
  • Commodity and price adjustment are processed through the network;
  • Data can be centrally queried and counted.

However, there are some critical problems of the new architecture:

  • Managers need to master details of all machines;
  • Downtime and network disconnection may occur during O&M, causing difficulties in check and weakness of emergency solutions.

2018 — Mid-2019: All-round Cloud Migration

However, facing rapid business expansion, Century Mart needed to cope with the increasing demand for database query and writing. In mid-2019, even with 16-core 32-G cloud-based MySQL databases, request latency became very high and user experience was seriously affected. Century Mart begun exploring new architectures to figure out the way of creating more usable business systems with simpler architectures.

Mid-2019 — Double 11 in 2019: Exploration and Practice of Serverless

During the exploration of Serverless, Century Mart occasionally came into contact with Alibaba Cloud Function Compute (FC). After intense testing and verification, it found that the excellent performance of FC is very consistent with Century Mart’s highly flexible member query system.

Since July 2019, Century Mart has completed the migration of all copies and mirroring of original member data to Alibaba Cloud Tablestore in less than three months. In addition, migration of all channel providers’ APIs to Alibaba Cloud API Gateway has been completed for distribution. All computing services for member query have also migrated to Alibaba Cloud FC.

During the 2019 Double 11, Alibaba Cloud FC and Tablestore provided excellent performance as the computing and storage module. They helped Century Mart handle business events during Double 11. Services that did not adopt Serverless had some exceptions due to insufficient estimation.

Advantages of Using Serverless:

  • Simple O&M and management. Functions can be deployed and updated with one click so that there is no need to understand the network distribution architecture. The deployment process is simpler. Ordinary R&D personnel are able to operate functions without requiring special personnel.
  • It is no longer necessary to allocated budget in advance. Users are charged according to resources used, which greatly solves communication troubles between technology and finance departments.
  • In flash sales scenarios, there are significant request peaks and troughs. With Serverless, there is no need to prepare a large number of machines, resulting in great cost savings.

Drawbacks of Using Serverless:

The performance of Serverless during Double 11 inspired the tech experts at Century Mart. After successfully supporting its promotional activities, Century Mart soon announced that it would fully adopt Alibaba Cloud FC and Tablestore in all businesses.

2020 Double 11: Alibaba Cloud FC 2.0 and Full Embrace of Serverless

After the test of offline scenarios in the past, Century Mart has implemented the migration of channel providers’ business to FC 2.0 from ECS. Online transaction, timed coupons, and flash sales of its “Jingxuan App” are also migrated to FC 2.0. After enabling the reservation mode and single-instance multi-concurrency mode, Century Mart has successfully handled peak traffic requests dozens of times of that at ordinary times.

Cloud migration of all data and business relieves the psychological pressure on developers and the workload as well. “Alibaba Cloud FC saved a lot of work for our team.” Alibaba Cloud FC is a fully-managed event-driven computing service. “We do not need to manage infrastructure like servers. As long as we write and upload code, the system will prepare computing resources. It also provides features such as log query, performance monitoring, and alarm. In the past, our technical team couldn’t sleep when supermarkets were engaged in Double 11 promotion. No one could be rest assured about scaling machines to support such a large amount of traffic and business. Now Alibaba Cloud handles the scaling issues, and their capabilities are far above our reserve capacity limit.”

Food for Thought: Why do Traditional Enterprises Need to Pay More Attention to Serverless?

In the recent CNCF Serverless Research Report , Alibaba Cloud FC topped the list with 46% of the total share. According to the report, a large number of Chinese developers are performing migration of their traditional architectures to Serverless architecture.

During the epidemic this year, online education has become an indispensable part for students. Function Compute has provided powerful computing power for many enterprises, and helped them become leading online education enterprises in China by video transcoding.

In addition to Internet enterprises like Sina Weibo, Mango TV, and Shimo, more and more traditional enterprises are contacting with, exploring, and using Function Compute in large scale in the past year.

Why do traditional enterprises pay more attention to Serverless, as most of elite professionals preferring Internet companies? In fact, traditional enterprises often have to deal with technical architecture reconstruction when facing cloud migration of data and a wider range of users. However, the reconstruction of technical architecture usually requires strategical understanding about business development. Therefore, architecture reconstruction requires not only computer technical personnel, but also years of polishing of basic technologies, software and hardware, and business knowledge reserves. At this point, the hardships of Century Mart have highlighted this contradiction.

However, Serverless erases the deficiencies of R&D personnel in budget and O&M experience. It allows common R&D personnel to easily manage architecture against business peaks. Serverless greatly lowers the technology R&D threshold, and greatly improves R&D efficiency. With available tools such as online warning and traffic observation, Serverless facilitates R&D of common technologies without O&M, providing developers with technical benefits.

Original Source:

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