nirum-lang / nirum

Nirum: IDL compiler and RPC/distributed object framework for microservices
https://nirum.org/
GNU General Public License v3.0
121 stars 28 forks source link

Make a HTTP request with exponential backoff and jitter #264

Open kanghyojun opened 6 years ago

kanghyojun commented 6 years ago

Making multiple HTTP requests at once could make a similar effect to DoS attack. So it is helpful to keep service availability that HttpTransport support exponential backoff and jitter when making an HTTP request.

dahlia commented 6 years ago

A transport implementation is impossible to determine which methods can be retried (i.e., are idempotent) and which methods can't. This should be determined by a programmer who implements the method, and probably annotated as well.

We may need to file a new issue for introducing a method annotation to mark it as idempotent first.

Kroisse commented 6 years ago

Ref: https://aws.amazon.com/ko/blogs/architecture/exponential-backoff-and-jitter/

Comparison of backoff algorithms