Make A Slack Events API Handler Safe Under Retries
Last updated: November 29, 2026
Quick Overview
Slack's Events API expects an HTTP 200 within three seconds and retries delivery otherwise, so the same event can arrive more than once. Explain how to build an app endpoint that acks fast and processes each event exactly once in effect, and sketch the handler.
Slack
November 29, 20260
0
0 solved
Slack's Events API expects an HTTP 200 within three seconds and retries delivery otherwise, so the same event can arrive more than once. Explain how to build an app endpoint that acks fast and processes each event exactly once in effect, and sketch the handler.
Slack's platform team cares that third-party and internal apps behave well under at-least-once delivery, so this fundamentals question appears in screens for platform and integrations roles. The interviewer checks understanding of acknowledgement deadlines, idempotency keys and moving slow work off the request path.
What the Interviewer Expects
- Explain why at-least-once delivery means duplicates are normal, not a bug
- Ack with 200 before doing slow work, and queue the work
- Use event_id as the idempotency key with a bounded retention window
- Handle the url_verification handshake
- Note that dedupe state must be shared across instances in production
- Mention verifying the request signature before trusting the payload
Key Topics to Cover
How to Approach This
- Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
- Choose data structures based on access patterns, not familiarity.
- Prefer immutable data and message passing over shared mutable state for concurrency.
- Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
- Your in-memory dedupe set breaks when you run three replicas behind a load balancer; what replaces it?
- What happens if the worker crashes after dequeuing but before finishing?
- When would you return a non-200 on purpose so Slack retries?
- How does Socket Mode change this design?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Slack POSTs JSON events to our URL. We must return 200 within about 3 seconds or Slack retries (with X-Slack-Retry-Num and X-Slack-Retry-Reason headers). A message handler that calls an LLM or a d...
High-Level Design
- Verify the signing secret (HMAC over timestamp and body, reject stale timestamps).
- Answer
url_verificationby echoingchallenge. - Check
event_idagainst a dedupe store; if new, record it...