Introduction
Infrastructure-as-a-Service (IaaS) providers like Amazon EC2 present cloud users with a complex financial trade-off. Users can opt for on-demand instances, which offer maximum flexibility at a high hourly rate, or reserved instances, which require a significant upfront payment in exchange for a substantial hourly discount over a long term (typically 1–3 years).
For businesses with fluctuating workloads, the central challenge is determining the optimal number of instances to reserve without knowing future demand. While traditional strategies rely on long-term forecasting, cloud workloads are often too volatile for accurate prediction. This paper introduces two theoretically optimal online algorithms—one deterministic and one randomized—that make reservation decisions based solely on historical usage, achieving the best possible competitive ratios without any foresight.
Methodology: The "Lazy" Reservation Approach
The authors frame multi-instance acquisition as a generalized version of the classic "rent-or-buy" (ski rental) problem, specifically extending the Bahncard problem.
The proposed algorithms operate on a "lazy" principle. By default, all workloads run on-demand. A new instance is reserved only when the cumulative cost of on-demand usage within a recent window (equivalent to the reservation period) exceeds a specific threshold.
- Deterministic Algorithm ($A_\beta$): Uses a fixed "break-even" threshold. It only commits to a reservation once it is mathematically proven that a reservation would have been cheaper in hindsight.
- Randomized Algorithm: To prevent adversarial workloads from exploiting a fixed threshold, this version selects a threshold from a probability distribution, improving worst-case performance.
A key insight of this work is the necessity of joint multiplexing. Unlike standard ski rental where each pair of skis is independent, a reserved cloud instance can serve different requests at different times. The algorithms account for this by managing instances as a shared pool.
Key Insights and Theoretical Bounds
The authors prove that their algorithms are "optimal" in a game-theoretic sense, meaning no other online algorithm can guarantee a better worst-case performance against an "offline optimal" adversary that knows the future perfectly.
The performance is measured by the competitive ratio. For a discount factor $\alpha$ (the ratio of reserved hourly cost to on-demand hourly cost), the deterministic algorithm achieves a ratio of $2 - \alpha$. The randomized version further tightens this to $e / (e - 1 + \alpha)$. For typical Amazon EC2 pricing ($\alpha \approx 0.49$), these algorithms guarantee costs no higher than 1.51x and 1.23x the offline minimum, respectively.
Empirical Evaluation
The researchers validated these algorithms using 40 GB of resource traces from 933 Google Cluster users and real-world Amazon EC2 pricing.
The results demonstrated significant practical utility:
- Broad Savings: 60% of users achieved lower costs compared to an all-on-demand strategy.
- High Impact: Half of the users saved more than 40% on their total cloud bill.
- Risk Mitigation: The algorithms were most effective for users with medium workload fluctuations, where the risk of over-committing to reservations or over-paying for on-demand is highest.
Conclusion and Future Directions
By adopting a "lazy" reservation strategy, cloud users can navigate the uncertainty of volatile workloads with mathematical guarantees. While this work focuses on a single reservation type and fixed pricing, it provides a robust foundation for online resource management. Future research may extend these models to handle multiple reservation tiers (e.g., 1-year vs. 3-year) and dynamic pricing environments like the Spot Market.
Summary updated