Skip to main content
QUICK REVIEW

[论文解读] Developing a Process in Architecting Microservice Infrastructure with Docker, Kubernetes, and Istio

Yujing Wang, Darrel Ma|arXiv (Cornell University)|Nov 6, 2019
Software System Performance and Reliability参考文献 2被引用 4
一句话总结

本文提出了一种三阶段、与代码库和平台无关的流程,通过使用 Docker、Kubernetes 和 Istio 将单体 Java Spring 应用迁移为微服务。该方法通过容器化实现稳定可扩展的部署,利用 Istio 实现服务间通信的服务网格,通过 Kubernetes ConfigMaps 管理配置,并通过 GitOps 流水线实现自动发布,同时通过优化调用批处理减少服务间延迟。

ABSTRACT

As an application usage grows, its owner scales up vertically by replacing old machines with more powerful ones. This methodology is expensive and leads to resource waste. In response to the business needs, internet giants have developed the microservice architecture, which lets developers divide up their application into smaller units that can be hosted on multiple machines, thus enabling horizontal scale up. We propose a triphasic incremental process to transform a traditional application into a microservice application that guarantees stability during the operation. Then we demonstrated such methodology in a prototype microservice application based on an existing monolithic application. First, the developer splits a monolithic application into atomic services and aggregated services. Second, these services are packaged, containerized, and then deployed on Kubernetes. During this stage, Istio is deployed on the Kubernetes cluster to establish pod level communications, delegate traffic flows and filter requests, and enable the autoscaler. Other external add-ons, such as database connections, are defined in service entry. In the last stage, we developed an algorithm guideline to minimize inter-service calls by compiling all needed calls into a list and perform one finalized call. Although it increases memory usage, it avoided the wait time incurred during interservice calls. We then investigated managing configurations using config maps, recommended a pipeline being developed to perform automatic rollover.

研究动机与目标

  • 解决缺乏可复现、可扩展且可移植的方法来将单体 Java Spring 应用转换为微服务架构的问题。
  • 实现无需供应商或语言锁定的稳定、渐进式迁移。
  • 在保持系统可靠性与性能的前提下,最小化服务间通信开销。
  • 基于 GitOps 原则,实现配置管理的自动化与持续部署。
  • 确保与现有数据基础设施的兼容性,并支持未来的可扩展性。

提出的方法

  • 将单体应用划分为原子服务与聚合服务,以实现模块化分解。
  • 使用 Docker 容器化服务,并通过 Kubernetes 编排实现动态扩展与管理。
  • 集成 Istio 作为服务网格,用于管理服务间通信、流量路由、请求过滤及基于预设阈值的自动扩缩容。
  • 使用 Kubernetes ConfigMaps 将配置外部化,实现无需重新部署应用代码即可远程更新配置。
  • 实现 GitOps 流水线(例如使用 Weave Flux),在远程 Git 仓库中配置变更时自动触发 Pod 重启。
  • 开发一种算法以批处理服务间调用,通过减少往返调用次数降低延迟,实现 O(2(N + L)) 的时间复杂度。

实验结果

研究问题

  • RQ1如何在最小化干扰的前提下,渐进式地将单体应用转换为微服务架构?
  • RQ2在基于 Kubernetes 的微服务环境中,如何有效管理服务发现与服务间通信?
  • RQ3何种数据策略可确保高效读写性能,同时与现有数据基础设施保持兼容?
  • RQ4如何将配置管理与代码解耦,并实现持续部署的自动化?
  • RQ5采用何种技术可最小化服务间通信开销,同时不牺牲功能完整性?

主要发现

  • 三阶段流程成功将一个单体 Java Spring 应用迁移为可扩展的容器化微服务架构,所用技术包括 Docker、Kubernetes 和 Istio。
  • Istio 实现了动态流量管理、请求过滤以及基于预设阈值的自动扩缩容。
  • ConfigMaps 实现了外部化、版本控制的配置,可独立于应用代码进行更新。
  • GitOps 流水线实现了完全自动化、幂等的配置发布,无需人工干预。
  • 批处理算法通过将多个调用合并为单个请求,减少了服务间调用延迟,显著提升了性能。
  • 批处理导致内存使用略有增加,但因等待时间减少带来的性能提升远超其成本。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。