dfinity / agent-rs

A collection of libraries and tools for building software around the Internet Computer, in Rust.
https://sdk.dfinity.org/
Apache License 2.0
123 stars 76 forks source link

feat: introduce http request retries on tcp failures #562

Closed nikolay-komarevskiy closed 5 months ago

nikolay-komarevskiy commented 5 months ago

Description

RouteProvider which is used to dynamically retrieve routing URLs for HTTP calls, can potentially return unhealthy URLs. This will be especially acute once API Boundary Node decentralization feature is released, as node providers will be the ones responsible for API nodes maintenance.

If an HTTP request fails on a URL with a network-related error (e.g., host unreachable, connection timeout, connection refused), then this request can be safely retried by using an alternative routing URL, generated by the RouteProvider. This retrying policy aims at improving user experience.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Checklist: