Online Learning for Function Placement in Serverless Computing

Wei Huang, Richard Combes, Andrea Araldo, Hind Castel-Taleb, Badii Jouaber

Authors: Andrea Araldo, Hind Castel-Taleb, and Badii Jouaber
SAMOVAR, Télécom SudParis, IP-Paris, France

Introduction

In the rapidly evolving landscape of serverless computing, the challenge of Virtual Function Placement (VFP) has become a critical bottleneck for operational efficiency. VFP involves deciding which physical node should execute an incoming request to minimize costs while adhering to strict resource constraints. This task is complicated by the highly stochastic nature of cloud environments: function arrival rates, computational demands (CPU, RAM), and operational costs are often unknown and fluctuate over time.

Traditional approaches typically fall into two categories: simple heuristics, which are fast but lack optimality and safety guarantees, and Deep Reinforcement Learning (DRL), which is powerful but requires days of offline training on specialized GPU hardware. This paper proposes a middle ground: a novel online learning framework based on Multi-Armed Bandits (MAB) that learns optimal placement policies in real-time on standard consumer hardware.

Methodology

The authors frame VFP as a constrained optimization problem solved through a specialized MAB framework. The core of the approach is a "learn-as-you-go" system that balances exploration and exploitation while prioritizing system stability.

The Base Algorithm: KL-UCB

The system utilizes the Kullback-Leibler Upper Confidence Bound (KL-UCB) algorithm to maintain statistics on costs and resource usage. A key innovation is the "Safety First" strategy: the algorithm applies optimism toward costs (assuming they might be lower than current estimates to encourage exploration) but pessimism toward constraints. By assuming resource usage might be higher than estimated, the learner ensures that resource limits are not violated during the learning phase.

Optimization and Acceleration

At each time step, the controller solves a Linear Program (LP) to determine the optimal probability distribution for placing functions across nodes. To handle admission control, a "fictitious node" with infinite resources but maximum cost is included; routing a function here effectively rejects the request.

To improve computational efficiency, the authors introduced a Fast Algorithm. Rather than solving an LP for every single request, the policy is recalculated at intervals that grow logarithmically. This drastically reduces the computational overhead without significantly impacting the convergence rate or optimality.

Experimental Results

The framework was evaluated using numerical simulations involving up to 100 nodes and 10 function classes. The stochastic nature of the network was modeled using Bernoulli and uniform random variables to simulate unpredictable traffic and resource consumption.

Convergence and Feasibility

One of the most significant findings is the algorithm's ability to maintain feasibility. As shown in the constraint tracking analysis, the system consistently stays below the resource threshold even during the early stages of learning.

Maximum constraint value over time, demonstrating that both the Base and Fast algorithms respect the resource threshold (1.0) while learning.

Furthermore, the algorithm demonstrates rapid convergence. In simulations, the "Relative Gap"—the difference between the current policy and the theoretical optimum—approaches zero within minutes.

Relative gap convergence over time, showing both algorithms reaching near-optimal performance within 300 seconds.

Performance Benchmarks

  • Speed: The "Fast" version achieved a 20x speedup in computation time compared to the base version.
  • Hardware Efficiency: While DRL approaches often require days of GPU training, this MAB-based method converges in under 5 minutes on a standard 11th Gen Intel i7 laptop.
  • Scalability: For large networks of 100 nodes, a single placement decision takes less than 0.6 milliseconds, making it suitable for high-frequency production environments.

Conclusion and Future Work

This research demonstrates that well-tuned "shallow" online learning can outperform complex deep learning models in practical networking scenarios. By prioritizing feasibility and leveraging efficient update schedules, the proposed algorithm offers a robust solution for real-time function placement.

Future work will address the current assumption of independent and identically distributed (i.i.d.) costs, exploring how the model handles correlated resource demands and non-stationary environments where network statistics change abruptly. Additionally, integrating multi-hop network topologies and link bandwidth constraints will further enhance the model's applicability to Edge computing.

Summary updated

BibTeX
@inproceedings{huang2025online,
  author = {Wei Huang and Richard Combes and Andrea Araldo and Hind Castel-Taleb and Badii Jouaber},
  title = {{Online Learning for Function Placement in Serverless Computing}},
  booktitle = {NetSoft},
  year = {2025},
  doi = {10.1109/netsoft64993.2025.11080544},
}
Figure