3 ms·
This is how the bank I used to work at ended up with app loads taking almost a minute. People don't intuitively understand the impact of transitivity and expone
by samhw 5y ago
This is how the bank I used to work at ended up with app loads taking almost a minute. People don't intuitively understand the impact of transitivity and exponential growth. It is a very, very bad idea to make a habit of using retry-with-backoff as a default for error handling. (That's before we even consider the semantics of errors in stateful programs, the virtues of 'let it crash', etc.)
- erik_seaberg 5y agoThis. You have to pick a layer that is responsible for retries. If every layer does it, you get a failure amplifier that might become a death star laser.
- samhw 5y agoYup. We once analysed a particularly slow query (as in, a specific call to our server, not a path in the abstract) and saw that across the whole cluster it had resulted in eight million retries. And I think it was a 4xx in the end anyway (not that Go is designed for fancy stuff like telling the difference between two kinds of error!).
- marcus_holmes 5y agoThat's why you wrap errors, so you can unwrap them and work out what caused them. But I totally agree that blindly retrying is a bad practice.
- nicoburns 5y ago8 million! How on earth did that happen?