We use cookies for site analytics. Accept to help us understand how the site is used. See our Privacy Policy for details.
TCP vs UDP, the TLS and TCP handshakes, HTTP versions, status codes, DNS resolution, the OSI and TCP/IP layer models, and the ports you are expected to know in an interview.
Networking questions in interviews almost always come back to a few fundamentals - the difference between TCP and UDP, what actually happens during a handshake, how a URL turns into bytes on a wire, and where things sit in the layer model. Learn the moving parts below well enough to draw the handshake and the DNS path on a whiteboard, and you will handle most follow-ups.
The two transport-layer protocols. Knowing when each is appropriate is a very common question.
Connection setup is three segments. The client sends SYN with an initial sequence number. The server replies SYN-ACK, acknowledging the client's sequence and sending its own. The client sends ACK and the connection is established. Teardown is the 4-way 'FIN' handshake - each side independently sends a FIN and waits for an ACK, because TCP connections are full-duplex and each direction is closed separately. The side that closes first enters TIME_WAIT (roughly twice the maximum segment lifetime) so late-arriving packets do not corrupt a new connection on the same port pair.
TLS 1.3 cut the handshake to a single round trip. The client sends ClientHello with its supported cipher suites plus a key share (an ephemeral Diffie-Hellman public key) - it guesses the group the server will pick. The server replies with ServerHello, its own key share, the certificate, and a Finished message, all encrypted after the key exchange. Both sides now derive the shared session keys. TLS 1.3 dropped RSA key exchange and static keys in favor of forward-secret ephemeral Diffie-Hellman, and it supports 0-RTT resumption where a returning client can send data in its first flight. Remember - TLS sits above TCP, so the TCP handshake completes first, then TLS negotiates on top.
What changed across the major HTTP versions.
Group by leading digit, then memorize the workhorses.
Turning a name into an address walks a hierarchy. The client (the stub resolver) asks its configured recursive resolver. If the answer is not cached, the resolver queries a root name server, which points it to the right TLD server (for example the '.com' servers). The TLD server points to the domain's authoritative name server, which returns the actual record. The recursive resolver caches the answer for its TTL and returns it to the client. Record types you should know: A (name to IPv4), AAAA (name to IPv6), CNAME (alias from one name to another), MX (mail exchange servers, with priorities), and TXT (arbitrary text, used for SPF, DKIM, and domain verification).
Interviewers love to ask which layer a protocol lives at.
Default port numbers worth memorizing.
Time and space complexity for the data structures, sorting algorithms, and search routines that show up in coding interviews. Skim the row, remember the row, defend the row in an interview.
The recurring shapes - sliding window, two pointers, fast/slow, BFS/DFS, backtracking, DP, divide & conquer, binary search variants, union-find, topological sort. Each entry: when to reach for it, the template, complexity, and which classic problems use it.
The recurring forks in system design interviews. CAP, PACELC, sync vs async, push vs pull, SQL vs NoSQL, sharding shapes, consistency models, cache strategies, idempotency, and rate limiting. For each, the options and when to choose each.
Filesystem layout, the commands you actually use (find / grep / awk / sed / xargs), processes and signals, networking, permissions, basic shell scripting, and a vi survival kit.
Query clause order, every JOIN type and when to use it, aggregates vs window functions, what indexes actually buy you, transaction isolation levels, and the NULL / WHERE-vs-HAVING / EXISTS-vs-IN gotchas interviewers fish for.
The everyday commands, every undo scenario mapped to its fix, rebase vs merge with a side to pick, interactive rebase, bisect, the reflog safety net, stash, and the flags worth aliasing.
The docker and kubectl commands you reach for daily, Dockerfile best practices, how layer caching actually works, the core k8s objects in one screen, requests vs limits, liveness vs readiness, and a step-by-step CrashLoopBackOff debug flow.
Method semantics and idempotency, the ~15 status codes that matter, resource naming rules, offset vs cursor pagination, versioning and auth tradeoffs, error body conventions, rate-limit headers, and the smells reviewers flag.
The STAR structure with timing, what interviewers actually grade, eight question archetypes and how to frame each, the anti-patterns that sink answers (rambling, "we" instead of "I", no metrics), and a 30-second answer skeleton.
Anchors, character classes, quantifiers, groups, alternation, lookarounds, backreferences, and flags - plus practical patterns and the gotchas that trip people up in interviews.
The USE method, a first-five-minutes triage runbook, and the CPU, memory, disk, network, and tracing commands you reach for when a Linux box is misbehaving.
A fast reference for concurrency primitives, synchronization tradeoffs, the memory model, and the classic bugs that show up in systems interviews and real code.
A reference for the theorems, consistency models, replication and partitioning strategies, delivery guarantees, and resilience patterns that come up in system design interviews.
Topics, partitions, and consumer groups, the three delivery semantics and how Kafka actually achieves each, ordering guarantees, rebalancing, retention vs compaction, and a straight Kafka vs SQS vs RabbitMQ vs Kinesis comparison.
Schema, types, and resolvers, the three operation kinds, the N+1 problem and DataLoader, cursor vs offset pagination, error handling that actually works, security (depth limiting, query cost), and an honest answer to 'when does REST beat GraphQL'.
State and why it must be remote and locked, the init/plan/apply lifecycle, modules and variables, count vs for_each, workspaces, import and drift, a command table, and the gotchas (prevent_destroy, secrets in state) that mark real production experience.
How LLMs work in one paragraph, the knobs (context window, temperature, top-p), system vs user prompts, few-shot and chain-of-thought, RAG and embeddings, the fine-tune-vs-prompt decision, tool calling, eval basics, and the interview questions teams actually ask now.
How B-tree indexes actually work, composite index column order, covering indexes, reading EXPLAIN ANALYZE, why the planner ignores your index, join algorithms, N+1, keyset pagination, and the 'why is this query slow' scenarios interviews are built on.
Reading is the floor. The signal in interviews comes from working problems out loud and defending your tradeoffs. Spin up an AI mock interview or run a coding challenge to put these to work.