Droplet
Droplet copied to clipboard
Add a retry mechanism for some requests
The server might answer a code 503 if it's busy. We have to sleep() a bit then retry
have to think if retry might be at application level.
Amazon S3 in particular needs a retry if the server returns 503 Slow Down on a PUT.
Droplet blacklists a server if it returns a 5xx HTTP status, which is generally a good thing. But if the application had to retry these errors, it would have to interact with the blacklist logic in strange ways in order to be effective.
I think implementing the retries in Droplet would be cleaner, and all applications would automatically benefit.