3 ms·
When I built an app that “phones home” regularly, I added the ability for the backend to respond to the client with an override backoff that the client would re
by vrosas 1y ago
When I built an app that “phones home” regularly, I added the ability for the backend to respond to the client with an override backoff that the client would respect over the default.
- aziaziazi 1y agoCould you expend on what is an "override backoff" ?
- treyd 1y agoPresumably the back end could tell the client not to check again for some amount of time. Sounds similar but different to cache TTLs, as those are passive.
- ses1984 1y agoThe client might have a feature to retry certain failures, and it’s using a particular rate, probably not retrying n times one right after the other in rapid succession. This is called backoff. The server can return an override backoff so the server can tell the client how often or how quickly to retry. It’s nice to have in case some bug causes increased load somewhere, you can flip a value on the server and relieve pressure from the system.
- vrosas 1y agoExactly. Without going too deep into the architecture, the clients are sending data to the backend in real time, but often that data is not actionable during certain periods, so the backend can tell the clients to bundle the data and try again after a certain amount of time, or just discard the data it's currently holding and try again later (i.e. in 5/10/n seconds)
- SnorkelTan 1y agoWhy not just use http retry-after? then you can use middleware/proxy to control this behavior. Downside here is that system operation becomes more opauqe and fragmented across systems.
- vrosas 1y agoBecause the client in this case is not a browser.
- nyarlathotep_ 1y agoWish people would actually do things like this more often. Plenty of things (like playstation's telemetry endpoint, for one of many examples) just continually phones home if it can't connect. The few hours a month of playstation uptime shows 20K dns lookups for the telemetry domain alone.
- gblargg 1y agoSeems like the proper fix would have been to remove the file from the server when they realized the increased traffic. Then clients would just fail to check the update each time and not tie up bandwidth.
- silverwind 1y agoThere is a standard HTTP header for this: Retry-After.