External Dependencies

Every call leaving your process can be slow, wrong or absent. Timeouts, retries, backoff, circuit breakers, bulkheads and the rate limits you both enforce and obey.

Calling Something You Do Not Control

Eight questions every outbound call has to answer, and the fact that a dependency's availability becomes yours the moment you await it.

Q · What do I have to decide before my code calls a system I do not operate?
Timeouts

Never assume an external dependency returns. A call with no timeout is a resource leak waiting for a bad day.

Q · How do I decide how long to wait for something outside my process — and what happens if I never decide?
Retries

"Retryable" and "safe to retry" are different properties, and confusing them is how a transient error becomes a duplicate charge.

Q · When should I retry a failed call, and what has to be true before retrying is safe?
Backoff and Jitter

Waiting longer between attempts stops you hammering a struggling dependency; randomising the wait stops every client from hammering it in unison.

Q · How long should I wait between retries, and why does adding randomness matter so much?
Circuit Breakers

After a dependency has failed enough, stop calling it: fail fast, protect your own capacity, and probe carefully for recovery.

Q · When a dependency has been failing for a while, why is continuing to call it worse than refusing to?
Bulkheads

Give each dependency its own bounded slice of your resources, so one slow dependency cannot consume every worker you have.

Q · Why does a slow recommendation service take down endpoints that never call it?
Rate Limiting

Deciding which caller has had enough, along which dimension — and why the counter's atomicity is the part that makes it correct.

Q · How do I stop one caller from consuming capacity that belongs to everyone, and what exactly am I counting?
Rate Limit Algorithms

Fixed window, sliding window, token bucket and leaky bucket — what each one allows, what it refuses, and the burst each permits.

Q · Which counting algorithm should enforce my limit, and what does each one actually allow through?
Email and Notifications

The integration everyone builds first and treats casually: an external provider, at-least-once delivery, and a side effect that cannot be taken back.

Q · Why is sending an email harder than calling an API that sends an email?