Truth
์ง์ค์ ์ด๋์ ์๊ณ ๋๊ฐ ์งํค๋?
Where is the source of truth, and what is the last line of defense?
์ด ํ์ด์ง๊ฐ ๊ธฐ์ค์ด๋ค. ์์คํ ๋์์ธ์ ๋ชฉ๋ก ์๊ธฐ๊ฐ ์๋๋ผ ์ง๋ฌธ 5๊ฐ๋ก ๋ฌธ์ ๋ฅผ ์ฐ๋ฅด๊ณ , ์์คํ 15์๋ก ํด๋ฒ์ ๋ถํดํ๊ณ , ๋ฉ์์ ์คํจ๋ฅผ ์ง์ ๋ชฉ๊ฒฉํ ๋ค ์์ด๋ก ๋ฐฉ์ดํ๋ ๋ฃจํ๋ค.
์ ํจํด์ด๋ ๊ธฐ์ ์ ๋ง๋๋ฉด ์ด๋ ๊ฒ๋ง ๋ถํดํ๋ค: ์ด๋ ์ง๋ฌธ์ ๋ต์ธ๊ฐ โ ์ด๋ ์์ ์กฐํฉ์ธ๊ฐ โ ๋๊ฐ๋ก ๋ฌด์์ ๋๋ โ ์ด๋ค ์ซ์๋ก ๋ง์์์ ์๋.
์ด 4๋ฌธ์ฅ์ผ๋ก ์ ํ๋ฆฌ๋ฉด ์์ง ๋ชจ๋ฅด๋ ๊ฒ์ด๋ค. ๋ถํด๊ฐ ์ ๋๋ ํจํด์ ์ ์ ํ๋ณด๋ก ๊ฒฉ์ํ๋ค.
๋ชจ๋ ์์คํ ๋์์ธ ๋ต๋ณ์ ์ด ๋ค์ฏ ์ง๋ฌธ์ ํต๊ณผํด์ผ ํ๋ค.
์ง์ค์ ์ด๋์ ์๊ณ ๋๊ฐ ์งํค๋?
Where is the source of truth, and what is the last line of defense?
์ค๊ฐ์ ๋ป์ผ๋ฉด ๋ฌด์์ด ๋จ๊ณ ๋๊ฐ ์ด์ด๋ฐ๋?
If the process dies halfway, what durable record survives and who resumes it?
๋์์ ์ค๋ฉด ์ด๋ค ๋ถ๋ณ์์ด ๊นจ์ง๋?
When requests race, which invariant can break and how do I preserve it?
10๋ฐฐ๊ฐ ๋๋ฉด ๋ฌด์์ด ๋จผ์ ๋ถ๋ฌ์ง๋?
At ten times the load, which part breaks first and what fixed cost did I accept?
ํ๋ ธ์์ ์ด๋ป๊ฒ ์๋?
What metric, trace, audit row, or reconciliation loop tells me the system is wrong?
๊ฐ ์๋ ๋๊ตฌ ์ด๋ฆ์ด ์๋๋ผ ์ฌ๊ณ ๋์์ด๋ค. ๋ฐ๋์ ๊ณ ์ ๋๊ฐ๋ฅผ ๊ฐ์ด ๋งํ๋ค.
truth, atomicity, idempotency, durable intent, reconciliation
do less, copy, split, precompute, queue, approximate
add a layer only when the hop earns its cost
bounded everything, loud visible failure
consensus and quorum when truth spans nodes
์์คํ ์ ์คํจ์ ๋์์ฑ์ด ์ ์ด๊ณ , ์๊ณ ๋ฆฌ์ฆ์ ๋ณต์ก๋๊ฐ ์ ์ด๋ค. ์์ง ๋ง๊ณ ๋ฐ๋ก ํ๋ จํ๋ค.
I start with brute force to define correctness.
Sorting gives me order, and order gives me leverage.
If the answer space is monotonic, I can discard half.
I split the problem, solve the pieces, then combine the result.
If I solve the same state again, I should remember it.
Greedy only works when the local choice is safe.
A sliding window turns repeated scanning into one pass.
A hash map buys constant-time lookup with extra memory.
BFS explores by distance; DFS explores by path.
Backtracking is a controlled try-and-undo search.
๊ฐ๋ ์๋ค = ์ง์. ํฐ์ง ํ์ ๋ณธ ์ ์๋ค = ๊ฒฝํ.
ํจํด ์์ด ์์งํ๊ฒ ๋ง๋ ๋ค. ๊ทธ๋์ผ ์ ํจํด์ด ํ์ํ์ง ๋ชธ์ผ๋ก ์๋ค.
First I build the naive version so the failure has somewhere to show up.
์ค๋ณต์์ฒญ, ๋์ 100๊ฐ, TTL ๋ง๋ฃ, consumer kill, ๋๋ฆฐ ์์กด์ฑ ๊ฐ์ ๊ณต๊ฒฉ์ ์ง์ ๋ฃ๋๋ค.
Then I attack it with the exact failure mode I expect in production.
๊นจ์ง ํ, p99 ํญ๋ฑ, lag, DLQ, deadlock ์๋ฌธ์ ๋์ผ๋ก ๋ณธ๋ค. ๋ชฉ๊ฒฉ ์์ด ์๋ฃ ๊ธ์ง.
I need to witness the broken row, the latency spike, or the error log myself.
๋ฉฑ๋ฑํค, outbox, CAS, index, cache, timeout, circuit breaker ๋ฑ ํ์ํ ์๋ฅผ ๋ฐ๋๋ค.
Only after the failure is visible do I apply the pattern.
๊ฐ์ ๊ณต๊ฒฉ์ ๋ค์ ๋ฃ์ด์ ๋ฒํฐ๋ ๊ฒ์ ๋ณธ๋ค. ์์ ์ด ์ง์ง์ธ์ง ์ซ์๋ก ํ์ธํ๋ค.
I run the same attack again and prove the fix with a number.
Symptom / Cause / Fix / Metric / English interview line์ mdx ๋ก๊ทธ๋ก ๋จ๊ธด๋ค.
I close the loop with evidence: symptom, cause, fix, metric, and the interview sentence.
Tier R/1/2/3/4/Foundation์ ํ ํ๋ฉด์์ ๋ณธ๋ค. ์๋ฃ ๊ธฐ์ค์ ์ดํด๊ฐ ์๋๋ผ ์ฆ๊ฑฐ๋ค.
๋จผ์ ์ฝ๊ณ , ๋ซ๊ณ , ๋ค์ ๊ตฌํํ๊ณ , ์ ๊ทธ๋ฐ์ง ๋งํ๋ค.
repo์ ์๋ AI ์ฃผ๋ ์ฝ๋๋ ๋ค ์์ผ๋ก ์ฌ๊ตฌํํ๊ธฐ ์ ์๋ ๋ค ๊ฒ์ด ์๋๋ค.
webhook event_id UNIQUE, replay-safe result.
Evidence: duplicate webhook์ ๋ ๋ฒ ๋ฃ์ด๋ ๊ฒฐ๊ณผ๊ฐ ํ ๋ฒ๋ง ๋ฐ๋๋ ๋ก๊ทธ.
version ๋๋ ์กฐ๊ฑด๋ถ UPDATE๋ก lost update ๋ฐฉ์ง.
Evidence: ๋์ ์์ฒญ ์ ํ ์์ก/์ํ ๋ถ๋ณ์ ๋น๊ต.
์ถฉ๋๋ฅ ์ ๋ฐ๋ผ retry์ wait ์ค ์ ํ.
Evidence: lock wait time, conflict rate, retry count.
UNIQUE/CHECK/NOT NULL์ ๋ง์ง๋ง ๋ฐฉ์ด์ ์ผ๋ก ๋๋ค.
Evidence: ์ฝ๋๊ฐ ์๋ DB๊ฐ ๊ฑฐ๋ถํ๋ ์คํจ ํ ์คํธ.
์ํ ๋ณ๊ฒฝ๊ณผ ๊ฐ์ฌ/๋ถ์ ๊ธฐ๋ก์ ์ด๋๊น์ง ํ ์ปค๋ฐ์ผ๋ก ๋ฌถ์์ง ์ ํ๋ค.
Evidence: ์ค๊ฐ crash ์ ๋ฐ์ชฝ ์ํ๊ฐ ์๋์ง ํ์ธ.
์ ๋ฐ์ดํธ๋ก ๋ฎ์ง ์๊ณ append-only๋ก ์ฌ๊ฑด์ ๋จ๊ธด๋ค.
Evidence: ์ ์ด๋ง๋ค audit row๊ฐ ๋จ๋ ์ฟผ๋ฆฌ.
์์ฒญ ํ๋๋ฅผ ๋ก๊ทธ์ trace์์ ์ด์ด์ ๋ณธ๋ค.
Evidence: ํ trace id๋ก gateway -> DB๊น์ง ๋ฐ๋ผ๊ฐ๋ ์บก์ฒ.
hashing, dummy hash, secret handling.
Evidence: ์๋ฌธ ๋น๋ฐ๋ฒํธ/ํ ํฐ์ด ์ ์ฅ๋์ง ์๋ ์ฆ๊ฑฐ.
refresh token ์ฌ์ฌ์ฉ ๊ฐ์ง์ ํ๊ธฐ.
Evidence: reuse ์ ์ ์ฒด ์ธ์ ํ๊ธฐ ํ ์คํธ.
entity ownership๊ณผ ์ ๊ทผ ํจํด์ ๋ง์ถฐ ํ ์ด๋ธ์ ๋๋๋ค.
Evidence: ERD + ํต์ฌ ์ฟผ๋ฆฌ 3๊ฐ.
๋ฑํธ ๋จผ์ , ๋ฒ์ ๋ค์, partial index.
Evidence: EXPLAIN ANALYZE ์ ํ.
์ ์ฉ๋ V ์์ ๊ธ์ง, expand-contract.
Evidence: ๋ฌด์ค๋จ ๋ง์ด๊ทธ๋ ์ด์ ์ ์ฐจ.
Paddle/webhook/entitlement ๊ฐ์ ๋ ํ๋ฆ์ ๋ฐ๋๋ค.
๋ฉ์์ง๋ฅผ ์์ง๋, ๋ ๋ฒ ์ฒ๋ฆฌํ์ง๋, ์ฃฝ์ ์์กด์ฑ์ ๋๋ ค๊ฐ์ง๋ ์๊ฒ ๋ง๋ ๋ค.
entitlement ๋ณ๊ฒฝ๊ณผ outbox row๋ฅผ ํ ํธ๋์ญ์ ์ ๊ธฐ๋ก.
Evidence: DB commit ํ worker๊ฐ ๋ฐํํ๋ trace.
event_id UNIQUE๋ก at-least-once ์ค๋ณต ์์กด.
Evidence: ๊ฐ์ event 2ํ ์ฒ๋ฆฌ ๊ฒฐ๊ณผ.
์ธ๋ถ ์คํจ ์ ๋ฌดํ ์ฌ์๋ ๊ธ์ง.
Evidence: retry schedule๊ณผ max attempt ๋ก๊ทธ.
์์ง๋ ๋ฉ์์ง๋ฅผ ๋ฒ๋ฆฌ์ง ์๊ณ ๋ณด๊ด+์๋.
Evidence: poison message๊ฐ DLQ๋ก ๋น ์ง๋ ์บก์ฒ.
๋ชจ๋ ์ธ๋ถ ํธ์ถ์ hard timeout.
Evidence: ๋๋ฆฐ dependency๊ฐ thread pool์ ์ก์๋จน์ง ์๋ ์งํ.
์ฐ์ ์คํจ ์ fast-fail, pool ๊ฒฉ๋ฆฌ.
Evidence: open circuit count, protected endpoint latency.
๋ฐฐํฌ์ ๋ฆด๋ฆฌ์ฆ๋ฅผ ๋ถ๋ฆฌ.
Evidence: ์ ๋ก์ง off ์ ํ ๋์.
์ถ๊ฐ -> ์์ชฝ์ฐ๊ธฐ -> ์ ํ -> ์ ๊ฑฐ.
Evidence: ๊ตฌ๋ฒ์ /์ ๋ฒ์ ๋์ serving ํ์ธ.
token bucket์ผ๋ก ํ ์ฌ์ฉ์์ ์ฉ๋ ๋ ์ ๋ฐฉ์ง.
Evidence: 429 rate, Retry-After, abuse case.
pagination, versioning, Idempotency-Key, error format.
Evidence: API contract + failure examples.
์๋ช ๊ฒ์ฆ, out-of-order event ์ฒ๋ฆฌ.
Evidence: ์ทจ์๊ฐ ๊ฒฐ์ ๋ณด๋ค ๋จผ์ ์ค๋ ํ ์คํธ.
provider์ ๋ด๋ถ entitlement๋ฅผ ์ฃผ๊ธฐ ๋์กฐ.
Evidence: mismatch report and repair policy.
opendoor-mini/point-shop์ด ์ฑ์ฅํ๋ฉด์ ๊ฐ์ ๋ก ์งํํ๊ฒ ๋ง๋ ๋ค.
๊ฐ ์์ ์ ๊ณ ์ ๋๊ฐ๊ฐ ๋ค์ ์คํ ์ด์ง์ ์ฆ์์ด ๋๋ค.
๊ฒฌ์ -> PASS -> ์๋ฝ -> ๋์๋ณด๋ -> ๋งค๋ ์ ์ฒด ํ๋ก์ฐ ๊ฒ์ฆ.
Evidence: happy-path trace and row counts.
๋๋ค๋ณ median ๊ฐ์ ๋๋ฆฐ read๋ฅผ Redis๋ก ์บ์.
Evidence: cache hit rate, DB QPS, p95 before/after.
TTL ๋ง๋ฃ ์๊ฐ ๋์ ์์ฒญ 1๊ฐ๋ง DB๋ก ๋ณด๋ด๊ธฐ.
Evidence: same TTL attack before/after DB query count.
staleness bound ์ค๊ณ์ as-of ํ์.
Evidence: stale response count and TTL policy.
CAS vs SELECT FOR UPDATE vs no defense, ๋์ 100์์ฒญ ์ค์ธก.
Evidence: incorrect balance count, conflict rate, lock wait.
์ ๊ท ๊ฑฐ๋ ์คํธ๋ฆผ -> consumer๊ฐ sold_homes ์ ์ฌ.
Evidence: producer/consumer trace and lag.
Kafka ์ค๋ณต ๋ฐฐ๋ฌ์์ UNIQUE/dedup marker๋ก ์ค๋ณต ๋ฐฉ์ง.
Evidence: same message delivered twice, one side effect.
์ ๊ฑฐ๋ ์ ์ ์ ops dashboard์ push.
Evidence: event-to-screen delay p95.
๋๋ค๋ณ rolling median์ consumer๋ก ๋ฏธ๋ ๊ตฌํ.
Evidence: lag, aggregate drift, recompute check.
๊ฒ์ฌ -> ํ์ดํ -> ์ก๊ธ ์ค๊ฐ ์คํจ ์ ์ญ์ ๋ณด์.
Evidence: failed step and compensation log.
๋จ๊ณ๋ณ ์ํ ์ ์ด์ ์ฌ๊ฐ ๊ฐ๋ฅ์ฑ.
Evidence: illegal transition rejected, resume after crash.
์ผ๊ฐ ์ ์ฒด ์ฌํ๊ฐ: jobs table + worker + idempotent retry.
Evidence: job restart without duplicate side effects.
๋ฝ ์ก์ ์ข๋น ์์ปค๊ฐ ๋ค๋ฆ๊ฒ ์ฐ๋ ๋ฌธ์ ์ฌํ.
Evidence: stale worker write rejected.
์ก ํ ๊น์ด ์ํ๊ณผ ์ด๊ณผ ์ ๊ฑฐ๋ถ.
Evidence: queue depth, 503/429 rate, p99 protected.
sold_homes๋ฅผ market/city๋ณ LIST partitioning.
Evidence: partition scan count and cross-partition cost.
COPY/batch INSERT ์ค์ธก.
Evidence: single insert vs batch throughput.
write Postgres -> read model Redis/aggregate table ๋ถ๋ฆฌ.
Evidence: read p95, projection lag.
web/mobile๋ณ ์๋ต ์กฐ๋ฆฝ ๋ ์ด์ด.
Evidence: client calls reduced, hop latency measured.
์ง ์ฌ์ง: MinIO/S3 compatible + presigned URL.
Evidence: upload/download path and permission check.
Postgres FTS ๋จผ์ , ์ธ์ Elasticsearch๋ก ๊ฐ์ง ๊ธฐ์ค.
Evidence: LIKE vs FTS vs ES p95 and index lag.
comps = kNN, ํน์ง ๋ฒกํฐ ์ ์ฌ๋.
Evidence: nearest-neighbor quality examples.
๋๋ค ๊ฐ๊ฒฉ์ง์ ์๊ณ์ด ๋ชจ๋ธ๋ง.
Evidence: query shape, retention, rollup policy.
์๊ณ ๋น ๋ฅด๊ฒ ์คํจ๋ฅผ ๋ชฉ๊ฒฉํ๋ค.
๋ฐ๋์ ์์ ์คํจ ์๋ฌธ์ด๋ ์ซ์๊ฐ ๋์์ผ ํ๋ค.
index ์ ํ, rows scanned, buffers.
Evidence: query plan screenshot.
node add/remove ์ key movement ์ธก์ .
Evidence: movement percentage.
์คํ๋ฅ ๋ก ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ฐ๋ค.
Evidence: false positive rate.
์ ํ๋๋ฅผ ํ์ unique count ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ค์ธ๋ค.
Evidence: exact vs estimated count.
advisory lock์ผ๋ก ๋ฐฐ์น ๋ฆฌ๋ 1๋ช .
Evidence: two workers, one leader.
๋ฐฉ๊ธ ์ด ๊ฒ replica์์ ์ ๋ณด์ด๋ ์ฌ๊ณ .
Evidence: read-your-writes failure.
๋ด HTTP/DB/cache latency ํ.
Evidence: personal latency table.
SIGTERM ์ค ์์ฒญ/์ก์ ์์ ํ๊ฒ ์ ๋ฆฌ.
Evidence: in-flight request survives.
๋ง๋ค๋ฉด ์ํด์ธ ๊ฒ๋ค์ ๋ ผ์๋ก ์ถฉ๋ถํ ์ก๋๋ค.
์ง์ ๊ฒฝํ ๋ฉ ๋ค์ ๋ง๋ก ์ ๋ฆฌํด์ผ ์ง์ง ์ดํด๋๋ค.
replica lag ๊ฒฝํ ๋ค ์ผ๊ด์ฑ/๊ฐ์ฉ์ฑ ์ ํ์ ๋งํ๋ค.
Evidence: partition scenario explanation.
์ธ์ RDB๊ฐ ์๋๋ผ wide-column/key-value๊ฐ ํ์ํ์ง.
Evidence: access pattern comparison.
advisory lock ๋ฉ ํ ์ง์ง coordination์ ๋งํ๋ค.
Evidence: leader/quorum explanation.
append-only audit์ full event sourcing์ ์ฐจ์ด.
Evidence: where not to use it.
์กฐ์ง/์ด์ ๊ท๋ชจ๊ฐ ๋ง๋ ๋ ์ด์ด.
Evidence: when the hop earns its cost.
๋ ๊ฑฐ์ ์ ์ง ๊ต์ฒด ์ ๋ต.
Evidence: migration cutover sketch.
์ง์ ๋ง๋ limiter์ Kong/ALB์ ์ฐจ์ด.
Evidence: build vs buy boundary.
๋งค์ผ ์กฐ๊ธ์ฉ. ๋ชจ๋ฅด๋ฉด ์ค๊ณ๊ฐ ์ ๋ถ ํ๋ค๋ฆฐ๋ค.
๊ธฐ์ด๋ ๊ฒ์์ฉ ์ง์์ด ์๋๋ผ ์ฆ์ ๋งํ ์ ์๋ ๋จ์ด์ฌ์ผ ํ๋ค.
๋ธ๋ผ์ฐ์ ๊ฐ ์ ์ฌ์ ์์ฒญ์ ๋ณด๋ด๋์ง.
Evidence: OPTIONS flow explanation.
๋๋ฉ์ธ์ด ์ค์ IP๋ก ๊ฐ๋ ํ๋ฆ.
Evidence: domain setup explanation.
์ธ์ฆ์๊ฐ ๋ฌด์์ ๋ณด์ฆํ๋์ง.
Evidence: handshake in plain English.
heap, stack, GC, allocation.
Evidence: GC pause and heap graph.
TCP/UDP, keep-alive, connection pool.
Evidence: pool exhaustion scenario.
race, deadlock, thread pool, visibility.
Evidence: two-session reproduction.
method semantics and error contract.
Evidence: idempotent method examples.
isolation anomalies and lock behavior.
Evidence: READ COMMITTED vs REPEATABLE READ demo.
identity, permission, secret storage.
Evidence: threat scenario explanation.