Bulkhead
One slow dependency should not be able to consume every thread you have. Bulkheads partition resources so a failure stays inside its compartment — and the hard part is sizing them, not building them.
Find the problem a pattern solves, the cost it adds, and the choices beside it. Make the decision with your system in mind.
Or ask about your architectureThe catalogue connects each approach to its fit and limits.
One slow dependency should not be able to consume every thread you have. Bulkheads partition resources so a failure stays inside its compartment — and the hard part is sizing them, not building them.
You cannot atomically write to your database and publish to a broker. The Outbox pattern makes the message part of the transaction — and the trap is that at-least-once delivery is the ceiling, not a bug.
Protecting a service from too much traffic sounds like arithmetic. It is really a question about fairness, and the algorithm you pick decides who gets refused when the answer is no.