Code Room
Code reviewHardcr-g286
Subject Blocking ioLevel Mid–Senior~20 minCommon in Concurrency interviewsIndustries Software development, Technology

Question

Review this async request handler. Tail latency on the whole service got worse after this endpoint shipped, even for unrelated routes.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewpython
import time, requests async def enrich(request):    user = request.user_id    # call the profile service    resp = requests.get(f"https://profiles.internal/u/{user}", timeout=2)    time.sleep(0.05)  # small backoff before responding    return {"profile": resp.json()}
Run or narrate your approach, then ask the coach.