Smarter Auto-Scaling for ClickHouse: The Two-Window Approach
Blog post from ClickHouse
The text discusses an optimization strategy for auto-scaling database resources, focusing on a new two-window recommender system that enhances both responsiveness and stability in scaling decisions. The original system used a 30-hour lookback window, which led to slow scale-downs and increased infrastructure costs. The new approach introduces a dual-window system with a smaller 3-hour window for quick scale-downs and a larger 30-hour window for stable scale-ups, accompanied by a target-tracking CPU recommendation system to address the limitations of the previous fixed-factor algorithm. This method improves scale-down latency from 30 hours to 3 hours, minimizes oscillations, and reduces costs while maintaining system stability. Additionally, memory-based recommendations and an automatic idling feature further optimize resources during periods of inactivity. Overall, these advancements in the ClickHouse auto-scaling system enhance efficiency and reliability for dynamic workloads, allowing for better alignment of resource allocation with actual utilization.