chenjinxuan commented on issue #8489: URL: https://github.com/apache/apisix/issues/8489#issuecomment-1350657838
> > 只是当大量deployment同时滚动时,会出现apisix无法更新pod ip情况,最后导致请求到旧的pod ip上 > > kubernetes 从 “endpoinst 摘除旧 pod ip” 和 “删除 旧 pod ” 是并行的. 如果 "删除 旧 pod " 先执行完毕, “endpoinst 摘除旧 pod ip” 后执行完, 那问题就不可避免了. 这里的最佳实践是 定制 pod 的 preStop , 并且在 “preStop” 中 "sleep" 一段时间 . > > 如果你怀疑是延迟导致的, 那么可以考虑三个方面: > > * pod 的变动反应到 endpoints 中的延迟 > * endpoints 的变动 到 kubernetes discovery 接收到 events 的延迟 > * kubernetes discovery 接收到 events 后,修改 nodes 列表的延迟 > > 为了验证,可以做如下试验: > > 1. 将 apisix 日志级别改为 debug > 2. 模拟 滚动 deployment > 3. 对比 kubernetes discovery 的日志打印时间和日志内容里面的更改时间,两个时间差值可以反应出延迟情况 > > @chenjinxuan @tzssangglass 我这边的情况是,当我大批量滚动deployment的时候,会出现apisix一直(长达10分钟以上)不更新pod ip情况 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
