System Design · Fundamentals · Topic 3 of 4
APIs & Communication
4 questions.
Your progress0%
- 1st Visit
- 0/4
- 2nd Visit
- 0/4
- Revise
- 0/4
Overview
Services communicate with clients and with each other through APIs, and the style chosen affects performance, coupling and how easily the system can evolve. This topic covers REST conventions, alternatives such as GraphQL and gRPC, idempotency for safe retries, and the options for pushing real-time updates to clients. Interviewers often ask you to define the main API endpoints early in a design, so be ready to name resources, HTTP methods, status codes and request fields. Signals in a problem include mobile clients on slow networks, many internal microservices, live updates such as chat messages or sports scores, and payment flows where a duplicated request would be costly.
Questions
| # | Problem | Platform | Difficulty | Open | 1st1st Visit | 2nd2nd Visit | RevRevise |
|---|---|---|---|---|---|---|---|
| 1 | What is a REST API, and what makes an API RESTful? | Concept | Easy | Read the answer to What is a REST API, and what makes an API RESTful? | |||
| 2 | When would you choose REST, GraphQL or gRPC? | Concept | Medium | Read the answer to When would you choose REST, GraphQL or gRPC? | |||
| 3 | What is idempotency, and how do you make a POST request safe to retry? | Concept | Medium | Read the answer to What is idempotency, and how do you make a POST request safe to retry? | |||
| 4 | How do short polling, long polling, WebSockets and Server-Sent Events differ? | Concept | Medium | Read the answer to How do short polling, long polling, WebSockets and Server-Sent Events differ? |