与 docker 图像更新相关的 Azure 应用服务是否有任何停机时间?
Is there any downtime for Azure app service assosiated with docker image update?
我们将 Azure 应用服务与 linux os 结合使用,并将容器化的 .net 核心应用程序部署到服务中。
使用 Az.Websites ps 模块中的 Set-AzWebApp 函数部署 运行s。传递给该函数的参数之一是 containerimagename,它为服务提供了一个新的容器版本。有一个单独的 CI 进程构建 docker 图像并将其推送到 ACR。
当 Set-AzWebApp 运行s 作为发布管道的一部分并且部署了新容器时,我看不到服务有任何停机时间,这意味着 运行ning 健康检查端点 returns 200在浏览器中,该服务似乎一直可用。但是从某种意义上说,我的测试是不可靠的,因为我只是在 ping 健康检查,这是非常简单的端点,仅在没有 运行ning 数据库请求或其他一些逻辑的情况下运行服务中间件。
根据我的理解,服务需要自行回收以接受新版本的图像,问题是服务的消费者是否会在回收期间遇到任何停机时间,以及请求 运行 在回收过程中?
Azure 应用服务的持续部署功能将帮助您在更新映像时避免停机。 Here可以看到详情:
We'll pull the image and start the container, and we'll wait until
that new container is running and ready for HTTP requests before we
switch over to it. During that time, your old image will continue to
serve requests into your app.
也许你启用了这个功能。
我们将 Azure 应用服务与 linux os 结合使用,并将容器化的 .net 核心应用程序部署到服务中。 使用 Az.Websites ps 模块中的 Set-AzWebApp 函数部署 运行s。传递给该函数的参数之一是 containerimagename,它为服务提供了一个新的容器版本。有一个单独的 CI 进程构建 docker 图像并将其推送到 ACR。 当 Set-AzWebApp 运行s 作为发布管道的一部分并且部署了新容器时,我看不到服务有任何停机时间,这意味着 运行ning 健康检查端点 returns 200在浏览器中,该服务似乎一直可用。但是从某种意义上说,我的测试是不可靠的,因为我只是在 ping 健康检查,这是非常简单的端点,仅在没有 运行ning 数据库请求或其他一些逻辑的情况下运行服务中间件。
根据我的理解,服务需要自行回收以接受新版本的图像,问题是服务的消费者是否会在回收期间遇到任何停机时间,以及请求 运行 在回收过程中?
Azure 应用服务的持续部署功能将帮助您在更新映像时避免停机。 Here可以看到详情:
We'll pull the image and start the container, and we'll wait until that new container is running and ready for HTTP requests before we switch over to it. During that time, your old image will continue to serve requests into your app.
也许你启用了这个功能。