What happens between services — often assumed, rarely known deeply
Persistent connections that reuse TCP sockets across multiple request-response cycles, avoiding the overhead of repeated handshakes.
Binary framing layer that allows multiple concurrent streams over a single TCP connection, solving HTTP/1.1's head-of-line blocking at the application layer.
HTTP over QUIC replaces TCP with a UDP-based transport that eliminates TCP head-of-line blocking and integrates TLS 1.3 into the handshake.
Choosing the right HTTP status code communicates intent precisely. Misused codes confuse clients and break caching, retry logic, and monitoring.
Understanding which HTTP methods are safe (no side effects) and idempotent (repeatable with same result) is critical for retry logic and API design.
Mechanism by which client and server agree on the format, language, and encoding of a response using request headers.
HTTP caching headers control when and how responses are stored and revalidated, reducing bandwidth and server load.
RESTful URLs should represent resources as nouns, use plural forms, and maintain a consistent hierarchy that clients can predict.
Large result sets need pagination. Offset-based is simple but fragile; cursor-based is stable under concurrent writes.
APIs evolve, and versioning determines how breaking changes are introduced without disrupting existing consumers.
Hypermedia as the Engine of Application State means responses include links that tell clients what actions are available next, making the API self-discoverable.
OpenAPI Specification (formerly Swagger) provides a machine-readable contract for REST APIs, enabling documentation, code generation, and testing.
Protocol Buffers encode structured data into a compact binary format using field numbers and wire types, drastically reducing payload size compared to JSON.
gRPC supports four interaction patterns: unary, server streaming, client streaming, and bidirectional streaming, each suited to different real-time data needs.
gRPC interceptors are middleware that wrap calls on the client or server side, enabling cross-cutting concerns like logging, auth, and metrics.
gRPC deadlines propagate across service hops, ensuring that downstream calls are cancelled when the overall time budget expires.
A frequent interview question: knowing when to choose gRPC over REST and vice versa demonstrates architectural maturity.
gRPC server reflection exposes the service schema at runtime, enabling dynamic clients and debugging tools to discover methods without the .proto file.
WebSocket connections start as an HTTP/1.1 request with an Upgrade header, switching the protocol to a persistent, full-duplex channel.
Server-Sent Events (SSE) and WebSockets both enable server push, but differ in directionality, complexity, and browser support.
Long polling holds an HTTP request open until data arrives, then immediately re-establishes. SSE is a more efficient, standardized alternative.
Spring provides WebSocket support with an optional STOMP sub-protocol for pub/sub messaging patterns with destination-based routing.
Persistent connections silently die due to network issues. Heartbeats detect dead connections; reconnection strategies restore them gracefully.
TCP establishes a reliable connection via a SYN, SYN-ACK, ACK exchange before any data is transferred.
TCP socket states during connection teardown. Understanding them explains port exhaustion and connection recycling issues in high-throughput services.
The kernel maintains queues for incoming connections. Understanding these explains why services drop connections under load.
Nagle's algorithm reduces small-packet overhead by buffering tiny writes until an ACK arrives or the buffer fills, trading latency for bandwidth efficiency.
DNS translates hostnames to IP addresses. TTL controls caching duration, and misconfigurations can cause stale routing or deployment failures.
Content Delivery Networks cache content at edge nodes close to users, using DNS-based or Anycast routing to minimize latency.