最大限度地减少部署期间的客户干扰
如何将新代码部署到生产中以使客户体验不被中断?
让我们假设一个电子商务网站处于负载平衡环境中,其中没有共享会话状态。 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我见过的常见方法:
Common approaches I've seen:
一种常见的方法是一次从负载平衡池中取出一台服务器,将新代码部署到其中,然后将其放回池中。
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.