3 ms·
A very simple system is sufficient to demonstrate such metastable states. Consider a frontend supported by a database. Requests to the FE come in at a uniform r
by andreskytt 5y ago
A very simple system is sufficient to demonstrate such metastable states. Consider a frontend supported by a database. Requests to the FE come in at a uniform rate below the ability of the database. Now there’s a peak in incoming requests. As parallel queries pile up, they start stepping on each other’s toes and the response time goes up. Given the temporarily stable incoming request rate, this means even more parallel queries and even slower response rate. Eventually the database response rate drops to the incoming request rate. If the peak of traffic subsides, the system sees a stable, usual, incoming request rate but a massively struggling database with a large number of parallel requests. This is the metastable state. When the db is restarted, purging the connections, everything returns to normal. Which can lead to the conclusion of the db platform being at fault. This is why you have queues or connection pools in front of your BE: to prevent dynamic complexity leaking over component boundaries and wreaking havoc all over the system.