The hook
You use them every day. You can name them in a meeting. You might even configure them. But can you explain what actually happens underneath? You use it. You can explain it. But can you explain what happens underneath?
This is the gap that separates "I've heard of it" from "I understand it." Knowing the name is not understanding the technology. So let's take ten everyday systems and look at the mechanism behind the name — the part you rarely have to think about, until it breaks.
Kafka — it isn't a queue that deletes
You know Kafka. But what actually happens when you publish a message? You send OrderCreated to Kafka — and Kafka doesn't simply "store a message."
Behind the scenes, a single publish travels:
- The producer appends to the end of a partition — an ordered, append-only log segment.
- Each message receives a monotonically increasing offset within that partition.
- The log is persisted and replicated before ack (with
acks=all), so it survives broker loss. - Consumers don't delete messages after reading them. They track their own position.
Ordering only holds inside a partition, so you key by the entity whose order matters (customer ID, order ID). Beyond a partition there is no global order. That trade-off is the whole shape of Kafka.
Redis — it isn't magically fast
You know Redis is fast. But why? It isn't magic. Redis is fast because the design removes the things that make other datastores slow.
- Data lives primarily in memory. A
GET user:123is a hash-table lookup in RAM, not a disk read. - Single-threaded command execution. No locks, no context-switching overhead, no concurrent mutation races. Commands are atomic and sequential.
- Efficient data structures. Strings, hashes, sorted sets and bitmaps are chosen so common operations stay O(1) or O(log n).
- No expensive per-request disk I/O. Persistence (RDB snapshots / AOF append-only file) runs off the hot path.
So when you say "Redis is fast," you're really summarising: it keeps data in memory and executes commands one at a time against tuned structures. Everything else — AOF, replication, eviction policies, cluster sharding — is the machinery that keeps that property usable at scale.
Kubernetes — it doesn't understand your code
You know Kubernetes. But who actually keeps your app alive? You deploy a Deployment with 3 replicas. One pod crashes. What happens?
Kubernetes does not "restart your application" because it understands your code. It has no idea what your binary does. Instead, a controller continuously compares two states.
- Desired state: 3 pods (what you declared).
- Current (observed) state: 2 running + 1 crashed.
- Difference? One pod short.
- Action: schedule one more pod to close the gap.
That's why a Kubernetes restart isn't a restart in the process sense. The crashed pod is just gone from the observed state, the controller sees the gap, and it creates a replacement. When you deploy a new image, you're really updating desired state and letting the loop roll pods forward and old ones out.
Database index — a sorted map that avoids work
You know indexes make queries faster. But what are they actually doing? They aren't a magic "go faster" switch. An index is a separate sorted data structure that lets the database skip work.
-- Without an index: scan every row SELECT * FROM users WHERE email = 'a@b.com'; -- checks Row 1 -> Row 2 -> ... -> Row 10M (O(n)) -- With a B+ tree index on email: -- navigate the tree to 'a@b.com' -> row location (O(log n) + reads)
The deeper insight: an index is about avoiding work. A full scan does O(n) comparisons and row reads; a B+ tree does O(log n) comparisons and reads only the matching leaf pages. The win isn't "speed," it's "not reading ten million rows to answer one question."
Load balancer — traffic management + health management
You know a load balancer distributes traffic. But how, and based on what? A request arrives and the load balancer decides where it goes.
| Strategy | Decides by | Good for |
|---|---|---|
| Round robin | Next server in rotation | Even, similarly-sized servers |
| Least connections | Server with fewest active requests | Uneven request cost |
| Weighted | Server capacity weights | Mixed hardware sizes |
| Health-checked | Is the backend actually healthy? | Avoiding dead backends |
CDN — move data physically closer
You know a CDN makes websites faster. But where does the response actually come from? It isn't always your origin server.
- Cache hit: the edge already has the asset — return it immediately, no origin trip.
- Cache miss: the edge fetches from the origin, stores the response, and future users in that region get it from the edge.
This is why a cache hit is not just "fast" but qualitatively different: the request may never reach your infrastructure at all, so your origin is shielded from load and the user gets a response from a nearby city instead of a distant data centre.
Docker — isolated processes sharing a kernel
You know Docker equals containers. But what is actually happening? A container is not a lightweight virtual machine. There is no guest operating system per container. Docker composes a few long-standing Linux features to make ordinary processes behave like isolated environments.
- Namespaces isolate what a process can see — its own process IDs, network, mount tree, hostname.
- cgroups limit how much CPU, memory and I/O a process (or group) may consume.
- Container filesystem gives the process an isolated, layered view of files via an image.
API gateway — the central traffic-control layer
You know an API gateway sits in front of your services. But it can become the traffic-control layer for your entire system. Instead of each service re-implementing the same cross-cutting concerns, the gateway handles them centrally.
- Authentication — verify the caller once before any service sees the request.
- Rate limiting — throttle per client, per route, per token.
- Routing — map a path to the right service.
- Request validation — reject malformed payloads early.
- Logging / tracing — a single place to observe all inbound traffic.
- Load balancing — distribute across service instances.
WebSockets — a connection that stays open
You know WebSockets mean real-time communication. But why are they different from normal HTTP? The difference is the lifetime of the connection and who is allowed to initiate a message.
| HTTP | WebSocket | |
|---|---|---|
| Model | Request → Response | Persistent, bidirectional |
| Who initiates | Client starts each exchange | Either side, any time |
| Connection | Generally short-lived per request | Stays open after handshake |
| Overhead | Headers per request | Handshake once, then frames |
| Best for | Document fetch, APIs | Chat, live dashboards, games, notifications |
Upgrade header; once the server agrees, the same TCP connection is promoted to a full-duplex frame-based protocol. Either side can push a frame whenever it has data — no polling, no waiting for the client to ask.The real point
Knowing the name is not understanding the technology. You don't need to memorise:
- ❌ Kafka definitions
- ❌ Kubernetes buzzwords
- ❌ Redis feature lists
- ❌ Docker commands
You need to understand the questions underneath all of them:
- What happens underneath? What is the actual mechanism when you press the button?
- Why was it designed this way? What constraint forced this shape?
- What problem does it solve? And what does it deliberately not solve?
- What happens when it fails? Which assumption breaks, and what is the blast radius?
- How does it scale? Where does the parallelism live, and where is the ceiling?
Interview framing
If an interviewer asks "explain Kafka," a surface answer is "a messaging system." A real answer is: "Kafka is a durable, partitioned, append-only log. Producers append keyed records to a partition; the partition is the unit of ordering and parallelism. Each record gets an offset, and because reading never deletes, multiple consumer groups replay the same log independently. Durability comes from replication with an ISR and acks=all. The design trades global ordering for horizontal scale — and that trade-off is what you reason about when sizing partitions and choosing keys."
Notice the structure: what it is → how the mechanism works → what trade-off that mechanism implies → what you therefore decide. Apply that same structure to Redis, Kubernetes, indexes, load balancers, CDNs, Docker, API gateways and WebSockets, and you move from recall to understanding.