gpt4 book ai didi

1/5 host is being overloaded when using Apache Http client & Pooling connection manager to interact with the services(使用Apachehttp客户端和池连接管理器与服务交互时,1/5的主机超载)

转载 作者:bug小助手 更新时间:2023-10-24 22:23:48 25 4
gpt4 key购买 nike



We have service A and Service B, B has 5 hosts which is being called using domain name from Service A. MaxTotal is set as 100 and DefaultMaxPerRoute as 50. No keep alive strategy and no explicit close defined. 1/5 hos is Service B is always loaded and other services are comparatively free. From A to B there are very frequent calls as well. I have read as poolConnectionManger will reuse the connection, would that be the possible causes of this overload. What would be possible solutions? In Service B header there is no keep alive.

我们有服务A和服务B,B有5个主机正在使用服务A的域名调用。MaxTOTAL设置为100,DefaultMaxPerRouting设置为50。没有保持活动策略,也没有定义明确的关闭。1/5的主机是服务B始终处于加载状态,而其他服务相对空闲。从A到B也有非常频繁的通话。我已经了解到poolConnectionManger将重用该连接,这会不会是造成这种超载的可能原因?可能的解决方案是什么?在服务B标头中没有保持活动状态。


Will custom Keep alive will work or should need a explicit close? But if close is being used how the pooling and parallel connection will work? I can not have another load balancer between these two as this two are purely internal.

自定义保持活动是否会起作用,或者应该显式关闭?但是,如果使用Close,池和并行连接将如何工作?我不能在这两者之间有另一个负载平衡器,因为这两个纯粹是内部的。


更多回答

Assuming the server doing the DNS load balancing has been configured correctly (perhaps worth testing manually), you could try adjusting the TTL for how long the domain name is associated with a particular IP: docs.aws.amazon.com/sdk-for-java/v1/developer-guide/… If only 1 instance of Service A is being hit and Service B has the same associated IP for 30 to 60 seconds, then such a problem could occur.

假设执行dns负载平衡的服务器已经正确配置(也许值得手动测试),您可以尝试调整域名与特定IP关联的时间长度:docs.aws.amazon.com/sdk-for-java/v1/developer-guide/…如果只有1个服务A实例被命中,而服务B在30到60秒内具有相同的关联IP,则可能会发生这种问题。

优秀答案推荐
更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com