Cloud Native 11 min read

How to Build Cloud‑Native Modern Web Apps with Serverless Function Compute

This article explains how front‑end engineers can transition from traditional static‑site deployment to fully cloud‑native web applications by leveraging Alibaba Cloud’s Serverless services—OSS, CDN, and Function Compute—to achieve automatic scaling, zero‑ops maintenance, cost efficiency, and enhanced security for dynamic APIs, tasks, and media processing.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
How to Build Cloud‑Native Modern Web Apps with Serverless Function Compute

Static Site Hosting with OSS and CDN

In a cloud‑native environment, static assets can be uploaded to Alibaba Cloud Object Storage Service (OSS) and enabled for one‑click hosting. By configuring OSS as the origin of Alibaba Cloud CDN, content is cached at edge nodes, providing low‑latency delivery. Both OSS and CDN are fully managed, pay‑as‑you‑go services, eliminating the need for server provisioning, Nginx configuration, and ongoing operational overhead.

Backend Requirements Beyond Pure Static Content

API services that need to integrate with caches, relational or NoSQL databases, message queues, and file storage.

Scheduled jobs or large‑scale batch processing.

Sending email, SMS, or instant‑messaging notifications (DingTalk, WeChat, Feishu) and making voice calls.

Media processing such as transcoding, thumbnail generation, content moderation, watermarking, or GPU‑accelerated inference.

Server‑Side Rendering (SSR) pages.

High‑traffic events like flash sales.

User‑behavior collection and conversion‑rate analysis.

Function Compute (FC) as a Serverless Backend

Alibaba Cloud Function Compute (FC) provides a fully managed, event‑driven execution environment that can satisfy the above requirements while keeping the operational model identical to OSS/CDN.

Extreme Elasticity

FC automatically scales the number of function instances in milliseconds based on incoming request volume. Developers configure an instance concurrency value that defines how many concurrent requests a single instance can handle. For example, with a concurrency of 20 and 100 simultaneous requests, FC launches five instances. Idle instances are frozen (no billing) and destroyed after a configurable idle period. Minimum and maximum instance counts can be set to guarantee latency or to cap cost.

Fine‑Grained Resource Configuration and Cost Model

CPU, memory, and GPU resources can be specified per function, down to 0.05 vCPU and 128 MiB. Billing is per‑millisecond of execution; a function that runs for 5 ms incurs only 5 ms of charge. When traffic drops to zero, FC scales the function to zero instances, eliminating fixed server costs.

Zero‑Ops and Built‑In Security

FC abstracts the underlying operating system, so developers do not manage patches, kernel updates, or hardware. The platform automatically restarts instances that encounter out‑of‑memory errors. Each function receives a managed HTTP/HTTPS endpoint, with optional custom‑domain binding. Because instances are not continuously running, the attack surface is reduced. Temporary credentials (valid for 36 hours) are generated for accessing other cloud services, minimizing secret leakage risk.

Function Types and Development Workflow

FC supports three deployment models:

Built‑in runtimes : Use Alibaba Cloud‑provided runtimes (Node.js, Python, Java, etc.) and implement the FC handler interface. Example (Node.js):

exports.handler = async (event) => {
  const response = {
    statusCode: 200,
    body: JSON.stringify({ message: 'Hello from Function Compute' })
  };
  return response;
};

Custom runtimes : Run existing applications (SpringBoot, Flask, Express, Next.js, Nest.js, Gin, etc.) by specifying the listening port and start command. No code changes are required; the function behaves like a traditional server process.

Container images : Package the entire execution environment in a Docker image and deploy it to FC. This gives full control over OS version, libraries, and dependencies, and the same image can be run on FC, on‑premises, or in Kubernetes for disaster‑recovery scenarios.

Development tools include the FC console, RESTful API, SDKs, and the Serverless Devs CLI, which streamline code packaging, deployment, and monitoring.

Putting It All Together

By combining OSS for static assets, CDN for edge acceleration, and Function Compute for dynamic logic, front‑end engineers can build cloud‑native web applications that are:

Highly elastic, automatically handling traffic spikes without manual scaling.

Cost‑effective, paying only for actual compute time.

Secure and low‑maintenance, with no server‑level OS management.

Rapidly developable, requiring little or no refactoring of existing codebases.

This serverless stack enables modern web applications to focus on delivering user value rather than managing infrastructure.

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.

BackendfrontendCloud NativeServerlessWeb DevelopmentFunction Computecost efficiency
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

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.