<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Interview on Vivek's Field Notes</title><link>https://heyyviv.github.io/tags/interview/</link><description>Recent content in Interview on Vivek's Field Notes</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 18 Nov 2026 20:00:00 +0530</lastBuildDate><atom:link href="https://heyyviv.github.io/tags/interview/index.xml" rel="self" type="application/rss+xml"/><item><title>Interview Study Guide</title><link>https://heyyviv.github.io/blog/interview-study-guide/</link><pubDate>Wed, 18 Nov 2026 20:00:00 +0530</pubDate><guid>https://heyyviv.github.io/blog/interview-study-guide/</guid><description>&lt;p>&lt;strong>How to use this.&lt;/strong> Each line is one concept with its short answer. A line is &lt;em>done&lt;/em> only when you can say it out loud without looking, then answer &amp;ldquo;why?&amp;rdquo; and &amp;ldquo;what breaks?&amp;rdquo; about it. Tick as you go. Order = most likely to be asked first.&lt;/p>
&lt;p>Deeper notes: &lt;a href="https://heyyviv.github.io/blog/go-runtime-concurrency/">Go Runtime &amp;amp; Concurrency&lt;/a> · &lt;a href="https://heyyviv.github.io/blog/dbms_content/">DBMS&lt;/a> · &lt;a href="https://heyyviv.github.io/blog/dis_sys_content/">Distributed Systems&lt;/a>&lt;/p>
&lt;hr>
&lt;h2 id="1-your-story-and-numbers-asked-in-every-interview">1. Your story and numbers (asked in every interview)&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>60-second intro&lt;/strong> — who you are → what you build at Samsung (Go services, data pipelines, AI tooling) → one big number → why Singapore / this role.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>For every number&lt;/strong> (1M assets/day, 500K/day at 99%, −54.6% / $610K, 1–2h → 10 min, 405 ms, 14x) know: where it came from, the baseline, the time window, how it was measured, and one caveat.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>For every bullet&lt;/strong> know: the problem, your part vs the team&amp;rsquo;s, the design, one trade-off, the hardest bug, what breaks at 10x, what you&amp;rsquo;d change now.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>&amp;ldquo;3-stage&amp;rdquo;, &amp;ldquo;2-service&amp;rdquo;, &amp;ldquo;4-component&amp;rdquo;&lt;/strong> on the SG resume — name each stage/service/component.&lt;/li>
&lt;/ul>
&lt;h2 id="2-go">2. Go&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Goroutine vs thread&lt;/strong> — managed by the Go runtime; starts with ~2 KB growable stack (threads ~1–8 MB fixed); switch is in user space, so it&amp;rsquo;s cheap.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>G/M/P scheduler&lt;/strong> — G = goroutine, M = OS thread, P = processor (run queue, count = &lt;code>GOMAXPROCS&lt;/code>). An M needs a P to run Gs. Idle Ps steal work. Blocking syscalls hand the P to another M.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Channels&lt;/strong> — unbuffered = sender and receiver meet (sync); buffered = queue of N. Send on closed channel panics; receive from closed returns zero value. Nil channel blocks forever.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>&lt;code>select&lt;/code>&lt;/strong> — waits on many channel ops; picks a random ready one; &lt;code>default&lt;/code> makes it non-blocking.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>&lt;code>context&lt;/code>&lt;/strong> — carries cancellation, deadlines, request values down the call tree. Goroutines &lt;code>select&lt;/code> on &lt;code>ctx.Done()&lt;/code> to stop. Always &lt;code>defer cancel()&lt;/code>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>&lt;code>sync.Mutex&lt;/code> / &lt;code>RWMutex&lt;/code>&lt;/strong> — protect shared data; RW allows many readers or one writer.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>&lt;code>sync.WaitGroup&lt;/code>&lt;/strong> — wait for N goroutines; &lt;code>Add&lt;/code> before &lt;code>go&lt;/code>, &lt;code>Done&lt;/code> in a defer.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>&lt;code>sync/atomic&lt;/code>&lt;/strong> — lock-free counters/flags.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Race detector&lt;/strong> — &lt;code>go test -race&lt;/code>; only finds races that actually execute in the test.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Goroutine leak&lt;/strong> — goroutine blocked forever on a channel no one reads; fix with context/close/buffer.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Worker pool&lt;/strong> — N goroutines read jobs from one channel → bounded concurrency + backpressure.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Errors&lt;/strong> — values, not exceptions; wrap with &lt;code>fmt.Errorf(&amp;quot;...: %w&amp;quot;, err)&lt;/code>, check with &lt;code>errors.Is/As&lt;/code>. &lt;code>panic&lt;/code> only for bugs.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Interfaces&lt;/strong> — implicit; small interfaces (&lt;code>io.Reader&lt;/code>). Nil interface vs interface holding nil pointer gotcha.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Slices&lt;/strong> — pointer + len + cap over an array; &lt;code>append&lt;/code> may reallocate; two slices can share memory.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Maps&lt;/strong> — not safe for concurrent writes (runtime panic); use mutex or &lt;code>sync.Map&lt;/code>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>GC&lt;/strong> — concurrent mark-and-sweep, low pause; tune with &lt;code>GOGC&lt;/code>; reduce allocations to reduce GC.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Escape analysis&lt;/strong> — compiler decides stack vs heap; returning a pointer to a local moves it to the heap (&lt;code>go build -gcflags=-m&lt;/code>).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>pprof&lt;/strong> — CPU, heap, goroutine profiles; how you&amp;rsquo;d find a slow path.&lt;/li>
&lt;/ul>
&lt;h2 id="3-python">3. Python&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>GIL&lt;/strong> — only one thread runs Python bytecode at a time. Threads help &lt;strong>I/O-bound&lt;/strong> work (network, disk — GIL released while waiting); &lt;strong>CPU-bound&lt;/strong> work needs &lt;code>multiprocessing&lt;/code>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>threads vs processes vs asyncio&lt;/strong> — threads: I/O, simple; processes: CPU, separate memory; asyncio: one thread, thousands of I/O tasks, cooperative (&lt;code>await&lt;/code>).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Bounded concurrency&lt;/strong> — &lt;code>asyncio.Semaphore(n)&lt;/code> or &lt;code>ThreadPoolExecutor(max_workers=n)&lt;/code>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Timeouts / retries&lt;/strong> — &lt;code>asyncio.wait_for&lt;/code>; retry with exponential backoff + jitter; only retry transient errors.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Generators&lt;/strong> — lazy iteration with &lt;code>yield&lt;/code>; constant memory over big data.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Decorators, context managers&lt;/strong> (&lt;code>with&lt;/code> → &lt;code>__enter__/__exit__&lt;/code>), &lt;strong>mutable default args&lt;/strong> gotcha, &lt;strong>list vs tuple vs dict vs set&lt;/strong> complexity.&lt;/li>
&lt;/ul>
&lt;h2 id="4-concurrency-general">4. Concurrency (general)&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Race condition&lt;/strong> — result depends on timing of unsynchronised access to shared data.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Deadlock&lt;/strong> — circular wait. Needs: mutual exclusion, hold-and-wait, no preemption, circular wait. Avoid: always lock in the same order; timeouts.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Livelock / starvation&lt;/strong> — threads keep reacting but no progress / one thread never gets the resource.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Mutex vs semaphore&lt;/strong> — mutex = 1 owner; semaphore = N permits.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Backpressure&lt;/strong> — slow consumer pushes back on producer (bounded queue blocks / rejects) instead of memory blowing up.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Producer–consumer&lt;/strong> — bounded queue between them.&lt;/li>
&lt;/ul>
&lt;h2 id="5-sql-and-databases">5. SQL and databases&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Joins&lt;/strong> — inner, left, right, full; NULLs don&amp;rsquo;t equal each other (&lt;code>IS NULL&lt;/code>).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>GROUP BY / HAVING&lt;/strong>, &lt;strong>window functions&lt;/strong> (&lt;code>ROW_NUMBER&lt;/code>, &lt;code>RANK&lt;/code>, &lt;code>LAG&lt;/code>, running totals), &lt;strong>CTEs&lt;/strong>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Classic queries&lt;/strong> — top-N per group, dedupe (keep latest), second highest, running total, gaps.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Index = B+ tree&lt;/strong> — sorted keys → row location; lookup O(log n) vs full scan; leaves linked for range scans. Writes slower: every index updated.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Composite index&lt;/strong> — leftmost-prefix rule: index (a, b) helps &lt;code>WHERE a=&lt;/code> and &lt;code>a= AND b=&lt;/code>, not &lt;code>b=&lt;/code> alone.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Covering index&lt;/strong>, &lt;strong>when an index isn&amp;rsquo;t used&lt;/strong> (function on column, low selectivity, leading &lt;code>%LIKE&lt;/code>).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>&lt;code>EXPLAIN ANALYZE&lt;/code>&lt;/strong> — read seq scan vs index scan, rows estimated vs actual.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>ACID&lt;/strong> — Atomic (all or nothing), Consistent (constraints hold), Isolated (concurrent tx don&amp;rsquo;t interfere), Durable (committed survives crash, via WAL).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Isolation anomalies&lt;/strong> — dirty read, non-repeatable read, phantom, lost update, write skew.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Isolation levels&lt;/strong> — Read Committed (Postgres default), Repeatable Read, Serializable.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Lost update fix&lt;/strong> — atomic &lt;code>UPDATE ... SET x = x - 1 WHERE x &amp;gt;= 1&lt;/code>; &lt;code>SELECT ... FOR UPDATE&lt;/code>; optimistic lock with version column.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>MVCC&lt;/strong> — readers see a snapshot, don&amp;rsquo;t block writers.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>WAL&lt;/strong> — write log first, then data; crash recovery replays it.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Normalisation vs denormalisation&lt;/strong> — fewer anomalies vs faster reads.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Replication&lt;/strong> — primary takes writes, replicas lag → stale reads; read-your-writes by reading the primary after a write.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Sharding&lt;/strong> — split data by key; hot shards; cross-shard queries are hard.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>SQL vs NoSQL&lt;/strong> — choose by access pattern, consistency need, scale.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>TimescaleDB&lt;/strong> — Postgres extension; &lt;strong>hypertable&lt;/strong> auto-split into time &lt;strong>chunks&lt;/strong>; retention = drop old chunks; compression; continuous aggregates = auto-refreshed rollups.&lt;/li>
&lt;/ul>
&lt;h2 id="6-kafka">6. Kafka&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Topic → partitions → offsets&lt;/strong> — a partition is an append-only log; offset = position.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Ordering&lt;/strong> — only within a partition. Same key → same partition. Adding partitions remaps keys.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Producer acks&lt;/strong> — &lt;code>acks=0&lt;/code> fire-and-forget, &lt;code>1&lt;/code> leader wrote, &lt;code>all&lt;/code> all in-sync replicas wrote.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Replication&lt;/strong> — leader + followers; ISR = in-sync replicas; leader dies → an ISR member takes over.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Consumer group&lt;/strong> — each partition read by one consumer in the group; more consumers than partitions = idle consumers.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Rebalance&lt;/strong> — consumer joins/leaves → partitions reassigned; processing pauses.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Offset commit&lt;/strong> — commit after processing = at-least-once (duplicates possible); before = at-most-once (loss possible).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Exactly-once&lt;/strong> — idempotent producer + transactions; in practice: at-least-once + &lt;strong>idempotent consumer&lt;/strong> (dedupe by event ID).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Consumer lag&lt;/strong> — latest offset − committed offset; the main health metric.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Retention&lt;/strong> — by time/size; log compaction keeps the latest value per key.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Dead-letter topic&lt;/strong> — park poison messages so the partition keeps moving.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Kafka vs RabbitMQ/SQS&lt;/strong> — Kafka: replayable log, high throughput, ordering per partition; queues: per-message ack, delete on consume.&lt;/li>
&lt;/ul>
&lt;h2 id="7-distributed-systems">7. Distributed systems&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>CAP&lt;/strong> — during a network partition, pick consistency (refuse) or availability (serve possibly stale).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Consistency models&lt;/strong> — strong/linearizable, read-your-writes, eventual.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Replication&lt;/strong> — leader-follower, multi-leader, leaderless (quorum: W + R &amp;gt; N).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Partitioning&lt;/strong> — range vs hash; &lt;strong>consistent hashing&lt;/strong> moves few keys when nodes change.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Consensus (Raft)&lt;/strong> — elect a leader, replicate a log to a majority; survives minority failures. Used by etcd, Kafka KRaft.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Leader election, split brain&lt;/strong> — two leaders; fixed by majority quorum + fencing tokens.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Clocks&lt;/strong> — wall clocks drift; use logical clocks / versions for ordering.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Distributed transactions&lt;/strong> — 2PC (blocking); &lt;strong>saga&lt;/strong> = local steps + compensations.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Outbox pattern&lt;/strong> — write event to DB table in same tx, relay to Kafka → no lost/dual writes.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Idempotency&lt;/strong> — same request twice = same effect; idempotency key.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Retries&lt;/strong> — exponential backoff + jitter; retry budget to avoid retry storms.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Circuit breaker&lt;/strong> — stop calling a failing dependency, fail fast, probe later.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Timeouts everywhere&lt;/strong>, &lt;strong>bulkheads&lt;/strong> (isolate resources), &lt;strong>graceful degradation&lt;/strong>.&lt;/li>
&lt;/ul>
&lt;h2 id="8-backend--api-design">8. Backend / API design&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>HTTP methods&lt;/strong> — GET/PUT/DELETE idempotent; POST not. &lt;strong>Status codes&lt;/strong> — 200, 201, 204, 400, 401, 403, 404, 409, 429, 500, 503.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Pagination&lt;/strong> — offset (simple, slow + shifting) vs &lt;strong>cursor&lt;/strong> (stable, fast).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Auth&lt;/strong> — authN = who you are (JWT, OAuth, API keys); authZ = what you may do.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Rate limiting&lt;/strong> — token bucket / sliding window; return 429.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Caching&lt;/strong> — cache-aside (read cache → miss → DB → fill); on write update DB then &lt;strong>delete&lt;/strong> key; TTL as safety net. &lt;strong>Stampede&lt;/strong> fix: lock or early refresh. Write-through vs write-back.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Versioning&lt;/strong>, consistent error format, input validation at the boundary.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Microservices&lt;/strong> — clear boundaries, sync (HTTP/gRPC) vs async (queue), service discovery, each hop needs timeout + retry + metric.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Observability&lt;/strong> — logs (what), metrics (how much — RED: rate, errors, duration), traces (where time went).&lt;/li>
&lt;/ul>
&lt;h2 id="9-networking">9. Networking&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>URL → response&lt;/strong> — DNS (name → IP) → TCP handshake (SYN, SYN-ACK, ACK) → TLS handshake (certs, keys) → HTTP request → load balancer → app → DB → response.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>TCP vs UDP&lt;/strong> — TCP: connection, ordered, reliable, flow + congestion control. UDP: no guarantees, low latency (video calls, DNS, games).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>HTTP/1.1 vs 2 vs 3&lt;/strong> — keep-alive; multiplexing over one connection; QUIC over UDP.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>TLS&lt;/strong> — encrypts + authenticates the server with a certificate.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Load balancer&lt;/strong> — L4 (TCP) vs L7 (HTTP, path routing); health checks; round robin / least connections.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>DNS&lt;/strong> — records (A, CNAME), TTL caching. &lt;strong>CDN&lt;/strong>, &lt;strong>reverse proxy&lt;/strong>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>WebSocket vs polling&lt;/strong>, &lt;strong>gRPC&lt;/strong> (HTTP/2 + protobuf).&lt;/li>
&lt;/ul>
&lt;h2 id="10-os-and-linux">10. OS and Linux&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Process vs thread&lt;/strong> — threads share heap, code, globals, file descriptors; each has own stack + registers. Thread switch cheaper (no address-space change).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Context switch&lt;/strong> — save/restore registers; process switch also changes page tables (TLB flush).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Virtual memory&lt;/strong> — each process sees its own address space; page tables map to physical; page fault loads a page.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Stack vs heap&lt;/strong> — stack: function frames, automatic; heap: dynamic, GC/free.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>File descriptors&lt;/strong>, &lt;strong>signals&lt;/strong> (SIGTERM graceful, SIGKILL not catchable), &lt;strong>pipes&lt;/strong>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>I/O models&lt;/strong> — blocking, non-blocking, epoll (how Go&amp;rsquo;s netpoller handles thousands of connections).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Page cache&lt;/strong>, &lt;code>fsync&lt;/code>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Debug commands&lt;/strong> — &lt;code>top/htop&lt;/code>, &lt;code>ps&lt;/code>, &lt;code>lsof&lt;/code>, &lt;code>netstat/ss&lt;/code>, &lt;code>strace&lt;/code>, &lt;code>df&lt;/code>, &lt;code>free&lt;/code>, &lt;code>journalctl&lt;/code>, &lt;code>curl -v&lt;/code>, &lt;code>dig&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="11-data-stack">11. Data stack&lt;/h2>
&lt;p>&lt;strong>Airflow&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> DAG of tasks; scheduler; executor (Local/Celery/K8s); retries + timeouts per task; &lt;strong>pools&lt;/strong> cap concurrency; tasks must be &lt;strong>idempotent&lt;/strong> (re-runs, backfills); XCom only for small data.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Spark / EMR&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> Driver plans, executors run tasks; lazy transformations, actions trigger a job.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> Narrow (map, filter) vs wide (groupBy, join → &lt;strong>shuffle&lt;/strong>). Shuffle = expensive network + disk.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Skew&lt;/strong> — one key dominates → one slow task; fix: salting, broadcast join.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> Broadcast join for small tables; partitions sizing; caching; fault tolerance via lineage.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> EMR — managed Spark cluster on EC2; data in S3; autoscaling; spot instances for cost.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Snowflake + dbt&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> Storage separate from compute; &lt;strong>virtual warehouses&lt;/strong> (XS…4XL) billed in credits per second while running; auto-suspend/resume; queuing when busy.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> Bigger warehouse = faster but more credits/hour; right-sizing = route each workload to the smallest warehouse that meets its SLA (&lt;strong>your $610K story&lt;/strong>).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> Result cache, micro-partitions, clustering keys, query profile.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> dbt — SQL models + dependencies (DAG), materialisations (view, table, incremental), tests, docs.&lt;/li>
&lt;/ul>
&lt;h2 id="12-ai-stack">12. AI stack&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Embeddings&lt;/strong> — text → vector; similar meaning = close vectors (cosine similarity).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>RAG&lt;/strong> — chunk docs → embed → store in vector DB → at query time retrieve top-k → put in prompt → generate.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Chunking&lt;/strong>, &lt;strong>top-k&lt;/strong>, &lt;strong>reranking&lt;/strong> (cross-encoder rescoring), &lt;strong>metadata filters&lt;/strong>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Vector index&lt;/strong> — HNSW (graph-based approximate nearest neighbour); Qdrant uses it.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Evaluate separately&lt;/strong> — retrieval (did we fetch the right schema?) vs generation (is the SQL correct?).&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Text-to-SQL safety&lt;/strong> — read-only role, parse/validate SQL, row limits, timeouts, allow-listed tables, audit log.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>LangGraph&lt;/strong> — state graph: nodes (steps/agents), edges (conditional routing), shared state, retries, stop condition. Why multi-agent: separate retrieve / generate / validate / fix steps.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>MCP&lt;/strong> — protocol letting AI apps call tools: host ↔ client ↔ server; server exposes tools with JSON schemas. Risks: prompt injection, over-broad permissions → least privilege, validate inputs.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Bedrock&lt;/strong> — AWS managed LLM API; quotas, throttling → retries; data stays in AWS.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>FastAPI&lt;/strong> — ASGI, async endpoints, Pydantic validation, dependency injection; never block the event loop with CPU work.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>LLM serving basics&lt;/strong> (for AI-infra roles) — tokens, prefill vs decode, &lt;strong>KV cache&lt;/strong>, batching, latency (TTFT) vs throughput.&lt;/li>
&lt;/ul>
&lt;h2 id="13-infra-and-devops">13. Infra and DevOps&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Docker&lt;/strong> — image = layers; container = running image; layer caching (copy deps first); multi-stage builds; volumes; non-root user.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Kubernetes&lt;/strong> — Pod, Deployment (replicas + rolling update), Service (stable IP/DNS), Ingress; ConfigMap/Secret.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Probes&lt;/strong> — liveness (restart if dead), readiness (send traffic only when ready), startup.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Requests/limits&lt;/strong> — scheduling vs cap; over memory limit → OOMKilled.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>HPA&lt;/strong> — scale pods on CPU/custom metrics. &lt;strong>Rollback&lt;/strong> — &lt;code>kubectl rollout undo&lt;/code>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Helm&lt;/strong> — templated K8s manifests + values; releases with rollback.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>AWS&lt;/strong> — EC2 (VMs), S3 (object store, strongly consistent now), IAM (roles + least privilege), VPC basics.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>CI/CD&lt;/strong> — build → test → deploy; blue-green vs canary vs rolling; secrets never in repo.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Git&lt;/strong> — merge vs rebase, resolving conflicts, revert vs reset.&lt;/li>
&lt;/ul>
&lt;h2 id="14-system-design">14. System design&lt;/h2>
&lt;p>&lt;strong>Method (use every time):&lt;/strong> requirements (functional + scale numbers) → back-of-envelope (QPS, storage) → API → data model → high-level diagram → deep dive on the bottleneck → failures + scaling → trade-offs.&lt;/p>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> Numbers to know: 1 day ≈ 86,400 s ≈ 10^5 s; 1M/day ≈ 12/s avg; memory ~100 ns, SSD ~100 µs, same-region network ~0.5 ms, cross-region ~100 ms.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Your three designs&lt;/strong> — (1) 500K/day creative validation pipeline; (2) Narad at 10x logs; (3) safe text-to-SQL.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Classics&lt;/strong> — URL shortener, rate limiter, notification system, chat, news feed, distributed cache, job scheduler, web crawler (you built one!).&lt;/li>
&lt;/ul>
&lt;h2 id="15-dsa-live-coding">15. DSA (live coding)&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Protocol&lt;/strong> — clarify → examples → brute force → complexity → optimise → code → dry run → edge cases. Talk the whole time.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Patterns&lt;/strong> — two pointers, sliding window, binary search (incl. on answer), prefix sums, hashing, stack/monotonic stack, heap/top-k, BFS/DFS, topological sort, union-find, Dijkstra, DP (1D, 2D, knapsack, intervals), backtracking, tries, intervals, LRU cache.&lt;/li>
&lt;/ul>
&lt;h2 id="16-other-languages-on-the-resume-be-honest">16. Other languages on the resume (be honest)&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Rust&lt;/strong> — ownership, borrowing, lifetimes, &lt;code>Result/Option&lt;/code>, &lt;code>Arc&amp;lt;Mutex&amp;gt;&lt;/code>, &lt;code>Send/Sync&lt;/code>, async (tokio). Explain one web-shooter request path.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>C++&lt;/strong> — RAII, smart pointers, move semantics, STL complexity, virtual functions.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Java&lt;/strong> — JVM/GC, collections, &lt;code>equals/hashCode&lt;/code>, executors, &lt;code>volatile/synchronized&lt;/code>.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> If you can&amp;rsquo;t defend one, say &amp;ldquo;used it for X, not production depth&amp;rdquo; — or remove it.&lt;/li>
&lt;/ul>
&lt;h2 id="17-behavioural">17. Behavioural&lt;/h2>
&lt;ul>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>STAR stories&lt;/strong> (situation, task, action, result with a number) for: hardest bug, a conflict, a failure, ownership beyond your role, a tight deadline, disagreeing with a senior, learning something fast.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Logistics&lt;/strong> — why Singapore, notice period, EP sponsorship needed, expected salary, start date.&lt;/li>
&lt;li>&lt;input disabled="" type="checkbox"> &lt;strong>Questions to ask them&lt;/strong> — team&amp;rsquo;s biggest technical problem, on-call, how success is measured in 6 months.&lt;/li>
&lt;/ul></description></item></channel></rss>