4 ms·
This is probably a case where an exponential backoff would be preferable. When the client is faced with a fetch error the first time, it should wait and try aga
by rav 13y ago
This is probably a case where an exponential backoff would be preferable. When the client is faced with a fetch error the first time, it should wait and try again in e.g. 10 minutes, and double the wait for each repeated error. This way, after a week of downtime at the source, each client would send less than four requests for the resource per month.
- ZoFreX 13y agoNo, this is a case where obeying the HTTP specification would be preferable. 410 GONE means: Gone. Don't try again.
- Millennium 13y agoAgreed. Incremental backoff makes sense for the 5xx-class errors, where the error is known to be server-side. But 404 is the only 4xx-class error that it makes any sense for: in any other case, it's pretty certain that your side is doing something wrong. Even when you're not -i.e. if you're absolutely certain that this is the right URL for what you want- a 404 should still trigger some kind of notification so that a person can look into it. Using incremental backoff for 410, in particular, is to miss the point entirely. 410 very explicitly means that you should not try again. The fact that it's so rare only lowers the chance that it's being used incorrectly: someone savvy enough to set up a 410 knows enough to mean it. That said, I'm starting to think that if you're going to implement 410 on your site, you should also start logging activity. When a host keeps looking, either incrementally or otherwise, start refusing connections from that host at the firewall level. A program that sets 4xx-class errors to fail silently probably isn't doing anything about refused connections, so an IP-ban should wake the developers up. Even if it doesn't, you won't have erroneous requests clogging your server logs, so you still benefit.
- vidarh 13y ago> The fact that it's so rare only lowers the chance that it's being used incorrectly: someone savvy enough to set up a 410 knows enough to mean it. I don't see how your conclusion follows from your premise. I fairly often come across cases where obscure options are mainly used by those who don't understand them, and in the absence of data I wouldn't assume that the same couldn't be the case for HTTP responses. Exponential backoff is a quite reasonable compromise for those kind of situations.
- MichaelGG 13y agoWhy should I believe a server knows a URI will never work ever again? If someone hijacks google.com and returns a 410, should we never try again? That's the problem with writing specs that include all sorts of "useful" codes. Like SIP's 6xx "globally unavailable", as if a client is going to trust that some server knows the exact state of the known universe.