airlift / drift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
242 stars 92 forks source link

thrift.client.retry-same-address=true leads to infinite loop #100

Closed arhimondr closed 5 years ago

arhimondr commented 5 years ago

In case all hosts are down, retrying the same hosts over and over again creates an infinite loop. That creates a lot of CPU pressure, as there is no delay between retrying in case of a ConnectionFailedException.

arhimondr commented 5 years ago

CC: @electrum @dain

dain commented 5 years ago

If we kept a count of the failed connect attempts per address, we could add a simple backoff per address.

arhimondr commented 5 years ago

Resolved by https://github.com/airlift/drift/pull/101