最大限度地减少部署期间的客户干扰

发布于 2024-10-31 13:25:47 字数 338 浏览 1 评论 0原文

如何将新代码部署到生产中以使客户体验不被中断?

让我们假设一个电子商务网站处于负载平衡环境中,其中没有共享会话状态。 Tomcat 是应用程序服务器。

我能想到的唯一想法是(1)使用JavaRebel,但我没有这方面的经验,也不知道会出现什么问题(也许会话对象不匹配,例如,如果您从类中删除成员)(2 ) 实时监控用户的购物体验并防止将新商品添加到购物车;等到所有现有购物者完成订单或订单过期;然后关闭服务器并部署新代码。

有什么想法吗?或者在这种情况下,使用 terracotta 之类的东西在 Web 服务器之间共享会话数据至关重要?话又说回来,如何将新代码部署到已删除或添加会话对象成员的 Web 服务器上?

How do you deploy new code into production so that the customer experience is not interrupted?

Let's assume an e-commerce website that's in a load balanced environment, where no session state is shared. Tomcat is the application server.

The only ideas I can come up with are (1) use JavaRebel, but I have no experience with this and don't know what could go wrong (maybe session object mismatch, for example if you remove a member from a class) (2) have real-time monitoring of where your users are in the shopping experience and prevent new items from being added to the cart; wait until all existing shoppers have completed their order or have expired; then turn off the server and deploy new code.

Any ideas? Or is this a situation where it's critical to share session data among the web servers with something like terracotta? Then again, how do you deploy new code to the web servers where a session's object member has been removed or added?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

若水微香 2024-11-07 13:25:47

我见过的常见方法:

  • 如果没有太多状态,则将其存储在客户端的 cookie 中 - 这也具有不需要 IP 关联的优点,因此请求可以更均匀地分配
  • 共享存储(DB、Terracotta 等) 瓶颈
  • - 显然,这可能会成为安静时间部署的
  • ,并希望没有人注意到从新会话池中删除服务器,然后监视日志并等待请求消失

Common approaches I've seen:

  • if there's not much state then store it client-side, in a cookie - this also has the advantage of not requiring IP affinity so requests can be distributed more evenly
  • shared storage (DB, Terracotta, etc.) - obviously this can become a bottleneck
  • deploy at a quiet time and hope nobody notices
  • remove server from pool for new sessions, then monitor the logs and wait for requests to die off
寄意 2024-11-07 13:25:47

一种常见的方法是一次从负载平衡池中取出一台服务器,将新代码部署到其中,然后将其放回池中。

A common approach is to take one server at a time out of the load balancing pool, deploy the new code to it, and then put it back into the pool.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文