Microservices architecture has been established as an ideal software architecture for cloud-based software development and deployment, offering many benefits such as agility and efficiency. Microservices are often associated with containers and container orchestration systems for deployment, as containerization provides convenient tools and techniques for resource management, including the automation of orchestration processes. Among the factors that make the cloud suitable for commercial software deployment, transient pricing options like AWS Spot Pricing are particularly attractive as they allow consumers to significantly reduce cloud costs. However, the dynamic nature of resource demand and the abrupt termination of spot VMs make transient pricing challenging. Nonetheless, containerization and container orchestration systems open new avenues to optimize the cost of microservices deployments by leveraging spot pricing on the public cloud while achieving application and business goals. We propose SpotKube, an open-source, Kubernetes-based, application-aware, genetic algorithm-based solution for cost optimization, which autoscales clusters for microservices-based applications hosted on public clouds with spot pricing options. SpotKube analyzes application characteristics and recommends the optimal configuration for resource allocation to the cluster. It consists of an elastic cluster autoscaler powered by an optimization algorithm that ensures cost-effective microservices deployment while meeting application performance requirements and handling abrupt termination of nodes, thereby minimizing the impact on system availability. We implement and evaluate SpotKube with representative microservices-based applications in a real public cloud setup, demonstrating the effectiveness of our approach against alternative optimization strategies.
翻译:微服务架构已成为基于云计算的软件开发和部署的理想架构,具有敏捷性和高效性等诸多优势。微服务通常与容器和容器编排系统协同部署,因为容器化为资源管理提供了便捷工具和技术,包括自动化编排流程。在使云平台适合商业软件部署的因素中,AWS竞价实例等临时定价选项尤为吸引人,它使消费者能够显著降低云成本。然而,资源需求的动态变化和竞价虚拟机的突然终止使得临时定价面临挑战。尽管如此,容器化技术和容器编排系统开辟了新途径,通过利用公有云的竞价定价来优化微服务部署成本,同时实现应用和业务目标。我们提出了SpotKube——一种基于Kubernetes的开源、应用感知的遗传算法解决方案,用于成本优化。该方案能为托管在提供竞价定价选项的公有云上的微服务应用自动扩缩集群。SpotKube通过分析应用特征,为集群资源分配推荐最优配置。其核心包含由优化算法驱动的弹性集群自动扩缩器,在确保满足应用性能需求和处理节点突然终止问题的同时,实现成本效益最优的微服务部署,从而最大限度降低对系统可用性的影响。我们在真实公有云环境中使用代表性微服务应用对SpotKube进行实现与评估,证明了该方法相较于其他优化策略的有效性。