HTTP Integration · interview question
What is the healthiest performance judgment around timeouts and retries?
Multiple choiceMediumchapter-12-curatedpremiumhttp-integrationtimeouts-and-retries
def call_partner(client: httpx.Client) -> dict:
response = client.get("/orders", timeout=5.0)
response.raise_for_status()
return response.json()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.
More HTTP Integration questions
- Which naming or modeling choice is strongest for timeouts and retries?
- What production risk should you worry about most if timeouts and retries is handled lazily?
- If timeouts and retries fails in production, what handling philosophy is strongest?
- Which boundary choice best fits timeouts and retries in a maintainable Python system?
- You cannot rewrite everything today. What is the best incremental improvement around timeouts and retries?
- Another engineer will maintain this code later. What choice helps the most around timeouts and retries?