Source-linked AI summary

FaaSNet: Scalable and Fast Provisioning of Custom Serverless Container Runtimes at Alibaba Cloud Function Compute

Ao Wang, Shuai Chang, Huangshi Tian, Hongqi Wang, Haoran Yang, Huiba Li, Rui Du, Yue Cheng

arXiv:2105.11229v3cs.DC

TL;DR

Custom-container FaaS needs fast provisioning despite large images, costly cold starts, and bursty workloads. FaaSNet uses lightweight adaptive function trees and decentralized fetching, and its Alibaba Cloud deployment provisions thousands of containers quickly while outperforming platform and P2P baselines. Its scope includes workloads where extremely short-lived functions with sparse invocations may be adversarial.

  • Problem

    Custom-container FaaS provisioning must handle large images, costly cold starts, and highly dynamic workloads while preserving elasticity.

  • Method

    FaaSNet uses lightweight adaptive function trees to decentralize provisioning across host VMs, with on-demand fetching and integrated scheduler support.

  • Results

    FAASNET provisions 2,500 function containers in 8.3 seconds and scales 13.4× and 16.3× faster than Alibaba Cloud’s platform and Kraken, respectively.

  • Takeaways & Limitations

    FAASNET provides an integrated, FaaS-optimized solution that can start thousands of large function containers in seconds and support fundamental elasticity.

  • Takeaways & Limitations

    Extremely short-lived, sub-second functions with sparse invocations may be adversarial and may require caching or pre-provisioning with extra infrastructure costs.

Abstract

from arXiv · show

Serverless computing, or Function-as-a-Service (FaaS), enables a new way of building and scaling applications by allowing users to deploy fine-grained functions while providing fully-managed resource provisioning and auto-scaling. Custom FaaS container support is gaining traction as it enables better control over OSes, versioning, and tooling for modernizing FaaS applications. However, providing rapid container provisioning introduces non-trivial challenges for FaaS providers, since container provisioning is costly, and real-world FaaS workloads exhibit highly dynamic patterns. In this paper, we design FaaSNet, a highly-scalable middleware system for accelerating FaaS container provisioning. FaaSNet is driven by the workload and infrastructure requirements of the FaaS platform at one of the world's largest cloud providers, Alibaba Cloud Function Compute. FaaSNet enables scalable container provisioning via a lightweight, adaptive function tree (FT) structure. FaaSNet uses an I/O efficient, on-demand fetching mechanism to further reduce provisioning costs at scale. We implement and integrate FaaSNet in Alibaba Cloud Function Compute. Evaluation results show that FaaSNet: (1) finishes provisioning 2500 function containers on 1000 virtual machines in 8.3 seconds, (2) scales 13.4x and 16.3x faster than Alibaba Cloud's current FaaS platform and a state-of-the-art P2P container registry (Kraken), respectively, and (3) sustains a bursty workload using 75.2% less time than an optimized baseline.

1 Introduction

Custom container images expand FaaS flexibility for dependency-heavy applications, but their costly provisioning and bursty workloads make rapid, scalable startup difficult. FaaSNet addresses these constraints with an adaptive, decentralized function-tree middleware integrated into Alibaba Cloud Function Compute.

  • Motivation: Custom container images support dependency-heavy applications, familiar container tooling, and incremental-update workflows beyond limited function packages.The paper highlights machine learning, data analytics, and video processing as examples enabled by larger dependencies.
  • Challenges: A single production application can exceed 1,000 RPS with a peak-to-trough ratio above 500×, producing highly dynamic provisioning demand.These workload patterns make rapid container startup difficult for FaaS providers.
  • Challenges: More than 10% of Docker Hub containers exceed 1.3 GB, and pulling large images can cause cold-start latency of several minutes under contention.The paper identifies large image size and backing-store contention as major provisioning costs.
  • FAASNET: FAASNET decentralizes provisioning across host VMs organized into adaptive function trees, avoiding centralized bottlenecks and adjusting topology as VMs join or leave.The system is designed for Alibaba Cloud Function Compute’s large VM pools and workload characteristics.
  • Evaluation: 2,500 function containers are provisioned in 8.3 seconds, while FAASNET scales 13.4× and 16.3× faster than Alibaba Cloud’s platform and Kraken.The evaluation also reports 75.2% less time than an optimized baseline for a bursty workload.

2 Background and Motivation

Custom-container FaaS must provision runtimes rapidly despite bursty workloads and costly image pulls. Alibaba Cloud measurements show that image downloading dominates cold-start latency, motivating scalable provisioning.

  • Implications: These workload and cold-start patterns motivate scalable, resilient provisioning that rapidly smooths latency spikes and reduces container-based cold-start costs.
  • Cold Start Costs: 57% of Beijing image pulls exceed 45 seconds, while over 86% of Shanghai pulls take at least 80 seconds.
  • Cold Start Costs: More than 50% of Beijing and 60% of Shanghai invocations spend at least 80% and 72% of startup time, respectively, pulling images.
  • Cold Start Costs: About 49% of cold starts in both regions arrive less than one second apart, while cold-start costs can match function execution durations.

3 FAASNET Design

FAASNET decentralizes container provisioning across adaptive, function-specific balanced binary trees integrated with Alibaba Cloud’s scheduler and VM agents. The design limits per-VM contention, supports dynamic VM membership, and uses I/O-efficient image handling.

  • Architecture: FAASNET introduces function trees, integrating an FT manager and VM workers to decentralize and parallelize provisioning across VMs.
  • Integration: The scheduler queries FT metadata and sends workers RPCs, while workers perform image downloading and container provisioning on individual VMs.
  • Image Handling: FAASNET converts images into an I/O-efficient format with block-compressed layers and manifests stored separately for on-demand provisioning.
  • Function Trees: Each function has a separate FT with decoupled control and data planes, using a balanced binary tree that adapts to workload changes.
  • Balanced Binary Trees: A balanced binary tree limits concurrent downloads per VM and gives an N-node tree height of ⌊log(N)⌋, bounding propagation to at most ⌊log(N)⌋ hops.
  • Tree Management: The FT manager uses insert and delete operations to grow or shrink trees as VMs join or are reclaimed, rebalancing when necessary.
  • Design Discussion: A finer-grained layer-tree design can create all-to-all topologies and network bottlenecks on Alibaba Cloud’s resource-constrained VMs.

4 Evaluation

FAASNET accelerates container provisioning by decentralizing image loading and streaming data through adaptive function trees. Across bursty, concurrent, and large-scale tests, it reduces latency, maintains predictable startup, and scales substantially faster than baselines.

  • Burst Workloads: 113 secondsThe baseline takes almost 113 seconds to finish provisioning and restore normal response time after a burst.
  • Burst Workloads: FAASNET reduces maximum response time from 28 seconds to 6 seconds and restores normal service in 28 seconds.
  • Burst Workloads: 82 VMsDuring the first synthetic burst, the function tree grows from height 2 to height 7; during the second, it reaches 102 VMs.
  • Provisioning Latency: 96% of synthetic-workload functions start in 5.8 seconds, while IoT functions start within 6.8–7.9 seconds.On-demand provisioning varies from about 7 to 21 seconds, with about 80% of containers taking at least 10 seconds.
  • Scalability: 13.4×FAASNET is 13.4× faster than baseline, 16.3× faster than Kraken, 5× faster than on-demand, and 2.8× faster than DADI+P2P under high concurrency.
  • Provisioning Pipeline: 1.5 secondsAt 128-function concurrency, FAASNET provisions the complete set in 1.5 seconds, versus 16.4 seconds for on-demand and 19 seconds for DADI+P2P.
  • I/O Efficiency: 83.9%With 512 KB blocks, on-demand fetching reduces network I/O relative to regular docker pull.
  • I/O Efficiency: Larger block sizes increase read amplification because starting and ending offsets may not align with compressed block boundaries.The paper identifies reducing this amplification as future work.

5 Discussion

The discussion identifies deployment boundaries and future directions for FAASNET, including placement under bandwidth contention, tenant isolation, broader data sharing, adversarial workloads, and portability.

  • FT-aware Placement: Bandwidth contention can arise as function counts grow, motivating FT-aware placement to balance each VM’s inbound and outbound communication.The authors also propose co-locating functions with common layers to reduce data transfer.
  • Multi-Tenancy: FAASNET cannot share VMs among tenants because Alibaba Cloud uses containers and VMs for strong tenant-level isolation.Porting it to other secure, lightweight virtualization techniques remains ongoing work.
  • Data Sharing: General container data sharing remains future work because it requires a user-facing primitive interface and more frequent tree rebuilding and adaptation.The paper identifies Kubernetes-like orchestration systems as a possible broader setting.
  • Adversarial Workloads: Extremely short-lived, sparsely invoked functions may be adversarial to FAASNET and custom-container FaaS platforms.Environment caching and pre-provisioning could address these workloads but add infrastructure-level costs.
  • Portability: Porting FAASNET to Alibaba Cloud’s bare-metal infrastructure remains ongoing work.The system is described as transparent to upper-level applications and underlying FaaS infrastructure.

6 Related Work

Related work addresses FaaS cold starts, low-level runtime startup, and container storage or distribution, while FAASNET targets integrated provisioning under FaaS-specific constraints.

  • Cold-Start Mitigation: Function caching and pre-provisioning reduce cold starts by pausing and caching previously invoked functions.These approaches are used by FaaS providers such as AWS Lambda and Google Cloud Functions.
  • Runtime Startup: Checkpoint- or snapshot-based systems reduce initialization overhead, while language-based isolation targets speedy function startup.The cited approaches may require modified operating systems or have compatibility limitations.
  • Container Storage: Container storage systems optimize startup through lazy cloning, lazy propagation, distributed file systems, or registry-level caching.These storage techniques are orthogonal to FAASNET and can serve as backend container stores.
  • P2P Distribution: Kraken and DADI accelerate layer distribution with P2P, but assume static topologies and require dedicated storage, seeding, or metadata components.These assumptions distinguish them from FAASNET’s FaaS-oriented design.

7 Conclusion

FAASNET provides an integrated, lightweight, decentralized, and adaptive approach to provisioning custom-container FaaS runtimes. The evaluation shows that it can start thousands of large containers in seconds, supporting broader dependency-heavy FaaS applications.

  • Conclusion: FAASNET is presented as an end-to-end solution for FaaS-optimized container runtime provisioning.Its lightweight, decentralized, adaptive function trees target major platform bottlenecks.
  • Conclusion: Thousands of large function containers can be started in seconds with FAASNET.The authors connect this capability to custom-container FaaS elasticity and applications such as machine learning and big data analytics.
  • Artifacts: The released artifacts include the FT prototype source code and an anonymized dataset of production FaaS cold-start traces.The traces were collected from Alibaba Cloud Function Compute.
Loading 2105.11229v3…