core practice · coding problem
Idempotent POST retry
POST returns 503 after 30s. Client retries. Safe without Idempotency-Key? When is 409 vs 200 on duplicate?
The mechanism
An HTTP request is a journey: resolve DNS, open a TCP connection, negotiate TLS, send the request, the server routes and responds, the connection is reused or closed. Latency and failures hide in each hop.
Expected evidence
Unsafe without key; Idempotency-Key makes retry safe; duplicate returns cached 200.
Try this drill in the practice workspace →
Hints when you need them
- 503 may mean server processed request.
- GET is safe; POST is not.
Watch for these mistakes
- Confusing 401 (unauthenticated) with 403 (unauthorized)
- Ignoring connection reuse and paying TLS cost per request
- Treating all 5xx as retryable and all 4xx as not