Review cards · 17 cards
API design
Endpoints, pagination, idempotency keys and the contracts between services.
Cards
- Which change to a JSON API breaks existing clients?
- Which HTTP method is not idempotent by definition, so retrying it can create a second resource?
- An API call starts a video transcode that takes 10 minutes. How should the API respond?
- What is the difference between PUT and PATCH, and which is safe to retry?
- A client over its rate limit should get HTTP status _____, ideally with a _____ header saying when to try again.
- Which response should a client retry automatically, after a delay?
- What belongs in an API gateway, and what should stay out of it?
- Why do feeds use cursor pagination instead of ?page=N (offset)?
- Old versions of your mobile app stay installed for years. How do you change the API without breaking them?
- What is a common cost of GraphQL compared with a REST API?
- How should a server implement idempotency keys for a "create payment" endpoint?
- When would you pick gRPC over REST with JSON?
- What should a webhook receiver do so forged, replayed or repeated deliveries cannot hurt it?
- A webhook sender retries failed deliveries up to 10 times, waiting 1 minute before the first retry and doubling the wait each time. How long after the first attempt does it give up?
- Two retries with the same idempotency key reach two servers at the same moment. What stops both from charging the card?
- To stop two clients from overwriting each other's edits, the server returns an _____ with the resource, and the client sends it back in an _____ header when updating. A stale value gets _____.
- A feed is paged with a cursor on created_at. Why should the cursor also include the post id?
More topics
- Estimation 21 cards
- Networking 16 cards
- Caching 21 cards
- Databases 22 cards
- Replication 15 cards
- Sharding 18 cards
- Consistency 19 cards
- Queues 18 cards
- Streaming 18 cards
- Availability 14 cards
- Resilience 16 cards
- Storage 14 cards
- Realtime 15 cards
- Data structures 16 cards
- Security 17 cards
- Observability 18 cards
- Coordination 16 cards