Cost-Efficient Predictive Auto-Scaling Using Transformer-LSTM Fusion Tuned with Bayesian Optimization
Abstract
Cloud applications experience frequent and sometimes unpredictable shifts in demand due to user activity, daily usage cycles, and sudden workload spikes. Traditional autoscaling mechanisms used in cloud environments mostly follow reactive, threshold-based rules. They trigger scaling only after resources begin to saturate, which often leads to slow provisioning, increased response times, and occasional SLA violations during high-traffic periods. When demand drops, these systems may still allocate more resources than necessary, resulting in avoidable costs. To address these issues, this work introduces a predictive autoscaling approach built using a combined Transformer-LSTM model. The fusion model is designed to capture both long-term workload trends and short-term sequential patterns, giving it a more accurate view of workload behavior. A cost optimization function is added to translate multi-step workload predictions into suitable virtual machine allocation decisions while considering cloud pricing and SLA constraints. Bayesian optimization is then used to fine-tune the forecasting model and COF parameters, ensuring an effective balance between accuracy, SLA compliance, and cost savings. Experiments using Google Cluster Trace data show encouraging improvements: forecasting accuracy increases by 18-25%, SLA violations drop by 40-55%, and total costs reduce by 22-35% compared to traditional reactive and single-model predictive methods.