Publications-Theses
Article View/Open
Publication Export
-
Google ScholarTM
NCCU Library
Citation Infomation
Related Publications in TAIR
題名 基於數據驅動與模組化篩選機制的自適應HPA模組設計與實現
Design and Implementation of an Adaptive HPA Module Based on Data-Driven and Modular Filtering Mechanisms作者 王盛泰
Wang, Sheng-Tai貢獻者 張宏慶
Jang, Hung-Chin
王盛泰
Wang, Sheng-Tai關鍵詞 水平自動縮放
微服務架構
數據驅動
雲端計算
容器
資源管理穩定性
機器學習
服務品質
Horizontal Pod Autoscaler
Microservice architecture
Data-driven
Cloud computing
Containers
Resource management stability
Machine learning
Quality of service日期 2024 上傳時間 1-Jul-2024 12:30:14 (UTC+8) 摘要 微服務是近年來,很受歡迎的應用程式部署方式,透過對應用程式解偶,使其成為功能獨立的微服務,就可以讓應用程式某些遇上需求瓶頸的微服務水平擴充,而不影響到其它微服務。透過利用Kubernetes平台與其相關的網路套件,我們可以自動化將服務請求導向至對應的微服務實體,並且依照特定規則與閾值進行自動化水平擴展(Horizontal Pod Autoscaler, HPA)。現有的HPA模組透過設定同服務容器的平均資源使用率與監控當前資源使用率,動態調整提供服務所需的容器數量。現有的HPA模組的演算法運算簡單並且實作容易,運作起來也有一定的績效,目前已被kubernetes平台使用多年。它能確保資源使用率,但它無法直接針對服務品質進行有系統的分析與並根據結果提出縮放決策。除此之外,當需求流量變化很大時,縮放週期短會導致頻繁新建或終止多個容器,造成系統不穩定與產生額外的系統負擔;相反地在週期長時,則會跟不上流量的變化,導致服務品質不穩定,甚至極端狀況可能會劇烈增加到無法接受的程度。本研究提出一種模組化的篩選方法,並依照此流程實作可以確保服務品質並維持穩定性的HPA模組。此模組又分為三個部分,第一部分透過預測模組確保可能的決策行為是否合乎服務品質;第二部分透過篩選模組,依照所需的策略遴選出最好的決策;第三部分透過穩定性模組,從最佳決策與穩定性決策中選出最終決策。研究結果顯示,提出的HPA模組在實驗的所有情況下,依然保持與現有算法接近的平均CPU使用率與平均反應時間,但大幅減少了運行期間所新建或刪除的容器數。最後本研究提出還可以進一步改善的部分,以及可以考量的實驗設計,以供未來從事相關研究的人參考。
Microservices have become a popular application deployment method, allowing inde-pendent scaling of specific microservices without affecting others. Using the Kubernetes platform and related network packages, service requests can be automated to route to corre-sponding microservices and perform horizontal scaling. One specific implementation of horizontal scaling is the Horizontal Pod Autoscaler (HPA), which adjusts the number of service containers dynamically by setting and monitoring average resource usage. The ex-isting HPA module uses a simple algorithm that has been easy to implement and effective for years on Kubernetes. While it ensures resource utilization, it cannot systematically ana-lyze service quality or make scaling decisions based on these analyses. Frequent scaling due to demand fluctuations can cause system instability and extra burden, while slow scaling can't keep up with traffic changes, affecting service quality. This study proposes a modular filtering method to ensure service quality and stability in HPA, divided into three parts: a prediction module to ensure decisions comply with service quality, a filtering module to select the best strategy, and a stability module to choose the final decision. The proposed HPA module maintains CPU utilization and response times close to the existing algorithm but significantly reduces container creation and deletion during operation. Lastly, the study suggests areas for improvement and experimental design considerations for future research.參考文獻 [1] G. Liu, B. Huang, Z. Liang, M. Qin, H. Zhou and Z. Li, "Microservices: architecture, container, and challenges," 2020 IEEE 20th International Conference on Software Quality, Reliability and Security Companion (QRS-C), Macau, China, 2020, pp. 629-635, doi: 10.1109/QRS-C51114.2020.00107. [2] Z. Xiao, I. Wijegunaratne and X. Qiang, "Reflections on SOA and Microservices," 2016 4th International Conference on Enterprise Systems (ES), Melbourne, VIC, Australia, 2016, pp. 60-67, doi: 10.1109/ES.2016.14. [3] Oracle, "What is Cloud Native?," Oracle Cloud, https://www.oracle.com/cloud/cloud-native/what-is-cloud-native/. [4] T. Salah, M. J. Zemerly, C. Y. Yeun, M. Al-Qutayri and Y. Al-Hammadi, "Performance comparison between container-based and VM-based services," 2017 20th Conference on Innovations in Clouds, Internet and Networks (ICIN), Paris, France, 2017, pp. 185-190, doi: 10.1109/ICIN.2017.7899408. [5] "Linux namespaces," Wikipedia, https://en.wikipedia.org/wiki/Linux_namespaces. [6] "Cgroups," Wikipedia, https://en.wikipedia.org/wiki/Cgroups. [7] H. Qian, Q. Wen, L. Sun, J. Gu, Q. Niu and Z. Tang, "RobustScaler: QoS-Aware Au-toscaling for Complex Workloads," 2022 IEEE 38th International Conference on Data Engineering (ICDE), Kuala Lumpur, Malaysia, 2022, pp. 2762-2775, doi: 10.1109/ICDE53745.2022.00252. [8] Zheng, T., Zheng, X., Zhang, Y. et al. SmartVM: a SLA-aware microservice deploy-ment framework. World Wide Web 22, 275–293 (2019). [9] Umberger, M., Lumbar, S. & Humar, I. Modeling the influence of network delay on the user experience in distributed home-automation networks. Inf Syst Front 14, 571–584 (2012). [10] Paula R. Selvidge, Barbara S. Chaparro, Gregory T. Bender. The world wide wait: ef-fects of delays on user performance. International Journal of Industrial Ergonomics, Volume 29, Issue 1, 2002,Pages 15-20, ISSN 0169-8141. [11] Dimitris Tsolkas, Eirini Liotou, Nikos Passas, Lazaros Merakos, A survey on paramet-ric QoE estimation for popular services. Journal of Network and Computer Applica-tions, Volume 77, 2017, Pages 1-17, ISSN 1084-8045. [12] Prometheus, "Configuration," Prometheus Documentation, https://prometheus.io/docs/prometheus/latest/configuration/configuration/. [13] Nguyen, T.-T.; Yeom, Y.-J.; Kim, T.; Park, D.-H.; Kim, S. Horizontal Pod Autoscaling in Kubernetes for Elastic Container Orchestration. Sensors 2020, 20, 4621. [14] Casalicchio, E. A study on performance measures for auto-scaling CPU-intensive con-tainerized applications. Cluster Comput 22, 995–1006 (2019). [15] K. Aykurt et al., "HyPA: Hybrid Horizontal Pod Autoscaling with Automated Model Updates," 2023 IEEE Conference on Network Function Virtualization and Software De-fined Networks (NFV-SDN), Dresden, Germany, 2023, pp. 8-14, doi: 10.1109/NFV-SDN59219.2023.10329742. [16] G. Yu, P. Chen and Z. Zheng, "Microscaler: Cost-Effective Scaling for Microservice Applications in the Cloud With an Online Learning Approach," in IEEE Transactions on Cloud Computing, vol. 10, no. 2, pp. 1100-1116, 1 April-June 2022, doi: 10.1109/TCC.2020.2985352. [17] S. Roy, A. C. König, I. Dvorkin and M. Kumar, "PerfAugur: Robust diagnostics for per-formance anomalies in cloud services," 2015 IEEE 31st International Conference on Data Engineering, Seoul, Korea (South), 2015, pp. 1167-1178, doi: 10.1109/ICDE.2015.7113365. [18] Z. Xiao and S. Hu, "DScaler: A Horizontal Autoscaler of Microservice Based on Deep Reinforcement Learning," 2022 23rd Asia-Pacific Network Operations and Manage-ment Symposium (APNOMS), Takamatsu, Japan, 2022, pp. 1-6, doi: 10.23919/APNOMS56106.2022.9919994. [19] Horn, A., Fard, H.M., Wolf, F. (2022). Multi-objective Hybrid Autoscaling of Micro-services in Kubernetes Clusters. In: Cano, J., Trinder, P. (eds) Euro-Par 2022: Parallel Processing. Euro-Par 2022. Lecture Notes in Computer Science, vol 13440. Springer, Cham. [20] R. Chowdhury, C. Talhi, H. Ould-Slimane and A. Mourad, "Proactive and Intelligent Monitoring and Orchestration of Cloud-Native IP Multimedia Subsystem," in IEEE Open Journal of the Communications Society, vol. 5, pp. 139-155, 2024, doi: 10.1109/OJCOMS.2023.3341002. [21] Jiang, Chunmao and Peng Wu. “A Fine-Grained Horizontal Scaling Method for Con-tainer-Based Cloud.” Sci. Program. 2021 (2021): 6397786:1-6397786:10. [22] Pozdniakova, O.; Mažeika, D.; Cholomskis, A. SLA-Adaptive Threshold Adjustment for a Kubernetes Horizontal Pod Autoscaler. Electronics 2024, 13, 1242. https://doi.org/10.3390/electronics13071242 [23] M. -N. Tran, D. -D. Vu and Y. Kim, "A Survey of Autoscaling in Kubernetes," 2022 Thirteenth International Conference on Ubiquitous and Future Networks (ICUFN), Bar-celona, Spain, 2022, pp. 263-265, doi: 10.1109/ICUFN55119.2022.9829572. [24] Senjab, K., Abbas, S., Ahmed, N. et al. A survey of Kubernetes scheduling algorithms. J Cloud Comp 12, 87 (2023). https://doi.org/10.1186/s13677-023-00471-1 [25] Kubernetes.io, "Horizontal Pod Autoscaler," Kubernetes Documentation. https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/. 描述 碩士
國立政治大學
資訊科學系
110753147資料來源 http://thesis.lib.nccu.edu.tw/record/#G0110753147 資料類型 thesis dc.contributor.advisor 張宏慶 zh_TW dc.contributor.advisor Jang, Hung-Chin en_US dc.contributor.author (Authors) 王盛泰 zh_TW dc.contributor.author (Authors) Wang, Sheng-Tai en_US dc.creator (作者) 王盛泰 zh_TW dc.creator (作者) Wang, Sheng-Tai en_US dc.date (日期) 2024 en_US dc.date.accessioned 1-Jul-2024 12:30:14 (UTC+8) - dc.date.available 1-Jul-2024 12:30:14 (UTC+8) - dc.date.issued (上傳時間) 1-Jul-2024 12:30:14 (UTC+8) - dc.identifier (Other Identifiers) G0110753147 en_US dc.identifier.uri (URI) https://nccur.lib.nccu.edu.tw/handle/140.119/152035 - dc.description (描述) 碩士 zh_TW dc.description (描述) 國立政治大學 zh_TW dc.description (描述) 資訊科學系 zh_TW dc.description (描述) 110753147 zh_TW dc.description.abstract (摘要) 微服務是近年來,很受歡迎的應用程式部署方式,透過對應用程式解偶,使其成為功能獨立的微服務,就可以讓應用程式某些遇上需求瓶頸的微服務水平擴充,而不影響到其它微服務。透過利用Kubernetes平台與其相關的網路套件,我們可以自動化將服務請求導向至對應的微服務實體,並且依照特定規則與閾值進行自動化水平擴展(Horizontal Pod Autoscaler, HPA)。現有的HPA模組透過設定同服務容器的平均資源使用率與監控當前資源使用率,動態調整提供服務所需的容器數量。現有的HPA模組的演算法運算簡單並且實作容易,運作起來也有一定的績效,目前已被kubernetes平台使用多年。它能確保資源使用率,但它無法直接針對服務品質進行有系統的分析與並根據結果提出縮放決策。除此之外,當需求流量變化很大時,縮放週期短會導致頻繁新建或終止多個容器,造成系統不穩定與產生額外的系統負擔;相反地在週期長時,則會跟不上流量的變化,導致服務品質不穩定,甚至極端狀況可能會劇烈增加到無法接受的程度。本研究提出一種模組化的篩選方法,並依照此流程實作可以確保服務品質並維持穩定性的HPA模組。此模組又分為三個部分,第一部分透過預測模組確保可能的決策行為是否合乎服務品質;第二部分透過篩選模組,依照所需的策略遴選出最好的決策;第三部分透過穩定性模組,從最佳決策與穩定性決策中選出最終決策。研究結果顯示,提出的HPA模組在實驗的所有情況下,依然保持與現有算法接近的平均CPU使用率與平均反應時間,但大幅減少了運行期間所新建或刪除的容器數。最後本研究提出還可以進一步改善的部分,以及可以考量的實驗設計,以供未來從事相關研究的人參考。 zh_TW dc.description.abstract (摘要) Microservices have become a popular application deployment method, allowing inde-pendent scaling of specific microservices without affecting others. Using the Kubernetes platform and related network packages, service requests can be automated to route to corre-sponding microservices and perform horizontal scaling. One specific implementation of horizontal scaling is the Horizontal Pod Autoscaler (HPA), which adjusts the number of service containers dynamically by setting and monitoring average resource usage. The ex-isting HPA module uses a simple algorithm that has been easy to implement and effective for years on Kubernetes. While it ensures resource utilization, it cannot systematically ana-lyze service quality or make scaling decisions based on these analyses. Frequent scaling due to demand fluctuations can cause system instability and extra burden, while slow scaling can't keep up with traffic changes, affecting service quality. This study proposes a modular filtering method to ensure service quality and stability in HPA, divided into three parts: a prediction module to ensure decisions comply with service quality, a filtering module to select the best strategy, and a stability module to choose the final decision. The proposed HPA module maintains CPU utilization and response times close to the existing algorithm but significantly reduces container creation and deletion during operation. Lastly, the study suggests areas for improvement and experimental design considerations for future research. en_US dc.description.tableofcontents 摘要 2 目錄 4 表目錄 7 圖目錄 8 第一章 緒論 10 1.1 研究動機 10 1.2 研究背景 11 1.2.1 單體式架構與微服務架構 11 1.2.2 雲端原生 12 1.2.3 Docker與容器 14 1.2.4 Kubernetes與Pod 16 1.2.5 Kubernetes中的流量管理與服務網格 20 1.2.6 HPA/VPA/CA 21 1.2.7 Monitor-Analyze-Plan-Execute 24 1.2.8 預測模型 25 1.2.9 服務品質與容忍度 27 1.3 研究目標 28 1.4 論文架構 29 第二章 相關研究 30 2.1 針對K-HPA運作效能的研究 30 2.2 基於需求預測的HPA研究 31 2.3 基於服務網格的HPA研究 32 2.4 基於機器學習的HPA研究 35 2.5基於規則的HPA研究 37 2.6針對HPA的綜述研究 38 第三章 研究方法與實驗設計 40 3.1 問題分析 40 3.2 系統架構 42 3.2.1 預測模組 45 3.2.2 篩選模組 45 3.2.3 穩定性模組 46 3.2.4 虛擬碼與說明 47 3.3 樣本蒐集與分析 49 3.3.1 樣本蒐集方法 49 3.3.2 樣本分析 50 第四章 實驗結果 54 4.1 實驗環境 54 4.1.1 實驗網路架構: 54 4.1.2 各裝置資源配置 56 4.1.3 實驗參數設定 56 4.2 實驗流程 57 4.3 實驗結果與分析 57 4.3.1 預測模組 58 4.3.2 整體實驗結果 68 第五章 結論與未來研究 76 5.1 結論 76 5.2 未來研究 77 參考文獻 79 zh_TW dc.format.extent 3819221 bytes - dc.format.mimetype application/pdf - dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0110753147 en_US dc.subject (關鍵詞) 水平自動縮放 zh_TW dc.subject (關鍵詞) 微服務架構 zh_TW dc.subject (關鍵詞) 數據驅動 zh_TW dc.subject (關鍵詞) 雲端計算 zh_TW dc.subject (關鍵詞) 容器 zh_TW dc.subject (關鍵詞) 資源管理穩定性 zh_TW dc.subject (關鍵詞) 機器學習 zh_TW dc.subject (關鍵詞) 服務品質 zh_TW dc.subject (關鍵詞) Horizontal Pod Autoscaler en_US dc.subject (關鍵詞) Microservice architecture en_US dc.subject (關鍵詞) Data-driven en_US dc.subject (關鍵詞) Cloud computing en_US dc.subject (關鍵詞) Containers en_US dc.subject (關鍵詞) Resource management stability en_US dc.subject (關鍵詞) Machine learning en_US dc.subject (關鍵詞) Quality of service en_US dc.title (題名) 基於數據驅動與模組化篩選機制的自適應HPA模組設計與實現 zh_TW dc.title (題名) Design and Implementation of an Adaptive HPA Module Based on Data-Driven and Modular Filtering Mechanisms en_US dc.type (資料類型) thesis en_US dc.relation.reference (參考文獻) [1] G. Liu, B. Huang, Z. Liang, M. Qin, H. Zhou and Z. Li, "Microservices: architecture, container, and challenges," 2020 IEEE 20th International Conference on Software Quality, Reliability and Security Companion (QRS-C), Macau, China, 2020, pp. 629-635, doi: 10.1109/QRS-C51114.2020.00107. [2] Z. Xiao, I. Wijegunaratne and X. Qiang, "Reflections on SOA and Microservices," 2016 4th International Conference on Enterprise Systems (ES), Melbourne, VIC, Australia, 2016, pp. 60-67, doi: 10.1109/ES.2016.14. [3] Oracle, "What is Cloud Native?," Oracle Cloud, https://www.oracle.com/cloud/cloud-native/what-is-cloud-native/. [4] T. Salah, M. J. Zemerly, C. Y. Yeun, M. Al-Qutayri and Y. Al-Hammadi, "Performance comparison between container-based and VM-based services," 2017 20th Conference on Innovations in Clouds, Internet and Networks (ICIN), Paris, France, 2017, pp. 185-190, doi: 10.1109/ICIN.2017.7899408. [5] "Linux namespaces," Wikipedia, https://en.wikipedia.org/wiki/Linux_namespaces. [6] "Cgroups," Wikipedia, https://en.wikipedia.org/wiki/Cgroups. [7] H. Qian, Q. Wen, L. Sun, J. Gu, Q. Niu and Z. Tang, "RobustScaler: QoS-Aware Au-toscaling for Complex Workloads," 2022 IEEE 38th International Conference on Data Engineering (ICDE), Kuala Lumpur, Malaysia, 2022, pp. 2762-2775, doi: 10.1109/ICDE53745.2022.00252. [8] Zheng, T., Zheng, X., Zhang, Y. et al. SmartVM: a SLA-aware microservice deploy-ment framework. World Wide Web 22, 275–293 (2019). [9] Umberger, M., Lumbar, S. & Humar, I. Modeling the influence of network delay on the user experience in distributed home-automation networks. Inf Syst Front 14, 571–584 (2012). [10] Paula R. Selvidge, Barbara S. Chaparro, Gregory T. Bender. The world wide wait: ef-fects of delays on user performance. International Journal of Industrial Ergonomics, Volume 29, Issue 1, 2002,Pages 15-20, ISSN 0169-8141. [11] Dimitris Tsolkas, Eirini Liotou, Nikos Passas, Lazaros Merakos, A survey on paramet-ric QoE estimation for popular services. Journal of Network and Computer Applica-tions, Volume 77, 2017, Pages 1-17, ISSN 1084-8045. [12] Prometheus, "Configuration," Prometheus Documentation, https://prometheus.io/docs/prometheus/latest/configuration/configuration/. [13] Nguyen, T.-T.; Yeom, Y.-J.; Kim, T.; Park, D.-H.; Kim, S. Horizontal Pod Autoscaling in Kubernetes for Elastic Container Orchestration. Sensors 2020, 20, 4621. [14] Casalicchio, E. A study on performance measures for auto-scaling CPU-intensive con-tainerized applications. Cluster Comput 22, 995–1006 (2019). [15] K. Aykurt et al., "HyPA: Hybrid Horizontal Pod Autoscaling with Automated Model Updates," 2023 IEEE Conference on Network Function Virtualization and Software De-fined Networks (NFV-SDN), Dresden, Germany, 2023, pp. 8-14, doi: 10.1109/NFV-SDN59219.2023.10329742. [16] G. Yu, P. Chen and Z. Zheng, "Microscaler: Cost-Effective Scaling for Microservice Applications in the Cloud With an Online Learning Approach," in IEEE Transactions on Cloud Computing, vol. 10, no. 2, pp. 1100-1116, 1 April-June 2022, doi: 10.1109/TCC.2020.2985352. [17] S. Roy, A. C. König, I. Dvorkin and M. Kumar, "PerfAugur: Robust diagnostics for per-formance anomalies in cloud services," 2015 IEEE 31st International Conference on Data Engineering, Seoul, Korea (South), 2015, pp. 1167-1178, doi: 10.1109/ICDE.2015.7113365. [18] Z. Xiao and S. Hu, "DScaler: A Horizontal Autoscaler of Microservice Based on Deep Reinforcement Learning," 2022 23rd Asia-Pacific Network Operations and Manage-ment Symposium (APNOMS), Takamatsu, Japan, 2022, pp. 1-6, doi: 10.23919/APNOMS56106.2022.9919994. [19] Horn, A., Fard, H.M., Wolf, F. (2022). Multi-objective Hybrid Autoscaling of Micro-services in Kubernetes Clusters. In: Cano, J., Trinder, P. (eds) Euro-Par 2022: Parallel Processing. Euro-Par 2022. Lecture Notes in Computer Science, vol 13440. Springer, Cham. [20] R. Chowdhury, C. Talhi, H. Ould-Slimane and A. Mourad, "Proactive and Intelligent Monitoring and Orchestration of Cloud-Native IP Multimedia Subsystem," in IEEE Open Journal of the Communications Society, vol. 5, pp. 139-155, 2024, doi: 10.1109/OJCOMS.2023.3341002. [21] Jiang, Chunmao and Peng Wu. “A Fine-Grained Horizontal Scaling Method for Con-tainer-Based Cloud.” Sci. Program. 2021 (2021): 6397786:1-6397786:10. [22] Pozdniakova, O.; Mažeika, D.; Cholomskis, A. SLA-Adaptive Threshold Adjustment for a Kubernetes Horizontal Pod Autoscaler. Electronics 2024, 13, 1242. https://doi.org/10.3390/electronics13071242 [23] M. -N. Tran, D. -D. Vu and Y. Kim, "A Survey of Autoscaling in Kubernetes," 2022 Thirteenth International Conference on Ubiquitous and Future Networks (ICUFN), Bar-celona, Spain, 2022, pp. 263-265, doi: 10.1109/ICUFN55119.2022.9829572. [24] Senjab, K., Abbas, S., Ahmed, N. et al. A survey of Kubernetes scheduling algorithms. J Cloud Comp 12, 87 (2023). https://doi.org/10.1186/s13677-023-00471-1 [25] Kubernetes.io, "Horizontal Pod Autoscaler," Kubernetes Documentation. https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/. zh_TW