Dependency- and Layer-Aware Microservice Workflow Offloading and Service Image Caching for Edge Environments

Zhongxiao Wang, Yueshen Xu, Qingshan Li, Xinkui Zhao, Wei Shao, Shuiguang Deng, Rui LiarXiv 2026

TL;DR

This paper introduces DLA-HDRL, a hierarchical deep reinforcement learning framework that jointly optimizes microservice workflow offloading and container image caching at the network edge. By exploiting container layer sharing and long-range task dependencies, the framework significantly mitigates container "cold start" latencies, reducing average task completion times by up to 22.38% compared to state-of-the-art baselines.

What Problem Does This Paper Address?

Edge computing relies heavily on the microservice architecture to deploy lightweight, loosely coupled components that execute complex user workflows (modeled as Directed Acyclic Graphs, or DAGs). However, dynamically deploying these microservices on resource-constrained edge servers introduces a major bottleneck: image pull delay. When a server lacks the required container image, it must download it from a registry, causing a latency spike known as a "cold start."

Fortunately, container images (like Docker) are built using a layered file system where different images often share common base layers. Caching these layers locally on edge servers can drastically accelerate deployment.

Optimizing this environment requires answering two deeply intertwined questions: Where should a workflow task be offloaded? and Which images should each edge server cache? Simultaneously solving both creates an integer nonlinear programming problem with a massive, highly complex solution space. Prior works have largely ignored the joint optimization of these two tasks or failed to exploit the fine-grained nuances of image layer sharing.

Fig. 1. A motivation example to show that service deployment is essential for workflow task offloading, and we can use the microservice architecture to perform service deployment.

Methods

To tackle the joint optimization challenge, the authors decoupled the problem using a Dependency- and Layer-Aware Hierarchical Deep Reinforcement Learning (DLA-HDRL) framework. Instead of using a single agent with an exploded action space, DLA-HDRL splits the responsibilities between two specialized agents:

  1. Workflow Offloading Agent: Deployed centrally on a microservice base, this agent decides which edge server should execute the incoming workflow tasks. It utilizes a novel Layer-Aware Cross-Attention (LACA) mechanism to compute attention vectors between the requested task image and the images already cached on available edge servers. This allows the agent to favor servers that already possess the majority of the required image layers, minimizing data transfer.
  2. Microservice Caching Agent: Deployed locally on individual edge servers, this agent manages cache replacement decisions. It leverages a Dependency-Aware Multi-Head Cross-Attention (DAMH-CA) mechanism to analyze long-range dependencies within the upcoming task queue, ensuring that images needed by future tasks are not prematurely evicted.

Before feeding workflows into the agents, a Topological Sorting and Polling (TSP) method linearizes the graph-based DAGs into structured task queues. Both agents are built on the Dueling Double Deep Q-Network (D3QN) architecture, enhanced with NoisyNet for learnable exploration and Prioritized Experience Replay (PER) for stable convergence.

Fig. 4. Framework of our proposed DLA-HDRL approach

Datasets

Because no public dataset captured real-world microservice layer-sharing relationships, the authors created and released their own benchmark:

  • DockerHub Layer Dataset: The authors aggregated download frequencies and analyzed the internal layer structures (using the Dive analysis tool) of the 50 most popular microservice images on DockerHub.
  • EUA Dataset: Used to simulate a realistic geographical distribution of edge servers and users (specifically modeled around Sydney, Australia).
  • Alibaba Cluster Trace Dataset: Utilized to extract realistic microservice call graphs and topological structures for the simulated workflows.

Key Insights and Ideas

  • The Power of Fractional Hits: Traditional caching treats images as monolithic blocks (hit or miss). By focusing on layer sharing, a server can achieve a "partial hit." If a server already has 80% of an image's layers cached due to a different microservice, it only needs to pull the remaining 20%, turning a potentially severe cold start into a minor blip.
  • Decoupling via Hierarchy: Jointly optimizing offloading and caching usually causes reinforcement learning models to diverge due to action-space explosion. Splitting the problem hierarchically allows the offloading agent to focus on immediate execution efficiency while the caching agent focuses on long-term storage strategy.
  • Attention as a Predictor: The integration of cross-attention mechanisms allows the agents to "look ahead" into the workflow queue and "look across" at server states, effectively mapping out future resource demands before they arrive.

Key Results

The DLA-HDRL framework was evaluated against several strong baselines, including D3QNNP, Soft Actor-Critic (SAC), Proximal Policy Optimization (PPO), and Heuristic Offloading and Caching (HOC).

  • Latency Reduction: DLA-HDRL achieved a 22.38% reduction in average task completion time compared to the baselines.
  • Cache Efficiency: The framework demonstrated significantly higher image hit rates, maintaining robust performance even as the number of concurrent users scaled up from 10 to 20.
  • Ablation Validation: Ablation studies confirmed that removing either the attention mechanisms or the hierarchical architecture led to severe performance degradation, proving the necessity of the joint design.

Limitations and Future Work

While the framework excels at optimizing structured microservice workflows, the authors note that the current architecture does not yet account for the unique deployment characteristics of Large Language Models (LLMs), which feature massive parameter weights rather than standard container layers.

For future work, the authors plan to explore how LLM-based task planning can be integrated directly into edge microservice environments to handle more generalized, semantic-driven service orchestration and resource scheduling.

Summary updated

BibTeX
@misc{wang2026dependency,
  author = {Zhongxiao Wang and Yueshen Xu and Qingshan Li and Xinkui Zhao and Wei Shao and Shuiguang Deng and Rui Li},
  title = {{Dependency- and Layer-Aware Microservice Workflow Offloading and Service Image Caching for Edge Environments}},
  year = {2026},
  eprint = {2609.28943},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.28943},
}
Figure