Cloud Native 13 min read

Why Serverless FaaS Still Needs Containers: Overcoming the Barriers

The article examines the limitations of traditional Function-as-a-Service (FaaS) such as environment inconsistency, learning cost, and vendor lock‑in, and explains how supporting container images in serverless platforms addresses these issues while improving portability, CI/CD integration, cold‑start performance, and hybrid deployment scenarios.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
Why Serverless FaaS Still Needs Containers: Overcoming the Barriers

Challenges of Traditional FaaS

Serverless FaaS simplifies scaling, operations, and cost, but developers still face several obstacles when migrating legacy applications:

Inconsistent environments : Different cloud providers define delivery formats and runtime capabilities, requiring code adaptation or recompilation.

Learning curve : Packaging dependencies and building compressed code bundles differ from familiar workflows.

Service limits : Code package size limits (e.g., 50 MB) force dependency separation, increasing management complexity.

Lack of version control : Non‑standard delivery formats and missing best‑practice guidance place the burden on developers.

Immature ecosystem : Limited support from popular CI/CD tools.

Why Containers Offer a Better Alternative

Containers provide mature, portable, and flexible ecosystems. While they do not eliminate operational concerns, they excel in portability and agile delivery. Combining container advantages with serverless benefits can bridge the gap.

Alibaba Cloud Function Compute Supports Container Images

By allowing container images as function artifacts, Alibaba Cloud Function Compute merges the strengths of containers (rich development, deployment, and ecosystem) with serverless characteristics (zero‑ops, no idle cost, seamless cloud service integration). This upgrade improves developer experience in several ways:

Simplified Serverless migration : No code changes or recompilation needed; local debugging matches the production environment.

Increased code size limit : Images up to 1 GB before extraction, avoiding code‑dependency separation.

Layered image caching : Incremental uploads and pulls reduce development latency and cold‑start time.

Image sharing and reuse : Logic can be ported across services, reducing duplicate effort.

Hybrid deployment : Mix Serverfull (ECS, ACK) and Serverless (FC, ASK, SAE) workloads for consistent performance and resource elasticity.

CI/CD integration : Standard version control and rich open‑source CI/CD tools can be reused.

Typical Customer Scenarios

1. Event‑driven Video Processing

Video workloads require elastic compute and often rely on custom‑compiled ffmpeg binaries that are incompatible with FaaS runtimes. Packaging the processing logic in a Dockerfile and deploying it as a container image eliminates recompilation, lowers migration cost, and stabilizes the environment.

2. Serverless AI/ML Inference

AI/ML models benefit from serverless auto‑scaling and low cost. Popular frameworks like TensorFlow already distribute container images. Using container images in Function Compute allows seamless hybrid deployment of training (GPU containers) and inference (CPU‑optimized serverless functions) with minimal code changes.

3. Modernizing Monolithic Web Applications

Monolithic apps often couple business logic with specific runtime environments. Container image support enables direct migration to serverless without refactoring, letting teams focus on feature development rather than environment maintenance.

4. Multi‑cloud Hybrid Deployment

Enterprises increasingly adopt hybrid clouds. Container images serve as a universal delivery artifact, allowing functions to run on Alibaba Cloud, other cloud providers, or on‑premise container services, thus reducing vendor lock‑in.

Cold‑Start Best Practices

Use image repositories in the same VPC region as Function Compute (e.g.,

registry-vpc.cn-hangzhou.aliyuncs.com/fc-demo/helloworld:v1beta1

) for minimal pull latency.

Minimize image size with tools like docker-slim to keep only necessary layers.

Enable single‑instance multi‑concurrency when thread‑safe to reduce cold starts and cost.

Combine images with reserved instances to eliminate cold‑start delays.

DevOps / GitOps Practices

Standardized container builds enable CI/CD pipelines to automatically build, push, and deploy images. When code is pushed to a Git repository (GitHub or GitLab), the pipeline builds the Dockerfile, pushes the image to Alibaba Cloud Container Registry, and deploys the new function version, achieving fully automated delivery.

Custom Runtime vs. Custom Container

Function Compute introduced custom runtimes in 2019. The newer custom‑container runtime shares the same HTTP server programming model, allowing existing custom‑runtime functions to run unchanged. Differences include:

Custom runtime suits non‑containerized apps.

Custom runtime offers lower cold‑start latency due to smaller images.

Custom‑container runtime is ideal for already containerized, asynchronous jobs.

For tightly coupled business logic and deployment environment, custom‑container with reserved instances is recommended.

Future Roadmap

As containers become the standard for application delivery, serverless platforms will further integrate with the container ecosystem, offering declarative deployments, Kubernetes‑like abstractions, and enhanced observability. Accelerated image pulling will balance portability with rapid startup, reinforcing the synergy between serverless and container technologies.

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.

FaaSCloud NativeServerlesscontainer images
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.