API Design Lab
Explore and compare 6 API protocols for system design interviews.
GraphQL
Request-ResponseGraphQL is a query language for APIs that lets clients request exactly the data they need in a single request, using a strongly-typed schema to define available operations and data shapes.
gRPC
Request-ResponsegRPC is a high-performance RPC framework using HTTP/2 and Protocol Buffers for strongly-typed, low-latency communication between services with support for bidirectional streaming.
REST
Request-ResponseREST is a stateless, resource-oriented architectural style that uses standard HTTP methods to interact with server resources identified by URIs.
Server-Sent Events
StreamingServer-Sent Events is a simple, HTTP-based protocol for unidirectional server-to-client streaming that provides automatic reconnection and event ID tracking out of the box.
Webhooks
Event-DrivenWebhooks are HTTP callbacks that push event notifications from a producer to a consumer's pre-registered URL when specific events occur, enabling real-time server-to-server integration without polling.
WebSocket
StreamingWebSocket is a full-duplex communication protocol that enables persistent, bidirectional message exchange between client and server over a single TCP connection.