TL;DR
Morphis is a dependency-aware resource scheduling framework designed to handle the highly dynamic, time-varying call graphs of modern microservices. By decomposing complex execution traces into stable "backbones" and context-sensitive "deviation subgraphs," Morphis accurately forecasts workload patterns and globally optimizes resource allocation. This approach reduces CPU consumption by 35–38% compared to state-of-the-art baselines while maintaining up to 98.8% Service Level Objective (SLO) compliance.
What Problem Does This Paper Address?
In microservice architectures, a single user request triggers a cascade of remote procedure calls (RPCs) across various services, forming an end-to-end execution path known as a call graph. Managing resources (like CPU and memory) for these systems is notoriously difficult because their runtime topologies are constantly shifting. Factors like network fluctuations, auto-scaling events, and resilience mechanisms (e.g., retries and fallbacks) cause call graphs to change dynamically.
Existing solutions fall into two main traps:
- Industrial Autoscalers (like Kubernetes HPA): Scale services in isolation based on local metrics (like CPU utilization), completely ignoring upstream and downstream dependencies.
- Academic Approaches: Often assume a static dependency topology derived from historical averages, making them brittle when execution paths shift at runtime.
As a result, operators are forced to over-provision resources excessively to avoid tail-latency SLO violations.
Methods
Morphis tackles this challenge using a two-stage closed-loop architecture:
1. Structural Fingerprinting (Pattern Discovery & Prediction)
Instead of treating every trace as unique or averaging them into a single static graph, Morphis introduces structural fingerprinting. It decomposes each trace into:
- An Execution Backbone: The latency-dominant, performance-critical path representing the core business logic.
- Deviation Subgraphs: Context-dependent fragments that capture runtime variations like retry loops or conditional fallbacks.
Using a customized similarity metric and DBSCAN clustering, Morphis groups these fingerprints into distinct recurring patterns. It then applies a SARIMAX time-series model to forecast the incoming rate of each pattern over a short horizon (e.g., 5 minutes).
2. Global Resource Provisioning
Once the workload patterns are predicted, Morphis translates them into actual resource allocations:
- Latency-Aware Resource Modeling: A deep neural network (built with stacked residual blocks and an attention mechanism) predicts the exact CPU and memory required by a service to meet a specific self-processing latency target.
- Global Optimization: A Genetic Algorithm (GA) solves a constrained optimization problem across the entire service mesh. It dynamically adjusts individual microservice latency targets—tightening them for non-bottleneck services to save resources and relaxing them where paths are constrained—to minimize total infrastructure cost while strictly satisfying end-to-end tail-latency SLOs.
Datasets
The authors validated their insights and evaluated Morphis using two primary data sources:
- ByteDance Production Traces: An analysis of over 500,000 real-world production traces from a ByteDance cluster, spanning diverse domains like AI inference and comment processing.
- TrainTicket Benchmark: A widely used, open-source railway ticket booking system consisting of 41 heterogeneous microservices. A 40-hour continuous stress test generated 973,602 valid data samples for training and evaluation.
Key Insights and Ideas
- Latent Regularity Amidst Chaos: Although microservice traces look incredibly volatile on the surface (with span counts varying by orders of magnitude), they actually exhibit strong structural concentration. For instance, the authors found that just 19 dominant call patterns account for 90% of all traffic for a key service at ByteDance.
- The Power of "Self-Time": Traditional autoscalers look at total response time, which conflates local computation with downstream delays. Morphis isolates "self-processing time," allowing the neural network to map local resource pressure accurately to local performance.
- Coordinated Rebalancing: Global optimization beats isolated scaling because it allows for cross-service trade-offs. If an upstream service has performance headroom, Morphis can safely reallocate its slack to a downstream bottleneck.
Key Results
The authors evaluated Morphis against industry standards (Kubernetes HPA) and advanced academic baselines (Derm, PBScaler) under three realistic workload profiles: Gradual Rise, High Sustained Load, and Spike-and-Plateau.
- Resource Efficiency: Morphis reduced aggregate CPU consumption by 35–38% compared to the next-best alternative.
- SLO Compliance: Under the most volatile workloads, Morphis maintained stable tail-latencies, achieving high SLO compliance rates of 98.80% (Gradual Rise), 96.67% (High Sustained), and 95.57% (Spike).
- Ablation Performance: Compared to a completely decentralized, static baseline, Morphis's global dynamic coordination improved resource efficiency (QPS-per-CPU ratio) by up to 78.9%.
Limitations and Future Work
While Morphis demonstrates impressive gains, the authors note a few areas for improvement:
- Topology Shift Latency: The structural fingerprinting window is currently configured to 5 minutes because patterns in the testbed evolved slowly. However, abrupt, massive topology shifts (such as a sudden canary deployment rollout) might require shorter windows or online, real-time clustering updates.
- Optimization Overhead: The Genetic Algorithm converges within seconds, which fits a 5-minute scheduling interval perfectly. For massive, hyperscale clusters requiring sub-minute adjustments, more lightweight optimization heuristics might be necessary.
Summary updated