# http & rest apis
// [25] real interview questions. Answers and sources live in the practice app.
practice this topic- What is idempotence in the context of API design, and why is it important in practice?(mid)
- When would you use PUT versus POST for creating or updating a resource, and how does that choice affect retry behavior?(mid)
- How would you manage Web API versioning? Compare the main approaches.(mid)
- What strategies would you use to ensure backward compatibility of an API as it evolves?(senior)
- What considerations influence how you paginate API responses, and why does offset pagination break under concurrent writes?(mid)
- What is API rate limiting, why is it used, and how would you implement it?(mid)
- Why do we usually put so much effort into having stateless services?(mid)
- Walk through what happens when you type google.com into a browser and press Enter.(mid)
- What are the trade-offs of client-side rendering vs. server-side rendering?(mid)
- From a backend perspective, what are the disadvantages of adopting a Single Page Application?(senior)
- A REST service exposes GET and PUT for objects. Two clients GET the same object, both modify it, and both PUT it back. What goes wrong and how do you fix it?(senior)
- How can you design an API to be easily consumable by clients?(mid)
- What actually changed between HTTP/1.1, HTTP/2, and HTTP/3, and what problem does each version solve?(mid)
- How does the WebSocket protocol work, and what happens during the opening handshake?(mid)
- You need to push live updates to browsers. When do you pick long polling, Server-Sent Events, or WebSockets?(mid)
- How do you detect and handle a dead WebSocket connection?(mid)
- Your payment provider notifies your backend of events via webhooks. How do you consume them reliably?(mid)
- What is an API Gateway, what responsibilities does it take on, and what are its drawbacks?(mid)
- REST vs GraphQL vs gRPC — how do you choose for a given service?(mid)
- Why is calling a remote service fundamentally different from calling a local function, however well the RPC framework hides it?(senior)
- What actually makes an API 'RESTful' beyond the fact that it runs over HTTP?(junior)
- You're deploying WebSockets behind proxies and load balancers. What breaks, and how do you configure things properly?(mid)
- Your chat service runs on 8 instances. User A's socket is on server 1, user B's on server 5. How does A's message reach B?(senior)
- You open a two-hour video and it starts playing in a second, and when you drag the scrubber to the middle it jumps there almost instantly without downloading the whole file first. What HTTP mechanism makes seeking into an un-downloaded part possible?(senior)
- When you upload a photo the progress bar climbs 12%… 47%… 100% before the site confirms. How does the page know the percentage while the bytes are still leaving your computer?(junior)