Skip to content
Sharp

HTTP Integration · interview question

What is the healthiest performance judgment around timeouts and retries?

Multiple choiceMediumchapter-12-curatedpremiumhttp-integrationtimeouts-and-retries
python
def call_partner(client: httpx.Client) -> dict:
    response = client.get("/orders", timeout=5.0)
    response.raise_for_status()
    return response.json()
Choose one answer
Answer and explanation

Correct answer

B. Measure before optimizing, then change the part that actually dominates cost instead of guessing from style alone.

Why

Premature optimization is usually weaker than targeted optimization backed by measurement.

Test yourself on HTTP Integration

A free test with instant, explained results. No account needed.

Start free test
All HTTP Integration questions →