Improving Business Efficiency by 38.89% on Double 11 with Serverless Technology

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

Last year, Taobao started adopting serverless for the Double 11 shopping festival and achieved amazing results; and now Alibaba has gradually applied serverless technology to all aspects of the frontend. In this article, we will explain how the serverless technology used in the 2020 Double 11 can help you scale your business in core scenarios.

Node.js Serverless

In terms of business value, Node.js Serverless supports the “cloud all-in-one” (云端一体 in Chinese) development model, and delivers an average efficiency improvement of 38.89%. This year, Alibaba relied on the convenience and reliability of Alibaba Cloud Function Compute to quickly apply SSR technology on the landing pages of Taobao, Tmall, and Flying Pig to improve the user experience of these pages. In terms of operation and maintenance, we focused on optimizing the rush state and daily state process to reduce developers’ effort by about 50% when dealing with higher QPS scale. In terms of R&D experience, we built a solution system to reduce the difficulty of R&D and support outsourcing for fast entry.

In the following sections, we will introduce our development solutions and experiences from Double 11, as well as from our daily projects, and provide some real cases of Node.js Serverless based on Alibaba Cloud Function Compute.

Path of Discovery

Midway Serverless Framework

Midway Serverless is a serverless-oriented solution that includes a framework, a runtime, a toolchain, and configuration specifications.

In the framework design process, we focused on the following aspects.

1. Multi-platform adaptability

  • Midway Serverless provides the ability to adapt to different cloud platforms and provides the ability to migrate and replace serverless cloud platforms to prevent platform lock-in.
  • Provides traditional application mode and serverless mode, with the ability to migrate to each other for downgrading and capacity upgrades.

2. Application layer that is easier to maintain and scale

  • Uses Typescript as the base language, defines base classes, and facilitates customization by upper-level application developers.
  • Commonly used plug-ins and plug-in systems are provided.
  • Provide basic functions such as problem solving and performance optimization.

3. Openness for different business scenarios

  • It provides a basic upper-level interface to meet the needs of different developers for customized development based on different business scenarios.

Rapid Trial and Error, Highly Available R&D Model

In terms of the release platform, we built a code cloud by streamlining the release chain, and finally compress the hot-loaded codes into packages. At function runtime, we used hot scheduling mode to speed up the function start time.

Solution Creation

Model-driven, function-based programming

The technical implementation level is mainly categorized into:

  • Data Link Design
  • Operator Panel Design
  • Code Generation Solutions

The so-called data link design mainly defines DSL by design, which provides structured storage of data sources, models, fields, access parameters, and code fragments.

For example, code fragments are defined as follows.

Operator panel design mainly functions logic programming, as shown below:

FaaS code generation logic:

Stability

Provide unitized security

Advantages of unitization:

  1. Just like changing tires while the vehicle is running at high speed, the frame upgrade can be done in one unit of grayscale.
  2. When a problem occurs in a single unit, you can switch to another unit to provide services.
  3. Performance evaluation can be performed on a single unit.

Monitoring Security

This allows our service teams to focus only on the QPS and success rate of their own business functions. If the success rate drops, or QPS drops, the team will be alerted via IM, SMS or phone.

The following chart shows the daily QPS changes for a function.

Setting up multiple scenarios in advance

When monitoring alarms occur at any point in the process, a reasonable response can be made.

Flow Limit

This year, we were able to squeeze in more CPU consumption at the container level while maintaining the same QPS, which is twice as much as last year.

Best Practice

The upgrades to the development model in 2.2 allow developers to quickly choose from a wide range of common solutions and respond quickly to business needs to produce front-end features that meet business scenarios. Ultimately, the Double 11 virtual venue can realize a wide variety of scenarios with the functionality provided by frontend developers.

SSR: Enabling Double 11 Sessions in Seconds

With SSR server-side rendering + Serverless model, frontend developers can further improve the user experience by optimizing the front and backend together. It helped the Double 11 branch session to significantly improve the page opening speed and also improved the business conversion.

Efficient development of the middle and back-end

  • Front and back-end integrated development, go-live, operation and maintenance; efficient development and deployment go-live
  • No need to focus on things like servers, domain name applications, etc., users can just focus on business
  • Solve long-tail application server cost problems and control the middle and backend lifecycle appropriately.

Summary

We strive to validate our serverless product through continuous practice. By combining Alibaba Cloud Function Compute with the Midway Serverless framework, we can offer our front-end solutions to users and get more people using serverless technology to create the ultimate “cloud-integrated” experience.

Original Source:

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