elastic / elasticsearch-rs

Official Elasticsearch Rust Client
https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/index.html
Apache License 2.0
695 stars 71 forks source link

[ENHANCEMENT] Retry API calls #37

Open russcam opened 4 years ago

russcam commented 4 years ago

All Elasticsearch clients are intended to retry API calls whose response is a 502, 503 or 504 HTTP status code when there is another node that the client knows about against which the request can be retried. The .NET client documentation summarizes the behaviour well.

Retries should also be implemented for the client, once ConnectionPool implementations that accept multiple urls have been implemented.

ghost commented 1 year ago

@russcam C# guy here, seemed like something good to pick up as I want to expand my Rust skills.

So, if there is only one node running Elasticsearch no retry should be attempted with a 502, 503, or 504? Has the ConnectionPool implementations that you are speaking of been implemented?

russcam commented 1 year ago

Hi @WingZer0o,

That's correct. The multi node connection pool is in PR https://github.com/elastic/elasticsearch-rs/pull/189, which remains to be reviewed.

Since I no longer work at Elastic, I no longer have commit rights to this repository, so am unable to merge PRs. @swallez may be able to advise on the best course of action.

ghost commented 1 year ago

@russcam No worries.

shenshouer commented 2 months ago

Doesn't support multi node connection pool at this crate ?