4 ms·
Pretty ironic, right? The entire article is the process of the author making the same mistake he's complaining about. For anyone reading the comments looking f
by epr 3y ago
Pretty ironic, right? The entire article is the process of the author making the same mistake he's complaining about.
For anyone reading the comments looking for more helpful guidance, the most generally helpful advice you will get is to start by measuring. Your measurements should help you identify bottlenecks, but the answer of how to fix the issue is dependent on your problem's constraints. In fact, there's such a massive number of dimensions to the solution space of the general problem of overloaded systems/services that it is actually ridiculous for the author to try and write a single ~2k words article explaining how to solve them all.
If you're hosting some non-critical service (which is clearly the case for the author), then maybe load-shedding is appropriate. If you're making a critical control system on the other hand, load-shedding (allowing system failure by design) is absurd. If you are already set up well for scaling (can be a big up-front investment) and have more money than time, maybe horizontal scaling is a no-brainer.
All those examples ignore the elephant in the room, which is the single root cause performance problem you're likely to discover after measuring your system and analyzing the results (good analysis is equally important to measurement, especially in large and/or distributed systems). This can range from something that is very expensive and possibly impractical to fix (ie: entire backend written in python), to a simple tweak (ie: fixing a bad database query) that drastically improves system performance with no downsides. The degree to which a system and it's components were designed by engineers not carelessly throwing away performance at the altar of "premature optimization is the root of all evil" can also have a profound impact.
- lanstin 3y agoYour system has a capacity and limits. They can either be explicitly configured in with deliberate load shedding behavior or implicit with a devil may care behavior. Some where between not getting dial tone when you pick up the phone to weird vocal distortions when the limits are hit, choose your poison. Or let randomness choose.