| 研究生: |
哈元泰 Yuan-Tai Ha |
|---|---|
| 論文名稱: |
基於Kubernetes 自動擴縮機制之整合改善後的 Prophet-LSTM 方法:優化流量高峰預測與資源使 用效率 Integrated Improved Prophet-LSTM Method Based on Kubernetes Autoscaling Mechanisms: Optimizing Peak Traffic Prediction and Resource Efficiency |
| 指導教授: |
王尉任
Wei-Jen Wang |
| 口試委員: | |
| 學位類別: |
碩士 Master |
| 系所名稱: |
資訊電機學院 - 資訊工程學系在職專班 Executive Master of Computer Science & Information Engineering |
| 論文出版年: | 2025 |
| 畢業學年度: | 114 |
| 語文別: | 中文 |
| 論文頁數: | 63 |
| 中文關鍵詞: | Kubernetes 、自動擴縮 、HPA 、KEDA 、Prophet 、LSTM 、特徵工程 、尾端延遲 、資源效率 、預測式擴縮 |
| 外文關鍵詞: | Kubernetes, autoscaling, HPA, KEDA, Prophet, LSTM, proactive scaling, feature engineering, tail latency, resource efficiency |
| 相關次數: | 點閱:15 下載:0 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
近年來雲端服務經常面臨被事件所驅動的高流量負載,傳統反應式的 Kubernetes Horizontal Pod Autoscaler(HPA)容易在流量高峰來臨時出現延遲。本篇論文針對既有的 Prophet 與 LSTM 混合模型,提出一系列以特徵工程為核心的改進作法。我們透過趨勢與季節性分解後的殘差學習,並引入滯後、差分、事件時間標註與交互項等特徵,顯著強化了模型對於流量尖峰的感知與擬合能力。時間序列交叉驗證結果顯示,此方法在 NASA 資料集上展現穩定的泛化能力,但在 FIFA 資料集面對未見過的高波動模式時則面臨挑戰;然而,在最終測試集上的評估證實了特徵工程的整體有效性。在系統整合方面,本研究設計並實現了一套可部署的主動式擴縮架構,整合 Prometheus、KEDA 與 Kubernetes 原生元件。改良後的模型將短期預測 RPS 輸出為自訂指標,驅動 KEDA 提前進行資源配置。模型準確度的提升在 NASA 與 FIFA World Cup 1998 測試集上得到驗證,R² 值均達到 0.9998 以上。在重複的實際部署實驗中,以 k6 模擬 FIFA 高峰流量,本研究方法相較於 HPA,展現了更優異的系統效能:在大幅降低最大副本數(50.0 → 18.0)與擴縮頻率(12.87 → 8.17 次/小時)的同時,也顯著改善了服務品質,請求失敗率降低 81.7%(0.690% → 0.126%),P99 尾端延遲降低 57.7%(280.79 → 119.33 毫秒)。整體而言,本研究證實透過強化的特徵工程能顯著提升預測準確度,並將此準確度成功轉化為實際部署中更低的服務延遲、更高的資源效率與更穩定的系統。
Cloud services frequently face event-driven high-traffic loads, where traditional reactive Kubernetes Horizontal Pod Autoscalers (HPA) lag. This thesis proposes feature-engineering-centric improvements to the existing Prophet-LSTM hybrid model. By focusing on residual learning after trend and seasonality decomposition, we introduce lag, differencing, event-time annotations, and interaction features, significantly strengthening the model’s ability to perceive and fit traffic peaks. Time-series cross-validation showed stable generalization on the NASA dataset but revealed challenges with unseen high-volatility patterns in the FIFA dataset; however, final test set evaluations confirmed the overall effectiveness of the feature engineering. For system integration, we designed and implemented a deployable proactive autoscaling architecture integrating Prometheus, KEDA, and native Kubernetes components. The improved model exports short-horizon RPS forecasts as a custom metric, driving KEDA to provision resources preemptively. The model’s accuracy improvements were validated on the NASA and FIFA World Cup 1998 test sets, with R² values exceeding 0.9998. In repeated deployment experiments simulating FIFA peak traffic with k6, our method demonstrated superior system performance compared to HPA. It achieved significant reductions in service quality metrics, including an 81.7% drop in request failure rate (from 0.690% to 0.126%) and a 57.7% decrease in P99 tail latency (from 280.79 ms to 119.33 ms). This was accomplished while simultaneously reducing the maximum replica count (from 50.0 to 18.0) and scaling frequency (from 12.87 to 8.17 per hour). Overall, this work demonstrates that enhanced feature engineering significantly improves predictive accuracy, translating into lower latency, higher resource efficiency, and greater system stability in practical deployments.
[1] Kubernetes Authors, “Horizontal pod autoscaler - kubernetes,” https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
, 2024, accessed: 2025-06-12.
[2] P. B. Guruge and Y. H. P. P. Priyadarshana, “Time series forecasting-based kubernetes autoscaling using facebook prophet and long short-term memory,” Frontiers in Computer Science, vol. 7, p. 1509165, 2025. [Online]. Available: https://doi.org/10.3389/fcomp.2025.1509165
[3] A. Bali, Y. El Houum, A. Gherbi et al., “Automatic data featurization for enhanced proactive service auto-scaling: Boosting forecasting accuracy and mitigating oscillation,” Journal of King Saud University - Computer and Information Sciences, vol. 36, no. 2, p. 102924, 2024.
[4] H. Yuan and S. Liao, “A time series-based approach to elastic kubernetes scaling,” Electronics, vol. 13, no. 2, 2024. [Online]. Available: https://www.mdpi.com/2079-9292/13/2/285
[5] T. Theodoropoulos, Y. S. Patel, U. Zdun, P. Townend, I. Korontanis, A. Makris, and K. Tserpes, “Graphopticon: A global proactive horizontal autoscaler for improved service performance & resource consumption,” Future Generation Computer Systems, vol. 174, p. 107926, 2025. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0167739X25002213
[6] M. Armbrust, A. Fox, R. Griffith, A. D. Joseph, R. Katz, A. Konwinski, G. Lee, D. Patterson, A. Rabkin, I. Stoica, and M. Zaharia, “A view of cloud computing,” Communications of the ACM, vol. 53, no. 4, pp. 50–58, 2010.
[7] KEDA Authors, “Keda: Kubernetes-based event driven autoscaling,” https://keda.sh
, 2024, accessed: 2025-06-12.
[8] Prometheus Authors, “Prometheus - monitoring system & time series database,” https://prometheus.io
, 2024, accessed: 2025-06-12.
[9] S. J. Taylor and B. Letham, “Forecasting at scale,” The American Statistician, vol. 72, no. 1, pp. 37–45, 2018.
[10] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural computation, vol. 9, no. 8, pp. 1735–1780, 1997.
[11] B. Lim, S. Ö. Arık, N. Loeff, and T. Pfister, “Temporal fusion transformers for interpretable multi-horizon time series forecasting,” International Journal of Forecasting, vol. 37, no. 4, pp. 1748–1764, 2021.
[12] G. E. P. Box, G. M. Jenkins, G. C. Reinsel, and G. M. Ljung, Time Series Analysis: Forecasting and Control, 5th ed. Wiley, 2015. [Online]. Available: https://www.wiley.com/en-us/Time+Series+Analysis%3A+Forecasting+and+Control%2C+5th+Edition-p-9781118675021
[13] Grafana Labs, “k6 - a modern load testing tool,” https://k6.io
, 2025, accessed: 2025-06-13.
[14] World Cup 1998 Dataset Team, “1998 world cup web traffic data,” https://ita.ee.lbl.gov/html/contrib/WorldCup.html
, 2002, used for autoscaling traffic simulations; accessed: 2025-06-12.
[15] “Quick start | prophet - meta open source,” https://facebook.github.io/prophet/docs/quick_start.html
, accessed: 2025-09-04.
[16] “Seasonality, holiday effects, and regressors | prophet,” https://facebook.github.io/prophet/docs/seasonality%2C_holiday_effects%2C_and_regressors.html
, accessed: 2025-09-04.
[17] W. Chen and L. Zhang, “Hybrid forecasting models for cloud workload prediction,” IEEE Transactions on Cloud Computing, vol. 11, no. 3, pp. 1234–1245, 2023.
[18] O. Pozdniakova, N. Pombo, and J. J. P. Rodrigues, “Sla-adaptive threshold adjustment for a kubernetes horizontal pod autoscaler,” Electronics, vol. 13, no. 1, p. 89, 2024. [Online]. Available: https://www.mdpi.com/2079-9292/13/1/89
[19] N.-M. Dang-Quang and M. Yoo, “Deep learning-based autoscaling using bidirectional long short-term memory for kubernetes,” Applied Sciences, vol. 11, no. 9, p. 3835, 2021. [Online]. Available: https://www.mdpi.com/2076-3417/11/9/3835
[20] N. Bartelucci and P. Bellavista, “A practical guide to autoscaling solutions for next generation internet applications,” in 2023 IEEE International Conference on Metaverse Computing, Networking and Applications (MetaCom). IEEE, 2023, pp. 627–631.
[21] K.-L. Bisdoulis, “Assets forecasting with feature engineering and transformation methods for lightgbm,” arXiv preprint arXiv:2501.07580, 2024, preprint. [Online]. Available: https://arxiv.org/abs/2501.07580
[22] Scikit-learn Contributors, “Lagged features for time series forecasting,” https://scikit-learn.org/stable/auto_examples/applications/plot_time_series_lagged_features.html
, 2025, accessed: 2025-08-14.
[23] dotData Team, “Practical guide for feature engineering of time series data,” https://dotdata.com/blog/practical-guide-for-feature-engineering-of-time-series-data/
, 2023, accessed: 2025-08-14.
[24] Q. Wen, K. He, L. Sun, Y. Zhang, M. Ke, and H. Xu, “Time series data augmentation for deep learning: A survey,” in Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI-21, Z.-H. Zhou, Ed., 2021, pp. 4653–4660, survey Track. [Online]. Available: https://www.ijcai.org/proceedings/2021/0631.pdf
[25] B. K. Iwana and S. Uchida, “An empirical survey of data augmentation for time series classification with neural networks,” PLOS ONE, vol. 16, no. 6, p. e0254841, 2021. [Online]. Available: https://pmc.ncbi.nlm.nih.gov/articles/PMC8282049/
[26] NASA Kennedy Space Center, “Nasa http web server log,” https://ita.ee.lbl.gov/html/contrib/NASA-HTTP.html
, 1995, accessed: 2025-08-24.