kam*_*oor 6 .net java algorithm rest design-patterns
我们有多个资源作为REST服务公开,并运行设计参数,如果服务因网络和/或应用程序级别故障而不可用,客户端是否需要实现重试逻辑.这值得么?一组认为,如果服务不可用,则没有重新尝试的点,但其他组织认为可能存在网络繁忙问题并且重试可能会有所帮助.目前没有统计数据可以为这两个论点辩护.如何实现回退URL(原始http资源的副本)并在失败期间使用回退服务.
根据您以前的经验提出任何建议吗?
Keep in mind that when a service request is failing, it can be due to network overload or service degradation. In several cases the best option is to just fail immediately. Regarding using a fall back URL, it probably will not solve your problem, since it could keep network under high load.
Suggestion is to take a look in patterns such as: