HOW TO handle web request errors
I like illustrations that summarize a whole topic
Paraphrased notes from a LinkedIn post of Alex Xu:
Intermittent errors can be handled effectively with exponential backoff in the browser and with a flow control gateway on the server side.
Exponential backoff controls the latency between two retries.
A common way to control the flow of HTTP requests is to set up a flow control gateway in front of the server. This provides two useful tools:
1. Rate limiter, which limits how often a request can be made. It has two slightly different choices; the token bucket and the leaky bucket.
2. Circuit breaker. This will stop the HTTP flow immediately when the error threshold is exceeded. After a set amount of time, it will only let a limited amount of HTTP traffic through. If everything works well, it will slowly let all HTTP traffic through.
More answers to web dev questions:
Comments
Post a Comment