Cloud Computing 13 min read

How Alibaba’s Midway‑FaaS Redefines Serverless Architecture for Frontend Teams

This article explains how Alibaba’s internal Midway‑FaaS framework evolves serverless function architecture by addressing vendor lock‑in, enhancing flexibility, improving development efficiency with TypeScript, and extending runtime capabilities, all while enabling multi‑cloud deployment and cost‑effective operations.

Alibaba Terminal Technology
Alibaba Terminal Technology
Alibaba Terminal Technology
How Alibaba’s Midway‑FaaS Redefines Serverless Architecture for Frontend Teams

Serverless Function Application Architecture Upgrade

The D2 talk titled “Serverless Function Application Architecture Upgrade” describes how Alibaba’s internal Midway‑FaaS framework was extracted step‑by‑step from legacy systems, endowed with core capabilities, and used to solve user demands.

Community Background

Major cloud providers (Amazon, Microsoft, Google, Alibaba Cloud, Tencent Cloud) all offer function services with differing standards and conventions, making cross‑platform selection and migration challenging.

Benefits of Serverless

Serverless offers faster development cycles, secure isolation, pay‑per‑use billing, and elastic instances that eliminate the need for capacity planning.

Preventing Vendor Lock‑In

Because FaaS lacks mature standards, parameter signatures differ (e.g., req, res, context vs event, context, callback). The solution is to standardize serverless.yml configurations and unify request/response handling via a common FaaSContext interface.

Flexibility

Functions can be combined or split dynamically, enabling high‑density deployment without code changes—only yml adjustments are needed. This supports horizontal and vertical scaling and cost optimization.

Development Efficiency

By introducing TypeScript features and defining interfaces such as FaaSContext, the framework improves maintainability and developer experience. The Midway‑FaaS framework builds on IoC, decorators, and class‑based models, extending the existing Midway ecosystem.

Runtime Extension

A lifecycle consisting of RuntimeStart, FunctionStart, Invoke, and Close with before/after hooks is provided. The underlying runtime‑engine manages this lifecycle, while LightRuntime offers a lightweight implementation across platforms. Reusable Layer components add capabilities such as monitoring and metrics.

Adoption and Future Plans

The solution has been used to migrate Alibaba’s Taobao guide business to a serverless model and is being rolled out to other business units. The code is open‑sourced on GitHub, currently in public beta, with a planned v1.0 release in January.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

FaaSServerlessTypeScriptmulti-cloudMidway
Alibaba Terminal Technology
Written by

Alibaba Terminal Technology

Official public account of Alibaba Terminal

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.