开发者

Finding Service unavailaibity

开发者 https://www.devze.com 2023-01-18 18:42 出处:网络
I have written a service which is dependent on other other service. Usually if other service timeouts or not responding then my service response time is affected. Is there any way I can find out that

I have written a service which is dependent on other other service. Usually if other service timeouts or not responding then my service response time is affected. Is there any way I can find out that for how much time the service outage 开发者_运维百科is so taht i can wait for that many seconds and then retry.

Thanks, Shruti


In general: no, it's not possible, you probably shouldn't even know where the service is that you're accessing.
In your implementation: who knows, you might be lucky.
The normal way would be to wait for some time and then throw an exception.

0

精彩评论

暂无评论...
验证码 换一张
取 消