You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/09/04 12:20:39 UTC

[GitHub] rangtao opened a new issue #2435: 框架优雅停机若干问题总结

rangtao opened a new issue #2435: 框架优雅停机若干问题总结
URL: https://github.com/apache/incubator-dubbo/issues/2435
 
 
   我们在测试及生产环境下总结目前Dubbo优雅停机问题存在几个问题:
   [1]Spring可能先于框架关闭,导致业务服务无法正确执行完成;
   [2]tomcat+spring场景,中间件停机可能会导致class被回收,导致log日志无法输出,甚至报class not found;
   [3]如果存在多个hook,如spring本身有hook,无法保证hook执行顺序;
   [4]zk在大数据量同步通知下延迟严重,导致注销后仍有请求(目前版本简单sleep了一下);
   [5]停机时间无法设置,官方关于“停机设置标志位”的描述有误。
   
   综上所述,我们的优化作法是将框架的优雅停机委托给Spring管理,通过监听Spring的close事件触发停机,这样做有两个好处:(1)保证框架停机优于Spring关闭;(2)应用用起来简单,只需要维护Spring生命周期;(3)相对于hook方式,主动调用停机接口更让人放心。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org