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

The author of this blog had the chance to interview technical experts from Century Mart to learn about the difficulties it experienced during the evolution of its technical architecture.

At that time, all POS machines and payment machines with membership cards were deployed in various stores. This architecture has been used for nearly 10 years.

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.

After experiencing difficulties during Double 12 in 2014, tech experts of Century Mart decided to improve all systems. The transaction system and membership system were successively migrated to the self-built physical central computer room. The commodity system was also migrated to a central distribution machine. POS machines were deployed in stores in Zhejiang, connecting to the central computer room through the Internet.

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.

With the further development of public cloud construction in China, Century Mart also begins to fully adopt Alibaba Cloud products for local business migration to Alibaba Cloud ECS as well as ApsaraDB for MySQL. By adopting a cloud architecture, Century Mart was able to handle large events without major disruptions such as downtime and network disconnection of computing nodes.

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.

With the continuous development of its online business, Century Mart’s business volume continues to expand. After experiencing the database incident in mid-2019, Century Mart started to use Alibaba Cloud Tablestore as it is suitable for its own elastic business. The reason is that with Table Store, there is no need to purchase additional ECS instances to cope with large amounts of data. The tech experts at Century Mart were optimistic with this approach because it is difficult to calculate the precise volume of customer traffic during large events, making it difficult to figure out how many machines are needed.

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.

  • Instantaneous elastic scaling without human intervention eliminates availability problems of services due to traffic bursts.
  • 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.
  • Due to high cold start latency, user experience of some requests is terrible. This is a common problem encountered by Serverless developers at that time.

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

In the second half of 2019, Alibaba Cloud launched FC 2.0, which supports reservation mode and comprehensively solves high cold start latency. FC 2.0 also supports multiple requests for single instance, as well as calls of high-I/O and high-concurrency requests for some instances. In addition, FC 2.0 supports customized runtime and one-click migration of traditional Web servers. The launch of FC 2.0 represents its significant application improvement in both business and scale.

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?

The year 2020 marked a significant year for Serverless technology in China. To reduce R&D costs and improve O&M efficiency, more and more enterprises have begun to adopt Serverless as their basic R&D infrastructure for vigorous development of their business.

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.

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