如何更新/升级 Spring Boot 云应用程序

ger*_*ard 5 java spring spring-boot microservices

I want to find out what is the best way to update a spring boot application in production without affecting clients that calls these microservices?

The spring boot application uses Consul for service registration. So, stopping the spring boot app, would take down the service and clients would not be able to call this service until it starts up again and registers itself with Consul.

Is this just the way it is supposed to work, or is there a workaround to reduce downtime to 0? For e.x. start up the updated version of the spring boot app (in this case there would be 2 servers registered under Consul, 1 old version, 1 new version), then kill the old version.

Kri*_*kar 0

生产系统通常采用滚动更新策略来增量升级/降级服务,以实现 ZDD(零停机部署)。

编排框架(如 Kubernetes)内置了此功能:

Kubernetes 中的滚动更新