Frontend System Design2 min readPremium

Interface Communication Frontend System Design Interviews

Interface Communication For Frontend System Design

The “I” in the RADIO framework stands for Interface, which is partially about how the front-end system communicates with the backend (interface communication) and how it will format its request and response (API layer). 
This section is critical, but it shouldn’t take more than 15 percent of your interview time unless the interviewer wants to discuss it in depth. Let’s simplify this section so that the first half is focused on the interface layer, and the following article will focus on the API design layer.

Please spend no more than 5% of your interview explaining the interface communication layer and 10% on the API layer.

Before diving into API design, determine your protocol for the API layer. The right choice depends on the nature of the app and its requirements. For example, if you’re building a chat application, real-time, two-way communication is key, so WebSockets make sense. If you’re streaming updates in one direction, such as an AI chat response, server-sent events (SSE) are a good fit. Regular HTTP requests do the job for use cases like a news feed or simple data fetches as the user scrolls.

Here’s a table that compares the main protocols you might consider:

Protocol Description Best Use Case Pros Cons
HTTP (REST) Traditional request-response, stateless, client-initiated Fetching data, CRUD apps, news feeds, and most APIs Simple, well-supported, cacheable, easy to debug No real-time, can be chatty for frequent updates
Short Polling The client frequently requests new data on a timer Low-frequency updates, simple notifications Easy to implement, no persistent connection Wastes bandwidth, latency, and is not efficient at scale
Long Polling Client requests data, server holds connection until update or timeout Near real-time updates, legacy support More responsive than short polling, simple fallback Can tie up server resources, and is more complex to scale
Server-Sent Events (SSE) Server pushes updates to client, client receives in real time (one-way) Live feeds, notifications, streaming responses Simple API, built-in reconnect, works over HTTP One-way only, text only, and browsers cap HTTP/1.1 at 6 open connections per domain (not an issue over HTTP/2)
WebSockets Full duplex, persistent two-way communication Chat, multiplayer games, and collaborative editing Real-time, efficient, low-latency More complex, requires a stateful server, and can be harder to scale
GraphQL A query language (usually over HTTP) where the client defines queries and gets exactly the data needed in one request Apps with complex or nested data, mobile, SPAs Reduces over-fetching, is flexible, and promotes introspection Requires schema, learning curve, and can hide complexity

Protocol choice should match your product’s requirements. Real-time needs? Think WebSockets. One-way streaming? Try SSE. Standard API data fetching? Go with REST or GraphQL. For most standard apps, HTTP REST remains a reliable default.

You can find a deeper dive for each in this article.


Next, look into designing the API in frontend system design interviews. You might be wondering (probably not), shouldn’t R.A.D.I.O have an extra A, for API design? While you may be right, we don’t talk about it.

Now let’s proceed.