如何专业地热更新应用程序
我想知道有多大的应用程序(具有多个应用程序服务器和负载均衡器)可以在不让用户离线的情况下热更新到实际版本。此处跳过数据库模式 - 仅应用程序层。
例如,有多个由 haproxy 平衡的 glassfish 服务器,我们想要更新多个服务器上的应用程序。
这个例子中使用了什么?我知道这可能很复杂,但请告诉我方法。
I wonder how big aplications (with several appliacation servers and loadbalancers) are hot update to actual version without takeing offline for users. Skipping database shema here - only application layer.
For example there is several glassfish servers balanced by haproxy and We want to update application which is on several servers.
What is used in this case? I know this may by complicated but please enlight me about methods.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Rails 网站经常使用 Capistrano 来部署代码。代码在每个服务器上更新,并且网络服务器(主要是 apache 或 nginx )通常使用像乘客这样的插件。 Passenger 重新启动并重新加载已更新的代码库(通过 Rails 根目录中的 touch tmp/restart 完成)。下一个 Web 请求将发送给使用更新代码的 Passenger。
Twitter 的大部分内容(据我所知,后端处理是在 Erlang 中进行的),我相信几乎所有的 Hulu 都使用与此类似的技术。
Rails websites frequently use Capistrano to deploy code. The code is updated on each server and the webserver (apache or nginx mostly ) usually uses a plugin like passenger. Passenger restarts and reloads the code base which was updated (accomplished by touch tmp/restart in the rails root directory ). The next web request will be sent to Passenger which is using the updated code.
Much of Twitter (from what I hear the backend processing is in Erlang) and I believe almost all of Hulu use techniques similar to this.
在>1服务器共享无配置中执行此操作的经典方法是使一台服务器脱机,即指示前端Web服务器或负载平衡器仅将流量引导到其他服务器。
然后可以升级并重新启动离线服务器。然后重新配置前端以将流量分配到升级后的服务器。
对所有服务器执行此操作最终会导致完全升级。
The classical way of doing this in an >1-server-shared-nothing-configuration is to take one server offline, i.e. instructing the front end web servers or load balancers to direct traffic to the other servers only.
The offline server can then be upgraded and started again. Then the front-ends are re-configured to didtribute traffic to the upgraded server.
Doing this with all servers eventually results in a complete umgrade.