Expression Index

card-by-card expression guide

`/ai`, `/concepts`, `/moves`์˜ ๋ชจ๋“  ์นด๋“œ๋ฅผ ๋Œ€์ƒ์œผ๋กœ raw English, explanation, probes, examples ์•ˆ์˜ ํ‘œํ˜„์„ ๋ฝ‘์•„ ์ง์—ญ, ์‹ค์ œ ๋œป, ๋‰˜์•™์Šค, ์˜ˆ๋ฌธ์„ ๋ถ™์˜€๋‹ค. ์นด๋“œ์—์„œ ๋ชจ๋ฅด๋Š” ํ‘œํ˜„์ด ๋‚˜์˜ค๋ฉด ์—ฌ๊ธฐ์„œ ๋ฐ”๋กœ ์ฐพ๋Š”๋‹ค.

394
cards covered
74
AI cards
295
Concept cards
25
Move cards
167
expression entries
Coverage rule

๋ชจ๋“  ์นด๋“œ๊ฐ€ ํ•ด์„์ง‘์„ ๊ฐ€์ง„๋‹ค. ํ˜„์žฌ ๋ˆ„๋ฝ ์นด๋“œ: 0.

๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ ๊ธฐ์ค€ ๊ณ ์œ  ํ‘œํ˜„ 155๊ฐœ๊ฐ€ ๋ณด์ธ๋‹ค. ํ‘œํ˜„ ์‚ฌ์ „์€ ์นด๋“œ ํ…์ŠคํŠธ์™€ ์ž๋™ ๋งค์นญ๋˜๊ณ , ๋งค์นญ์ด ์•ฝํ•œ ์นด๋“œ๋„ ๊ธฐ๋ณธ survival ํ‘œํ˜„์„ ๋ถ™์ธ๋‹ค.

ai:token

Token

Smallest unit the model reads and writes

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

context window
ํ•œ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ตœ๋Œ€ ํ† ํฐ ๋ฒ”์œ„.
term

์ง์—ญ: ๋ฌธ๋งฅ ์ฐฝ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ์žฅ๊ธฐ๊ธฐ์–ต์ด ์•„๋‹ˆ๋ผ ๊ทธ ์ˆœ๊ฐ„์˜ ์ž‘์—… ๊ณต๊ฐ„์ด๋‹ค.

Older turns fall out of the context window.

fall out
context๋‚˜ cache ๋ฒ”์œ„์—์„œ ๋น ์ ธ์„œ ๋” ์ด์ƒ ๋ณด์ด์ง€ ์•Š๊ฒŒ ๋˜๋‹ค.
verb

์ง์—ญ: ๋ฐ–์œผ๋กœ ๋–จ์–ด์ง€๋‹ค

๋‰˜์•™์Šค: LLM history, cache, sliding window์—์„œ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์“ด๋‹ค.

Old messages fall out of the context window.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

ai:context-window

Context Window

The model's working memory for one request

Open deck
context window
ํ•œ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ตœ๋Œ€ ํ† ํฐ ๋ฒ”์œ„.
term

์ง์—ญ: ๋ฌธ๋งฅ ์ฐฝ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ์žฅ๊ธฐ๊ธฐ์–ต์ด ์•„๋‹ˆ๋ผ ๊ทธ ์ˆœ๊ฐ„์˜ ์ž‘์—… ๊ณต๊ฐ„์ด๋‹ค.

Older turns fall out of the context window.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

token budget
์ž…๋ ฅ, ํžˆ์Šคํ† ๋ฆฌ, ์ถœ๋ ฅ์— ์“ธ ์ˆ˜ ์žˆ๋Š” ์ด ํ† ํฐ ํ•œ๋„.
term

์ง์—ญ: ํ† ํฐ ์˜ˆ์‚ฐ

๋‰˜์•™์Šค: ๋ˆ๊ณผ ์ง€์—ฐ์‹œ๊ฐ„, context overflow๋ฅผ ๋™์‹œ์— ์•”์‹œํ•œ๋‹ค.

I trim low-value text first because token budget is limited.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

vector store
embedding vector๋ฅผ ์ €์žฅํ•˜๊ณ  ์œ ์‚ฌ๋„ ๊ฒ€์ƒ‰ํ•˜๋Š” DB/์ธ๋ฑ์Šค.
term

์ง์—ญ: ๋ฒกํ„ฐ ์ €์žฅ์†Œ

๋‰˜์•™์Šค: Pinecone, pgvector, FAISS ๊ฐ™์€ ๊ฒƒ.

The vector store retrieves candidate chunks.

working memory
์ง€๊ธˆ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด๋‚˜ ์‚ฌ๋žŒ์ด ์‹ค์ œ๋กœ ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ •๋ณด.
term

์ง์—ญ: ์ž‘์—… ๊ธฐ์–ต

๋‰˜์•™์Šค: LLM context window๋ฅผ ์„ค๋ช…ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The context window is the model's working memory.

ai:embedding

Embedding

Turning text into searchable vectors

Open deck
chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

reranker
๊ฒ€์ƒ‰ ํ›„๋ณด๋ฅผ ๋‹ค์‹œ ์ฝ๊ณ  ๋” ์ •ํ™•ํ•œ ์ˆœ์„œ๋กœ ์žฌ์ •๋ ฌํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์žฌ์ˆœ์œ„ ๋ชจ๋ธ

๋‰˜์•™์Šค: top-k retrieval ๋’ค ํ’ˆ์งˆ์„ ์˜ฌ๋ฆฌ๋Š” ๋‹จ๊ณ„.

A reranker improves the top five chunks.

semantic search
๊ฐ™์€ ๋‹จ์–ด๊ฐ€ ์—†์–ด๋„ ์˜๋ฏธ๊ฐ€ ๊ฐ€๊นŒ์šด ๋ฌธ์„œ๋ฅผ ์ฐพ๋Š” ๊ฒ€์ƒ‰.
term

์ง์—ญ: ์˜๋ฏธ ๊ฒ€์ƒ‰

๋‰˜์•™์Šค: ID, error code, rare token์€ BM25๊ฐ€ ๋” ๊ฐ•ํ•  ๋•Œ๊ฐ€ ์žˆ๋‹ค.

Embeddings power semantic search.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

vector store
embedding vector๋ฅผ ์ €์žฅํ•˜๊ณ  ์œ ์‚ฌ๋„ ๊ฒ€์ƒ‰ํ•˜๋Š” DB/์ธ๋ฑ์Šค.
term

์ง์—ญ: ๋ฒกํ„ฐ ์ €์žฅ์†Œ

๋‰˜์•™์Šค: Pinecone, pgvector, FAISS ๊ฐ™์€ ๊ฒƒ.

The vector store retrieves candidate chunks.

ai:rag

RAG

Pulling in evidence before answering

Open deck
chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

citation
๋‹ต๋ณ€์ด ์–ด๋–ค source span์— ๊ทผ๊ฑฐํ•˜๋Š”์ง€ ํ‘œ์‹œํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ธ์šฉ/์ถœ์ฒ˜ ํ‘œ์‹œ

๋‰˜์•™์Šค: ์œ ์ฐฝํ•จ์ด ์•„๋‹ˆ๋ผ ๊ทผ๊ฑฐ๋ฅผ ๊ฒ€์ฆํ•˜๊ฒŒ ํ•ด์ค€๋‹ค.

Every factual claim needs a citation.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

eval set
๋ชจ๋ธ/ํ”„๋กฌํ”„ํŠธ ๋ณ€๊ฒฝ์ด ์ข‹์•„์กŒ๋Š”์ง€ ์ธก์ •ํ•˜๋Š” ๊ณ ์ • ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ๋ฌถ์Œ.
term

์ง์—ญ: ํ‰๊ฐ€ ์„ธํŠธ

๋‰˜์•™์Šค: ๊ฐ์ด ์•„๋‹ˆ๋ผ regression์„ ์žก๋Š” ๊ธฐ์ค€.

I run the prompt against an eval set.

grounded evidence
๋ชจ๋ธ ๋‹ต๋ณ€์ด ์‹ค์ œ ๋ฌธ์„œ/์ปจํ…์ŠคํŠธ์— ๊ธฐ๋ฐ˜ํ•œ๋‹ค๋Š” ๋œป.
term

์ง์—ญ: ๊ทผ๊ฑฐ์— ๊ณ ์ •๋œ ์ฆ๊ฑฐ

๋‰˜์•™์Šค: AI ๋‹ต๋ณ€์„ ๋ฏฟ๊ธฐ ์ „ citation๊ณผ ํ•จ๊ป˜ ํ™•์ธํ•ด์•ผ ํ•œ๋‹ค.

RAG gives the model grounded evidence.

hallucination
๋ชจ๋ธ์ด ๊ทผ๊ฑฐ ์—†๋Š” ๋‚ด์šฉ์„ ๊ทธ๋Ÿด๋“ฏํ•˜๊ฒŒ ๋งํ•˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ™˜๊ฐ

๋‰˜์•™์Šค: ํ‹€๋ฆฐ๋ฐ ์œ ์ฐฝํ•ด์„œ ์œ„ํ—˜ํ•˜๋‹ค.

Grounding reduces hallucination but does not remove it.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

regression
๊ธฐ์กด์— ๋˜๋˜ ๊ฒƒ์ด ๋ณ€๊ฒฝ ํ›„ ๊นจ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํšŒ๊ท€/ํ‡ดํ–‰

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ’ˆ์งˆ, ์ฝ”๋“œ, prompt ๋ชจ๋‘์— ์“ด๋‹ค.

The eval catches a regression in citation quality.

reranker
๊ฒ€์ƒ‰ ํ›„๋ณด๋ฅผ ๋‹ค์‹œ ์ฝ๊ณ  ๋” ์ •ํ™•ํ•œ ์ˆœ์„œ๋กœ ์žฌ์ •๋ ฌํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์žฌ์ˆœ์œ„ ๋ชจ๋ธ

๋‰˜์•™์Šค: top-k retrieval ๋’ค ํ’ˆ์งˆ์„ ์˜ฌ๋ฆฌ๋Š” ๋‹จ๊ณ„.

A reranker improves the top five chunks.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

ai:tool-call

Tool Call

Model requests a structured action

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

human-in-the-loop
์ž๋™ํ™” ์ค‘๊ฐ„์— ์‚ฌ๋žŒ์ด ์Šน์ธ/ํŒ๋‹จํ•˜๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์‚ฌ๋žŒ์ด ๋ฃจํ”„ ์•ˆ์— ์žˆ๋Š”

๋‰˜์•™์Šค: ๊ณ ์œ„ํ—˜ ํ–‰๋™์—์„œ ์•ˆ์ „์žฅ์น˜๋กœ ์“ด๋‹ค.

High-risk actions require human-in-the-loop approval.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

judge
์ถœ๋ ฅ ํ’ˆ์งˆ์„ rubric์œผ๋กœ ํ‰๊ฐ€ํ•˜๋Š” ๋ชจ๋ธ/๋กœ์ง.
term

์ง์—ญ: ์ฑ„์ ์ž

๋‰˜์•™์Šค: LLM-as-judge๋Š” ๋ณด์กฐ ์‹ ํ˜ธ์ด์ง€ ์ ˆ๋Œ€ ์ง„์‹ค์ด ์•„๋‹ˆ๋‹ค.

A judge scores clarity and groundedness.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

prompt injection
์™ธ๋ถ€ ์ž…๋ ฅ์ด ๋ชจ๋ธ ์ง€์‹œ๋ฅผ ํƒˆ์ทจํ•˜๋ ค๋Š” ๊ณต๊ฒฉ.
term

์ง์—ญ: ํ”„๋กฌํ”„ํŠธ ์ฃผ์ž…

๋‰˜์•™์Šค: RAG ๋ฌธ์„œ๋‚˜ ์›นํŽ˜์ด์ง€๊ฐ€ ์ˆจ์€ ๋ช…๋ น์„ ๋„ฃ๋Š” ๊ฒฝ์šฐ.

Tool use must defend against prompt injection.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

ai:mcp

MCP / Connector

Standard way to expose external tools

Open deck
audit trail
๋ˆ„๊ฐ€ ์–ธ์ œ ๋ฌด์—‡์„ ๋ฐ”๊ฟจ๋Š”์ง€ ๋‚จ๊ธด ๊ธฐ๋ก.
term

์ง์—ญ: ๊ฐ์‚ฌ ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: history log๋ณด๋‹ค ํ›จ์”ฌ ์ž์—ฐ์Šค๋Ÿฌ์šด ์‹ค๋ฌด ํ‘œํ˜„.

Every state transition writes an audit trail.

blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

escape hatch
์‹œ์Šคํ…œ์ด ์•ˆ์ „ํ•˜๊ฒŒ ๋น ์ ธ๋‚˜๊ฐˆ ์ˆ˜ ์žˆ๋Š” ๋Œ€์ฒด ์„ ํƒ.
term

์ง์—ญ: ํƒˆ์ถœ๊ตฌ

๋‰˜์•™์Šค: LLM์ด ๋ชจ๋ฅผ ๋•Œ abstainํ•˜๋Š” ๊ตฌ์กฐ ๊ฐ™์€ ๊ฒƒ.

The model needs an escape hatch: say it is not in the sources.

gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

prompt injection
์™ธ๋ถ€ ์ž…๋ ฅ์ด ๋ชจ๋ธ ์ง€์‹œ๋ฅผ ํƒˆ์ทจํ•˜๋ ค๋Š” ๊ณต๊ฒฉ.
term

์ง์—ญ: ํ”„๋กฌํ”„ํŠธ ์ฃผ์ž…

๋‰˜์•™์Šค: RAG ๋ฌธ์„œ๋‚˜ ์›นํŽ˜์ด์ง€๊ฐ€ ์ˆจ์€ ๋ช…๋ น์„ ๋„ฃ๋Š” ๊ฒฝ์šฐ.

Tool use must defend against prompt injection.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

ai:agent

Agent

Runtime that loops the model plus tools toward a goal

Open deck
context window
ํ•œ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ตœ๋Œ€ ํ† ํฐ ๋ฒ”์œ„.
term

์ง์—ญ: ๋ฌธ๋งฅ ์ฐฝ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ์žฅ๊ธฐ๊ธฐ์–ต์ด ์•„๋‹ˆ๋ผ ๊ทธ ์ˆœ๊ฐ„์˜ ์ž‘์—… ๊ณต๊ฐ„์ด๋‹ค.

Older turns fall out of the context window.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stopping condition
agent loop๊ฐ€ ์–ธ์ œ ๋ฉˆ์ถฐ์•ผ ํ•˜๋Š”์ง€ ์ •ํ•œ ์กฐ๊ฑด.
term

์ง์—ญ: ์ •์ง€ ์กฐ๊ฑด

๋‰˜์•™์Šค: ๋ฌดํ•œ ๋ฃจํ”„์™€ ๋น„์šฉ ํญ์ฃผ๋ฅผ ๋ง‰๋Š”๋‹ค.

Every agent needs a clear stopping condition.

ai:react-loop

ReAct Loop

Reason, act, observe, repeat

Open deck
agentic
๋ชจ๋ธ์ด ๋ชฉํ‘œ๋ฅผ ํ–ฅํ•ด ๋„๊ตฌ ์‚ฌ์šฉ๊ณผ ๋ฐ˜๋ณต์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์„ฑ๊ฒฉ.
term

์ง์—ญ: ์—์ด์ „ํŠธ์ ์ธ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ… ๋‹จ์–ด๋ผ ๊ตฌ์ฒด์  loop/tool/state๋กœ ํ’€์–ด์•ผ ํ•œ๋‹ค.

Agentic means loop, state, tools, and stopping conditions.

observability
์‹œ์Šคํ…œ ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ logs/metrics/traces๋กœ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ.
term

์ง์—ญ: ๊ด€์ธก ๊ฐ€๋Šฅ์„ฑ

๋‰˜์•™์Šค: monitoring๋ณด๋‹ค ๋„“๋‹ค.

Observability tells me why the request was slow.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

working memory
์ง€๊ธˆ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด๋‚˜ ์‚ฌ๋žŒ์ด ์‹ค์ œ๋กœ ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ •๋ณด.
term

์ง์—ญ: ์ž‘์—… ๊ธฐ์–ต

๋‰˜์•™์Šค: LLM context window๋ฅผ ์„ค๋ช…ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The context window is the model's working memory.

ai:orchestrator

Orchestrator

Central control over the workflow and its gates

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

not free
์ข‹์•„ ๋ณด์ด๋Š” ์„ ํƒ์—๋„ ๋น„์šฉ์ด ์žˆ๋‹ค๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ณต์งœ๊ฐ€ ์•„๋‹ˆ๋‹ค

๋‰˜์•™์Šค: ์งง๊ณ  ์ž์—ฐ์Šค๋Ÿฌ์šด trade-off ๋ฌธ์žฅ.

Caching is not free; it introduces staleness.

on top of that
์ถ”๊ฐ€ ๊ทผ๊ฑฐ๋‚˜ ์กฐ๊ฑด์„ ๋ง๋ถ™์ผ ๋•Œ ์“ฐ๋Š” ์—ฐ๊ฒฐ ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ทธ ์œ„์— ์ถ”๊ฐ€๋กœ

๋‰˜์•™์Šค: also๋ณด๋‹ค ๋” ๋งํ•˜๋Š” ํ๋ฆ„์ด ์ข‹๋‹ค.

On top of that, I would add citation checks.

structured output
JSON schema ๊ฐ™์€ ํ˜•์‹์— ๋งž์ถ˜ ๊ธฐ๊ณ„๊ฐ€ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ์ถœ๋ ฅ.
term

์ง์—ญ: ๊ตฌ์กฐํ™” ์ถœ๋ ฅ

๋‰˜์•™์Šค: ํ”„๋กฌํ”„ํŠธ๋งŒ์œผ๋กœ๋Š” ํ˜•์‹ ๊ฒฐ์ •์„ฑ์ด ์•ฝํ•˜๋‹ค.

Structured output makes the answer parseable.

token budget
์ž…๋ ฅ, ํžˆ์Šคํ† ๋ฆฌ, ์ถœ๋ ฅ์— ์“ธ ์ˆ˜ ์žˆ๋Š” ์ด ํ† ํฐ ํ•œ๋„.
term

์ง์—ญ: ํ† ํฐ ์˜ˆ์‚ฐ

๋‰˜์•™์Šค: ๋ˆ๊ณผ ์ง€์—ฐ์‹œ๊ฐ„, context overflow๋ฅผ ๋™์‹œ์— ์•”์‹œํ•œ๋‹ค.

I trim low-value text first because token budget is limited.

ai:agent-contract

Agent Contract

Structured output instead of free-form text

Open deck
judge
์ถœ๋ ฅ ํ’ˆ์งˆ์„ rubric์œผ๋กœ ํ‰๊ฐ€ํ•˜๋Š” ๋ชจ๋ธ/๋กœ์ง.
term

์ง์—ญ: ์ฑ„์ ์ž

๋‰˜์•™์Šค: LLM-as-judge๋Š” ๋ณด์กฐ ์‹ ํ˜ธ์ด์ง€ ์ ˆ๋Œ€ ์ง„์‹ค์ด ์•„๋‹ˆ๋‹ค.

A judge scores clarity and groundedness.

not free
์ข‹์•„ ๋ณด์ด๋Š” ์„ ํƒ์—๋„ ๋น„์šฉ์ด ์žˆ๋‹ค๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ณต์งœ๊ฐ€ ์•„๋‹ˆ๋‹ค

๋‰˜์•™์Šค: ์งง๊ณ  ์ž์—ฐ์Šค๋Ÿฌ์šด trade-off ๋ฌธ์žฅ.

Caching is not free; it introduces staleness.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

structured output
JSON schema ๊ฐ™์€ ํ˜•์‹์— ๋งž์ถ˜ ๊ธฐ๊ณ„๊ฐ€ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ์ถœ๋ ฅ.
term

์ง์—ญ: ๊ตฌ์กฐํ™” ์ถœ๋ ฅ

๋‰˜์•™์Šค: ํ”„๋กฌํ”„ํŠธ๋งŒ์œผ๋กœ๋Š” ํ˜•์‹ ๊ฒฐ์ •์„ฑ์ด ์•ฝํ•˜๋‹ค.

Structured output makes the answer parseable.

ai:run-ledger

Run Ledger

Every AI job recorded as a run

Open deck
append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

observability
์‹œ์Šคํ…œ ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ logs/metrics/traces๋กœ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ.
term

์ง์—ญ: ๊ด€์ธก ๊ฐ€๋Šฅ์„ฑ

๋‰˜์•™์Šค: monitoring๋ณด๋‹ค ๋„“๋‹ค.

Observability tells me why the request was slow.

run ledger
AI run์˜ ์ž…๋ ฅ, ๋„๊ตฌ ํ˜ธ์ถœ, ๊ฒฐ๊ณผ, ๊ฒ€์ฆ์„ ๊ธฐ๋กํ•œ ์žฅ๋ถ€.
term

์ง์—ญ: ์‹คํ–‰ ์žฅ๋ถ€

๋‰˜์•™์Šค: AI Work OS์—์„œ auditability์˜ ํ•ต์‹ฌ.

Every agent run writes to the run ledger.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

ai:artifact-lifecycle

Artifact Lifecycle

draft โ†’ verified โ†’ accepted/fix/rejected

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

artifact lifecycle
draft, review, verify, approve, publish ๊ฐ™์€ ์‚ฐ์ถœ๋ฌผ ์ƒํƒœ ํ๋ฆ„.
term

์ง์—ญ: ์‚ฐ์ถœ๋ฌผ ์ƒ๋ช…์ฃผ๊ธฐ

๋‰˜์•™์Šค: AI output์„ ๋ฐ”๋กœ ๊ฒฐ๊ณผ๋ฌผ๋กœ ๋ณด์ง€ ์•Š๋Š”๋‹ค๋Š” ๋œป.

The artifact lifecycle prevents raw model output from shipping.

audit trail
๋ˆ„๊ฐ€ ์–ธ์ œ ๋ฌด์—‡์„ ๋ฐ”๊ฟจ๋Š”์ง€ ๋‚จ๊ธด ๊ธฐ๋ก.
term

์ง์—ญ: ๊ฐ์‚ฌ ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: history log๋ณด๋‹ค ํ›จ์”ฌ ์ž์—ฐ์Šค๋Ÿฌ์šด ์‹ค๋ฌด ํ‘œํ˜„.

Every state transition writes an audit trail.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

state machine
ํ—ˆ์šฉ๋œ ์ƒํƒœ์™€ ์ „์ด๋งŒ ์ •์˜ํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์ƒํƒœ ๊ธฐ๊ณ„

๋‰˜์•™์Šค: ๋ถˆ๋ฒ• ์ƒํƒœ๋ฅผ ๋ง‰๋Š” LLD/๋„๋ฉ”์ธ ํ•ต์‹ฌ.

A state machine rejects illegal transitions.

ai:verification-harness

Verification Harness

Domain-specific verification runner

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

judge
์ถœ๋ ฅ ํ’ˆ์งˆ์„ rubric์œผ๋กœ ํ‰๊ฐ€ํ•˜๋Š” ๋ชจ๋ธ/๋กœ์ง.
term

์ง์—ญ: ์ฑ„์ ์ž

๋‰˜์•™์Šค: LLM-as-judge๋Š” ๋ณด์กฐ ์‹ ํ˜ธ์ด์ง€ ์ ˆ๋Œ€ ์ง„์‹ค์ด ์•„๋‹ˆ๋‹ค.

A judge scores clarity and groundedness.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

ai:judge

Judge

Merges multiple verifier results into a final call

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

by design
์šฐ์—ฐ์ด ์•„๋‹ˆ๋ผ ์˜๋„์ ์œผ๋กœ ๊ทธ๋ ‡๊ฒŒ ๋งŒ๋“  ๊ฒƒ.
phrase

์ง์—ญ: ์„ค๊ณ„์ƒ

๋‰˜์•™์Šค: ๊ฒฐํ•จ์ด ์•„๋‹ˆ๋ผ ์˜๋„๋œ trade-off์ž„์„ ๋งํ•  ๋•Œ ์œ ์šฉ.

The feed is eventually consistent by design.

hallucination
๋ชจ๋ธ์ด ๊ทผ๊ฑฐ ์—†๋Š” ๋‚ด์šฉ์„ ๊ทธ๋Ÿด๋“ฏํ•˜๊ฒŒ ๋งํ•˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ™˜๊ฐ

๋‰˜์•™์Šค: ํ‹€๋ฆฐ๋ฐ ์œ ์ฐฝํ•ด์„œ ์œ„ํ—˜ํ•˜๋‹ค.

Grounding reduces hallucination but does not remove it.

judge
์ถœ๋ ฅ ํ’ˆ์งˆ์„ rubric์œผ๋กœ ํ‰๊ฐ€ํ•˜๋Š” ๋ชจ๋ธ/๋กœ์ง.
term

์ง์—ญ: ์ฑ„์ ์ž

๋‰˜์•™์Šค: LLM-as-judge๋Š” ๋ณด์กฐ ์‹ ํ˜ธ์ด์ง€ ์ ˆ๋Œ€ ์ง„์‹ค์ด ์•„๋‹ˆ๋‹ค.

A judge scores clarity and groundedness.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

structured output
JSON schema ๊ฐ™์€ ํ˜•์‹์— ๋งž์ถ˜ ๊ธฐ๊ณ„๊ฐ€ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ์ถœ๋ ฅ.
term

์ง์—ญ: ๊ตฌ์กฐํ™” ์ถœ๋ ฅ

๋‰˜์•™์Šค: ํ”„๋กฌํ”„ํŠธ๋งŒ์œผ๋กœ๋Š” ํ˜•์‹ ๊ฒฐ์ •์„ฑ์ด ์•ฝํ•˜๋‹ค.

Structured output makes the answer parseable.

temperature
์ถœ๋ ฅ์˜ ๋ฌด์ž‘์œ„์„ฑ/๋‹ค์–‘์„ฑ์„ ์กฐ์ ˆํ•˜๋Š” sampling ํŒŒ๋ผ๋ฏธํ„ฐ.
term

์ง์—ญ: ์˜จ๋„

๋‰˜์•™์Šค: ๋‚ฎ์œผ๋ฉด ์•ˆ์ •, ๋†’์œผ๋ฉด ๋‹ค์–‘ํ•˜์ง€๋งŒ ํ”๋“ค๋ฆผ.

Lower temperature makes the output more stable.

verifier
๊ฒฐ๊ณผ๊ฐ€ ๊ทœ์น™, ํ…Œ์ŠคํŠธ, ๊ทผ๊ฑฐ๋ฅผ ๋งŒ์กฑํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๊ฒ€์ฆ๊ธฐ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ๋ง์„ ๋‹ค์‹œ ๋ชจ๋ธ/๊ทœ์น™/ํ…Œ์ŠคํŠธ๋กœ ํ™•์ธํ•œ๋‹ค.

The verifier rejects unsupported claims.

ai:eval-regression

Eval Regression

Turn fixed failures into tests so they don't come back

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

regression
๊ธฐ์กด์— ๋˜๋˜ ๊ฒƒ์ด ๋ณ€๊ฒฝ ํ›„ ๊นจ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํšŒ๊ท€/ํ‡ดํ–‰

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ’ˆ์งˆ, ์ฝ”๋“œ, prompt ๋ชจ๋‘์— ์“ด๋‹ค.

The eval catches a regression in citation quality.

ai:observer

Observer / Trace

Logs tool calls, latency, cost, and failure reasons

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

on top of that
์ถ”๊ฐ€ ๊ทผ๊ฑฐ๋‚˜ ์กฐ๊ฑด์„ ๋ง๋ถ™์ผ ๋•Œ ์“ฐ๋Š” ์—ฐ๊ฒฐ ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ทธ ์œ„์— ์ถ”๊ฐ€๋กœ

๋‰˜์•™์Šค: also๋ณด๋‹ค ๋” ๋งํ•˜๋Š” ํ๋ฆ„์ด ์ข‹๋‹ค.

On top of that, I would add citation checks.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

ai:human-policy-gate

Human / Policy Gate

Risky outputs need human sign-off

Open deck
append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

human-in-the-loop
์ž๋™ํ™” ์ค‘๊ฐ„์— ์‚ฌ๋žŒ์ด ์Šน์ธ/ํŒ๋‹จํ•˜๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์‚ฌ๋žŒ์ด ๋ฃจํ”„ ์•ˆ์— ์žˆ๋Š”

๋‰˜์•™์Šค: ๊ณ ์œ„ํ—˜ ํ–‰๋™์—์„œ ์•ˆ์ „์žฅ์น˜๋กœ ์“ด๋‹ค.

High-risk actions require human-in-the-loop approval.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

ai:product-impact

Product Impact

Decide the value before touching the tech

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

ai:llm

LLM

Where the LLM's job ends

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

ai:next-token-prediction

Next-token Prediction

It just predicts the next token

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

temperature
์ถœ๋ ฅ์˜ ๋ฌด์ž‘์œ„์„ฑ/๋‹ค์–‘์„ฑ์„ ์กฐ์ ˆํ•˜๋Š” sampling ํŒŒ๋ผ๋ฏธํ„ฐ.
term

์ง์—ญ: ์˜จ๋„

๋‰˜์•™์Šค: ๋‚ฎ์œผ๋ฉด ์•ˆ์ •, ๋†’์œผ๋ฉด ๋‹ค์–‘ํ•˜์ง€๋งŒ ํ”๋“ค๋ฆผ.

Lower temperature makes the output more stable.

ai:model-weights

Model Weights

Frozen parameters baked in at training

Open deck
context window
ํ•œ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ตœ๋Œ€ ํ† ํฐ ๋ฒ”์œ„.
term

์ง์—ญ: ๋ฌธ๋งฅ ์ฐฝ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ์žฅ๊ธฐ๊ธฐ์–ต์ด ์•„๋‹ˆ๋ผ ๊ทธ ์ˆœ๊ฐ„์˜ ์ž‘์—… ๊ณต๊ฐ„์ด๋‹ค.

Older turns fall out of the context window.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

ai:pretraining

Pretraining

Where general language ability comes from

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

ai:instruction-tuning

Instruction Tuning

Teaching it to follow instructions

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

ai:preference-tuning

Preference Tuning

Tuning toward answers people prefer

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

ai:sampling

Sampling

How the model picks each token

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

temperature
์ถœ๋ ฅ์˜ ๋ฌด์ž‘์œ„์„ฑ/๋‹ค์–‘์„ฑ์„ ์กฐ์ ˆํ•˜๋Š” sampling ํŒŒ๋ผ๋ฏธํ„ฐ.
term

์ง์—ญ: ์˜จ๋„

๋‰˜์•™์Šค: ๋‚ฎ์œผ๋ฉด ์•ˆ์ •, ๋†’์œผ๋ฉด ๋‹ค์–‘ํ•˜์ง€๋งŒ ํ”๋“ค๋ฆผ.

Lower temperature makes the output more stable.

ai:temperature-top-p

Temperature / Top-p

Tuning output variety vs. stability

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

temperature
์ถœ๋ ฅ์˜ ๋ฌด์ž‘์œ„์„ฑ/๋‹ค์–‘์„ฑ์„ ์กฐ์ ˆํ•˜๋Š” sampling ํŒŒ๋ผ๋ฏธํ„ฐ.
term

์ง์—ญ: ์˜จ๋„

๋‰˜์•™์Šค: ๋‚ฎ์œผ๋ฉด ์•ˆ์ •, ๋†’์œผ๋ฉด ๋‹ค์–‘ํ•˜์ง€๋งŒ ํ”๋“ค๋ฆผ.

Lower temperature makes the output more stable.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

ai:model-selection

Model Selection

Trading off quality, cost, speed, and tool use

Open deck
agentic
๋ชจ๋ธ์ด ๋ชฉํ‘œ๋ฅผ ํ–ฅํ•ด ๋„๊ตฌ ์‚ฌ์šฉ๊ณผ ๋ฐ˜๋ณต์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์„ฑ๊ฒฉ.
term

์ง์—ญ: ์—์ด์ „ํŠธ์ ์ธ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ… ๋‹จ์–ด๋ผ ๊ตฌ์ฒด์  loop/tool/state๋กœ ํ’€์–ด์•ผ ํ•œ๋‹ค.

Agentic means loop, state, tools, and stopping conditions.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

ai:hallucination

Hallucination

Confident answers with nothing backing them

Open deck
citation
๋‹ต๋ณ€์ด ์–ด๋–ค source span์— ๊ทผ๊ฑฐํ•˜๋Š”์ง€ ํ‘œ์‹œํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ธ์šฉ/์ถœ์ฒ˜ ํ‘œ์‹œ

๋‰˜์•™์Šค: ์œ ์ฐฝํ•จ์ด ์•„๋‹ˆ๋ผ ๊ทผ๊ฑฐ๋ฅผ ๊ฒ€์ฆํ•˜๊ฒŒ ํ•ด์ค€๋‹ค.

Every factual claim needs a citation.

escape hatch
์‹œ์Šคํ…œ์ด ์•ˆ์ „ํ•˜๊ฒŒ ๋น ์ ธ๋‚˜๊ฐˆ ์ˆ˜ ์žˆ๋Š” ๋Œ€์ฒด ์„ ํƒ.
term

์ง์—ญ: ํƒˆ์ถœ๊ตฌ

๋‰˜์•™์Šค: LLM์ด ๋ชจ๋ฅผ ๋•Œ abstainํ•˜๋Š” ๊ตฌ์กฐ ๊ฐ™์€ ๊ฒƒ.

The model needs an escape hatch: say it is not in the sources.

first-class
๋ณด์กฐ๊ฐ€ ์•„๋‹ˆ๋ผ ์‹œ์Šคํ…œ์˜ ์ •์‹ ๊ฐœ๋…์œผ๋กœ ๋‹ค๋ฃฌ๋‹ค๋Š” ๋œป.
collocation

์ง์—ญ: ์ผ๊ธ‰์˜

๋‰˜์•™์Šค: abstention, approval, trace ๊ฐ™์€ ๊ฒƒ์— ๋ถ™์ด๋ฉด ์ข‹๋‹ค.

Abstention should be a first-class output.

hallucination
๋ชจ๋ธ์ด ๊ทผ๊ฑฐ ์—†๋Š” ๋‚ด์šฉ์„ ๊ทธ๋Ÿด๋“ฏํ•˜๊ฒŒ ๋งํ•˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ™˜๊ฐ

๋‰˜์•™์Šค: ํ‹€๋ฆฐ๋ฐ ์œ ์ฐฝํ•ด์„œ ์œ„ํ—˜ํ•˜๋‹ค.

Grounding reduces hallucination but does not remove it.

on top of that
์ถ”๊ฐ€ ๊ทผ๊ฑฐ๋‚˜ ์กฐ๊ฑด์„ ๋ง๋ถ™์ผ ๋•Œ ์“ฐ๋Š” ์—ฐ๊ฒฐ ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ทธ ์œ„์— ์ถ”๊ฐ€๋กœ

๋‰˜์•™์Šค: also๋ณด๋‹ค ๋” ๋งํ•˜๋Š” ํ๋ฆ„์ด ์ข‹๋‹ค.

On top of that, I would add citation checks.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

source span
๋ฌธ์„œ ์•ˆ์—์„œ ์ฃผ์žฅ์„ ๋’ท๋ฐ›์นจํ•˜๋Š” ์ •ํ™•ํ•œ ๋ฌธ์žฅ/๋ฒ”์œ„.
term

์ง์—ญ: ์ถœ์ฒ˜ ๊ตฌ๊ฐ„

๋‰˜์•™์Šค: citation์ด ์‹ค์ œ๋กœ supportingํ•˜๋Š”์ง€ ๋ณด๋Š” ๋‹จ์œ„.

The verifier checks the cited source span.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

verifier
๊ฒฐ๊ณผ๊ฐ€ ๊ทœ์น™, ํ…Œ์ŠคํŠธ, ๊ทผ๊ฑฐ๋ฅผ ๋งŒ์กฑํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๊ฒ€์ฆ๊ธฐ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ๋ง์„ ๋‹ค์‹œ ๋ชจ๋ธ/๊ทœ์น™/ํ…Œ์ŠคํŠธ๋กœ ํ™•์ธํ•œ๋‹ค.

The verifier rejects unsupported claims.

ai:message-roles

Message Roles

The system / developer / user instruction layers

Open deck
prompt injection
์™ธ๋ถ€ ์ž…๋ ฅ์ด ๋ชจ๋ธ ์ง€์‹œ๋ฅผ ํƒˆ์ทจํ•˜๋ ค๋Š” ๊ณต๊ฒฉ.
term

์ง์—ญ: ํ”„๋กฌํ”„ํŠธ ์ฃผ์ž…

๋‰˜์•™์Šค: RAG ๋ฌธ์„œ๋‚˜ ์›นํŽ˜์ด์ง€๊ฐ€ ์ˆจ์€ ๋ช…๋ น์„ ๋„ฃ๋Š” ๊ฒฝ์šฐ.

Tool use must defend against prompt injection.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

ai:prompt-contract

Prompt Contract

Locking down goal, input, output, and the don'ts

Open deck
eval set
๋ชจ๋ธ/ํ”„๋กฌํ”„ํŠธ ๋ณ€๊ฒฝ์ด ์ข‹์•„์กŒ๋Š”์ง€ ์ธก์ •ํ•˜๋Š” ๊ณ ์ • ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ๋ฌถ์Œ.
term

์ง์—ญ: ํ‰๊ฐ€ ์„ธํŠธ

๋‰˜์•™์Šค: ๊ฐ์ด ์•„๋‹ˆ๋ผ regression์„ ์žก๋Š” ๊ธฐ์ค€.

I run the prompt against an eval set.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

ai:few-shot

Few-shot Examples

Pinning the pattern down with examples

Open deck
edge case
๋ณดํ†ต ํ๋ฆ„์ด ์•„๋‹Œ ๊ฒฝ๊ณ„/์˜ˆ์™ธ ์ƒํ™ฉ.
term

์ง์—ญ: ๊ฐ€์žฅ์ž๋ฆฌ ๊ฒฝ์šฐ

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ๋Š” happy path์™€ ๋Œ€๋น„ํ•ด์„œ ๋งํ•œ๋‹ค.

I would test the timeout edge case separately.

eval set
๋ชจ๋ธ/ํ”„๋กฌํ”„ํŠธ ๋ณ€๊ฒฝ์ด ์ข‹์•„์กŒ๋Š”์ง€ ์ธก์ •ํ•˜๋Š” ๊ณ ์ • ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ๋ฌถ์Œ.
term

์ง์—ญ: ํ‰๊ฐ€ ์„ธํŠธ

๋‰˜์•™์Šค: ๊ฐ์ด ์•„๋‹ˆ๋ผ regression์„ ์žก๋Š” ๊ธฐ์ค€.

I run the prompt against an eval set.

few-shot
ํ”„๋กฌํ”„ํŠธ ์•ˆ์— ๋ช‡ ๊ฐœ ์˜ˆ์‹œ๋ฅผ ๋„ฃ์–ด ํŒจํ„ด์„ ๋ณด์—ฌ์ฃผ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋ช‡ ๊ฐœ ์˜ˆ์‹œ๋ฅผ ์ฃผ๋Š”

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ•™์Šต์ด ์•„๋‹ˆ๋ผ context ์•ˆ ์‹œ์—ฐ์ด๋‹ค.

Few-shot prompting teaches the expected shape.

happy path
๋ชจ๋“  ๊ฒƒ์ด ์ •์ƒ์ ์œผ๋กœ ๋˜๋Š” ๊ธฐ๋ณธ ์„ฑ๊ณต ํ๋ฆ„.
term

์ง์—ญ: ํ–‰๋ณตํ•œ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: ์‹ค๋ฌด ๊ณ ์ • ํ‘œํ˜„. success path๋ณด๋‹ค ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

The happy path works, but retries break it.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

regression
๊ธฐ์กด์— ๋˜๋˜ ๊ฒƒ์ด ๋ณ€๊ฒฝ ํ›„ ๊นจ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํšŒ๊ท€/ํ‡ดํ–‰

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ’ˆ์งˆ, ์ฝ”๋“œ, prompt ๋ชจ๋‘์— ์“ด๋‹ค.

The eval catches a regression in citation quality.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

ai:structured-output

Structured Output

Machine-readable results instead of free text

Open deck
structured output
JSON schema ๊ฐ™์€ ํ˜•์‹์— ๋งž์ถ˜ ๊ธฐ๊ณ„๊ฐ€ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ์ถœ๋ ฅ.
term

์ง์—ญ: ๊ตฌ์กฐํ™” ์ถœ๋ ฅ

๋‰˜์•™์Šค: ํ”„๋กฌํ”„ํŠธ๋งŒ์œผ๋กœ๋Š” ํ˜•์‹ ๊ฒฐ์ •์„ฑ์ด ์•ฝํ•˜๋‹ค.

Structured output makes the answer parseable.

ai:reasoning-budget

Reasoning Budget

Spend reasoning effort where it pays off

Open deck
agentic
๋ชจ๋ธ์ด ๋ชฉํ‘œ๋ฅผ ํ–ฅํ•ด ๋„๊ตฌ ์‚ฌ์šฉ๊ณผ ๋ฐ˜๋ณต์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์„ฑ๊ฒฉ.
term

์ง์—ญ: ์—์ด์ „ํŠธ์ ์ธ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ… ๋‹จ์–ด๋ผ ๊ตฌ์ฒด์  loop/tool/state๋กœ ํ’€์–ด์•ผ ํ•œ๋‹ค.

Agentic means loop, state, tools, and stopping conditions.

at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

token budget
์ž…๋ ฅ, ํžˆ์Šคํ† ๋ฆฌ, ์ถœ๋ ฅ์— ์“ธ ์ˆ˜ ์žˆ๋Š” ์ด ํ† ํฐ ํ•œ๋„.
term

์ง์—ญ: ํ† ํฐ ์˜ˆ์‚ฐ

๋‰˜์•™์Šค: ๋ˆ๊ณผ ์ง€์—ฐ์‹œ๊ฐ„, context overflow๋ฅผ ๋™์‹œ์— ์•”์‹œํ•œ๋‹ค.

I trim low-value text first because token budget is limited.

ai:chunking

Chunking

Splitting docs into retrievable pieces

Open deck
chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

reranker
๊ฒ€์ƒ‰ ํ›„๋ณด๋ฅผ ๋‹ค์‹œ ์ฝ๊ณ  ๋” ์ •ํ™•ํ•œ ์ˆœ์„œ๋กœ ์žฌ์ •๋ ฌํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์žฌ์ˆœ์œ„ ๋ชจ๋ธ

๋‰˜์•™์Šค: top-k retrieval ๋’ค ํ’ˆ์งˆ์„ ์˜ฌ๋ฆฌ๋Š” ๋‹จ๊ณ„.

A reranker improves the top five chunks.

ai:metadata-filtering

Metadata Filtering

Narrowing the search space first

Open deck
chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

semantic search
๊ฐ™์€ ๋‹จ์–ด๊ฐ€ ์—†์–ด๋„ ์˜๋ฏธ๊ฐ€ ๊ฐ€๊นŒ์šด ๋ฌธ์„œ๋ฅผ ์ฐพ๋Š” ๊ฒ€์ƒ‰.
term

์ง์—ญ: ์˜๋ฏธ ๊ฒ€์ƒ‰

๋‰˜์•™์Šค: ID, error code, rare token์€ BM25๊ฐ€ ๋” ๊ฐ•ํ•  ๋•Œ๊ฐ€ ์žˆ๋‹ค.

Embeddings power semantic search.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

ai:hybrid-search

Hybrid Search

Combining keyword and vector search

Open deck
embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

hybrid search
vector semantic search์™€ BM25 lexical search๋ฅผ ๊ฐ™์ด ์“ฐ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๊ฒ€์ƒ‰

๋‰˜์•™์Šค: ์˜๋ฏธ์™€ ์ •ํ™• ํ‚ค์›Œ๋“œ๋ฅผ ๋ชจ๋‘ ์žก๋Š”๋‹ค.

Hybrid search combines vector and lexical ranking.

lexical search
๋‹จ์–ด/ํ† ํฐ์ด ์ •ํ™•ํžˆ ๋งž๋Š”์ง€ ๋ณด๋Š” ๊ฒ€์ƒ‰.
term

์ง์—ญ: ์–ดํœ˜ ๊ฒ€์ƒ‰

๋‰˜์•™์Šค: BM25๊ฐ€ ๋Œ€ํ‘œ.

Lexical search catches exact error codes.

ai:reranking

Reranking

Re-sorting candidates by real relevance

Open deck
hallucination
๋ชจ๋ธ์ด ๊ทผ๊ฑฐ ์—†๋Š” ๋‚ด์šฉ์„ ๊ทธ๋Ÿด๋“ฏํ•˜๊ฒŒ ๋งํ•˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ™˜๊ฐ

๋‰˜์•™์Šค: ํ‹€๋ฆฐ๋ฐ ์œ ์ฐฝํ•ด์„œ ์œ„ํ—˜ํ•˜๋‹ค.

Grounding reduces hallucination but does not remove it.

reranker
๊ฒ€์ƒ‰ ํ›„๋ณด๋ฅผ ๋‹ค์‹œ ์ฝ๊ณ  ๋” ์ •ํ™•ํ•œ ์ˆœ์„œ๋กœ ์žฌ์ •๋ ฌํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์žฌ์ˆœ์œ„ ๋ชจ๋ธ

๋‰˜์•™์Šค: top-k retrieval ๋’ค ํ’ˆ์งˆ์„ ์˜ฌ๋ฆฌ๋Š” ๋‹จ๊ณ„.

A reranker improves the top five chunks.

ai:grounding-citations

Grounding / Citations

Tying answers back to evidence

Open deck
chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

citation
๋‹ต๋ณ€์ด ์–ด๋–ค source span์— ๊ทผ๊ฑฐํ•˜๋Š”์ง€ ํ‘œ์‹œํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ธ์šฉ/์ถœ์ฒ˜ ํ‘œ์‹œ

๋‰˜์•™์Šค: ์œ ์ฐฝํ•จ์ด ์•„๋‹ˆ๋ผ ๊ทผ๊ฑฐ๋ฅผ ๊ฒ€์ฆํ•˜๊ฒŒ ํ•ด์ค€๋‹ค.

Every factual claim needs a citation.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

judge
์ถœ๋ ฅ ํ’ˆ์งˆ์„ rubric์œผ๋กœ ํ‰๊ฐ€ํ•˜๋Š” ๋ชจ๋ธ/๋กœ์ง.
term

์ง์—ญ: ์ฑ„์ ์ž

๋‰˜์•™์Šค: LLM-as-judge๋Š” ๋ณด์กฐ ์‹ ํ˜ธ์ด์ง€ ์ ˆ๋Œ€ ์ง„์‹ค์ด ์•„๋‹ˆ๋‹ค.

A judge scores clarity and groundedness.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

ai:context-compression

Context Compression

Squeezing long context down to what the task needs

Open deck
chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

citation
๋‹ต๋ณ€์ด ์–ด๋–ค source span์— ๊ทผ๊ฑฐํ•˜๋Š”์ง€ ํ‘œ์‹œํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ธ์šฉ/์ถœ์ฒ˜ ํ‘œ์‹œ

๋‰˜์•™์Šค: ์œ ์ฐฝํ•จ์ด ์•„๋‹ˆ๋ผ ๊ทผ๊ฑฐ๋ฅผ ๊ฒ€์ฆํ•˜๊ฒŒ ํ•ด์ค€๋‹ค.

Every factual claim needs a citation.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

ai:memory-types

Memory Types

Session vs. user vs. semantic vs. episodic memory

Open deck
in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

vector store
embedding vector๋ฅผ ์ €์žฅํ•˜๊ณ  ์œ ์‚ฌ๋„ ๊ฒ€์ƒ‰ํ•˜๋Š” DB/์ธ๋ฑ์Šค.
term

์ง์—ญ: ๋ฒกํ„ฐ ์ €์žฅ์†Œ

๋‰˜์•™์Šค: Pinecone, pgvector, FAISS ๊ฐ™์€ ๊ฒƒ.

The vector store retrieves candidate chunks.

working memory
์ง€๊ธˆ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด๋‚˜ ์‚ฌ๋žŒ์ด ์‹ค์ œ๋กœ ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ •๋ณด.
term

์ง์—ญ: ์ž‘์—… ๊ธฐ์–ต

๋‰˜์•™์Šค: LLM context window๋ฅผ ์„ค๋ช…ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The context window is the model's working memory.

ai:stale-context

Stale Context

Stale evidence poisoning the answer

Open deck
judge
์ถœ๋ ฅ ํ’ˆ์งˆ์„ rubric์œผ๋กœ ํ‰๊ฐ€ํ•˜๋Š” ๋ชจ๋ธ/๋กœ์ง.
term

์ง์—ญ: ์ฑ„์ ์ž

๋‰˜์•™์Šค: LLM-as-judge๋Š” ๋ณด์กฐ ์‹ ํ˜ธ์ด์ง€ ์ ˆ๋Œ€ ์ง„์‹ค์ด ์•„๋‹ˆ๋‹ค.

A judge scores clarity and groundedness.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

webhook
์™ธ๋ถ€ ์‹œ์Šคํ…œ์ด ์šฐ๋ฆฌ ์„œ๋ฒ„๋กœ ๋ณด๋‚ด๋Š” ์ด๋ฒคํŠธ callback.
term

์ง์—ญ: ์›นํ›…

๋‰˜์•™์Šค: ์ค‘๋ณต, ์ˆœ์„œ ์—ญ์ „, ์„œ๋ช… ๊ฒ€์ฆ์ด ํ•ต์‹ฌ.

Payment webhooks are delivered at least once.

ai:function-schema

Function Schema

The tool's input contract

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

ai:argument-validation

Argument Validation

Don't trust the model's tool args

Open deck
blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

ai:idempotent-tool

Idempotent Tool

Tools that don't double-fire on retry

Open deck
idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

stable key
์žฌ์‹œ๋„ํ•ด๋„ ๋ณ€ํ•˜์ง€ ์•Š๋Š” dedup/idempotency ๊ธฐ์ค€๊ฐ’.
term

์ง์—ญ: ์•ˆ์ •์ ์ธ ํ‚ค

๋‰˜์•™์Šค: ๋งค๋ฒˆ ์ƒˆ๋กœ ๋งŒ๋“ค๋ฉด ๋ฉฑ๋“ฑ์„ฑ์ด ๊นจ์ง„๋‹ค.

The idempotency key must be stable across retries.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

ai:tool-error-handling

Tool Error Handling

Feeding tool failures back into agent state

Open deck
exponential backoff
์žฌ์‹œ๋„ ๊ฐ„๊ฒฉ์„ 1์ดˆ, 2์ดˆ, 4์ดˆ์ฒ˜๋Ÿผ ์ ์  ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ง€์ˆ˜ ๋ฐฑ์˜คํ”„

๋‰˜์•™์Šค: ์ฃฝ์–ด๊ฐ€๋Š” ์˜์กด์„ฑ์— ๋ถ€ํ•˜๋ฅผ ๋”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์“ด๋‹ค.

Retries use exponential backoff.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

ai:sandboxed-execution

Sandboxed Execution

Isolating code, file, and command execution

Open deck
blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

sandbox
์ฝ”๋“œ/๋„๊ตฌ๊ฐ€ ์‹œ์Šคํ…œ ์ „์ฒด๋ฅผ ๋ง๊ฐ€๋œจ๋ฆฌ์ง€ ๋ชปํ•˜๊ฒŒ ์ œํ•œ๋œ ์‹คํ–‰ ๊ณต๊ฐ„.
term

์ง์—ญ: ๊ฒฉ๋ฆฌ ์‹คํ–‰ ํ™˜๊ฒฝ

๋‰˜์•™์Šค: AI agent tool execution์—์„œ ํ•ต์‹ฌ.

Untrusted code runs in a sandbox.

ai:approval-before-action

Approval Before Action

Human approval before risky tool calls

Open deck
append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

human-in-the-loop
์ž๋™ํ™” ์ค‘๊ฐ„์— ์‚ฌ๋žŒ์ด ์Šน์ธ/ํŒ๋‹จํ•˜๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์‚ฌ๋žŒ์ด ๋ฃจํ”„ ์•ˆ์— ์žˆ๋Š”

๋‰˜์•™์Šค: ๊ณ ์œ„ํ—˜ ํ–‰๋™์—์„œ ์•ˆ์ „์žฅ์น˜๋กœ ์“ด๋‹ค.

High-risk actions require human-in-the-loop approval.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

ai:agent-state

Agent State

Task state carried through the agent loop

Open deck
serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

working memory
์ง€๊ธˆ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด๋‚˜ ์‚ฌ๋žŒ์ด ์‹ค์ œ๋กœ ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ •๋ณด.
term

์ง์—ญ: ์ž‘์—… ๊ธฐ์–ต

๋‰˜์•™์Šค: LLM context window๋ฅผ ์„ค๋ช…ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The context window is the model's working memory.

ai:stopping-condition

Stopping Condition

When the agent decides to stop

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stopping condition
agent loop๊ฐ€ ์–ธ์ œ ๋ฉˆ์ถฐ์•ผ ํ•˜๋Š”์ง€ ์ •ํ•œ ์กฐ๊ฑด.
term

์ง์—ญ: ์ •์ง€ ์กฐ๊ฑด

๋‰˜์•™์Šค: ๋ฌดํ•œ ๋ฃจํ”„์™€ ๋น„์šฉ ํญ์ฃผ๋ฅผ ๋ง‰๋Š”๋‹ค.

Every agent needs a clear stopping condition.

token budget
์ž…๋ ฅ, ํžˆ์Šคํ† ๋ฆฌ, ์ถœ๋ ฅ์— ์“ธ ์ˆ˜ ์žˆ๋Š” ์ด ํ† ํฐ ํ•œ๋„.
term

์ง์—ญ: ํ† ํฐ ์˜ˆ์‚ฐ

๋‰˜์•™์Šค: ๋ˆ๊ณผ ์ง€์—ฐ์‹œ๊ฐ„, context overflow๋ฅผ ๋™์‹œ์— ์•”์‹œํ•œ๋‹ค.

I trim low-value text first because token budget is limited.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

ai:retry-policy

Retry Policy

How failures get retried

Open deck
exponential backoff
์žฌ์‹œ๋„ ๊ฐ„๊ฒฉ์„ 1์ดˆ, 2์ดˆ, 4์ดˆ์ฒ˜๋Ÿผ ์ ์  ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ง€์ˆ˜ ๋ฐฑ์˜คํ”„

๋‰˜์•™์Šค: ์ฃฝ์–ด๊ฐ€๋Š” ์˜์กด์„ฑ์— ๋ถ€ํ•˜๋ฅผ ๋”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์“ด๋‹ค.

Retries use exponential backoff.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

ai:fallback-escalation

Fallback / Escalation

Next path when the best one fails

Open deck
fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

verifier
๊ฒฐ๊ณผ๊ฐ€ ๊ทœ์น™, ํ…Œ์ŠคํŠธ, ๊ทผ๊ฑฐ๋ฅผ ๋งŒ์กฑํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๊ฒ€์ฆ๊ธฐ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ๋ง์„ ๋‹ค์‹œ ๋ชจ๋ธ/๊ทœ์น™/ํ…Œ์ŠคํŠธ๋กœ ํ™•์ธํ•œ๋‹ค.

The verifier rejects unsupported claims.

ai:session-state

Session State

Current state of a conversation or session

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

ai:shared-artifact

Shared Artifact

One object multiple agents work on

Open deck
compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

optimistic lock
์ถฉ๋Œ์ด ๋“œ๋ฌผ๋‹ค๊ณ  ๋ณด๊ณ  version check๋กœ ์ถฉ๋Œ ์‹œ ์‹คํŒจ์‹œํ‚ค๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‚™๊ด€์  ๋ฝ

๋‰˜์•™์Šค: hot row์—์„œ๋Š” retry storm์ด ๋‚  ์ˆ˜ ์žˆ๋‹ค.

Optimistic locking rejects stale writes.

shared artifact
์—ฌ๋Ÿฌ agent๊ฐ€ ๊ฐ™์€ ๋ฒ„์ „์œผ๋กœ ์ฝ๊ณ  ์ˆ˜์ •ํ•˜๋Š” ๋Œ€์ƒ๋ฌผ.
term

์ง์—ญ: ๊ณต์œ  ์‚ฐ์ถœ๋ฌผ

๋‰˜์•™์Šค: PR diff, ๋ฌธ์„œ, invoice batch ๊ฐ™์€ ๊ฒƒ.

All agents inspect the same shared artifact.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

ai:parallel-verifiers

Parallel Verifiers

Checking with multiple independent criteria at once

Open deck
happy path
๋ชจ๋“  ๊ฒƒ์ด ์ •์ƒ์ ์œผ๋กœ ๋˜๋Š” ๊ธฐ๋ณธ ์„ฑ๊ณต ํ๋ฆ„.
term

์ง์—ญ: ํ–‰๋ณตํ•œ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: ์‹ค๋ฌด ๊ณ ์ • ํ‘œํ˜„. success path๋ณด๋‹ค ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

The happy path works, but retries break it.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

judge
์ถœ๋ ฅ ํ’ˆ์งˆ์„ rubric์œผ๋กœ ํ‰๊ฐ€ํ•˜๋Š” ๋ชจ๋ธ/๋กœ์ง.
term

์ง์—ญ: ์ฑ„์ ์ž

๋‰˜์•™์Šค: LLM-as-judge๋Š” ๋ณด์กฐ ์‹ ํ˜ธ์ด์ง€ ์ ˆ๋Œ€ ์ง„์‹ค์ด ์•„๋‹ˆ๋‹ค.

A judge scores clarity and groundedness.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

verifier
๊ฒฐ๊ณผ๊ฐ€ ๊ทœ์น™, ํ…Œ์ŠคํŠธ, ๊ทผ๊ฑฐ๋ฅผ ๋งŒ์กฑํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๊ฒ€์ฆ๊ธฐ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ๋ง์„ ๋‹ค์‹œ ๋ชจ๋ธ/๊ทœ์น™/ํ…Œ์ŠคํŠธ๋กœ ํ™•์ธํ•œ๋‹ค.

The verifier rejects unsupported claims.

ai:eval-dataset

Eval Dataset

Measuring AI behavior reproducibly

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

edge case
๋ณดํ†ต ํ๋ฆ„์ด ์•„๋‹Œ ๊ฒฝ๊ณ„/์˜ˆ์™ธ ์ƒํ™ฉ.
term

์ง์—ญ: ๊ฐ€์žฅ์ž๋ฆฌ ๊ฒฝ์šฐ

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ๋Š” happy path์™€ ๋Œ€๋น„ํ•ด์„œ ๋งํ•œ๋‹ค.

I would test the timeout edge case separately.

eval set
๋ชจ๋ธ/ํ”„๋กฌํ”„ํŠธ ๋ณ€๊ฒฝ์ด ์ข‹์•„์กŒ๋Š”์ง€ ์ธก์ •ํ•˜๋Š” ๊ณ ์ • ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ๋ฌถ์Œ.
term

์ง์—ญ: ํ‰๊ฐ€ ์„ธํŠธ

๋‰˜์•™์Šค: ๊ฐ์ด ์•„๋‹ˆ๋ผ regression์„ ์žก๋Š” ๊ธฐ์ค€.

I run the prompt against an eval set.

regression
๊ธฐ์กด์— ๋˜๋˜ ๊ฒƒ์ด ๋ณ€๊ฒฝ ํ›„ ๊นจ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํšŒ๊ท€/ํ‡ดํ–‰

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ’ˆ์งˆ, ์ฝ”๋“œ, prompt ๋ชจ๋‘์— ์“ด๋‹ค.

The eval catches a regression in citation quality.

ai:golden-set

Golden Set

The must-never-miss representative cases

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

eval set
๋ชจ๋ธ/ํ”„๋กฌํ”„ํŠธ ๋ณ€๊ฒฝ์ด ์ข‹์•„์กŒ๋Š”์ง€ ์ธก์ •ํ•˜๋Š” ๊ณ ์ • ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ๋ฌถ์Œ.
term

์ง์—ญ: ํ‰๊ฐ€ ์„ธํŠธ

๋‰˜์•™์Šค: ๊ฐ์ด ์•„๋‹ˆ๋ผ regression์„ ์žก๋Š” ๊ธฐ์ค€.

I run the prompt against an eval set.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

regression
๊ธฐ์กด์— ๋˜๋˜ ๊ฒƒ์ด ๋ณ€๊ฒฝ ํ›„ ๊นจ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํšŒ๊ท€/ํ‡ดํ–‰

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ’ˆ์งˆ, ์ฝ”๋“œ, prompt ๋ชจ๋‘์— ์“ด๋‹ค.

The eval catches a regression in citation quality.

ai:precision-recall

Precision / Recall

Trading off false positives against missed issues

Open deck
in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

ai:prompt-injection

Prompt Injection

External text hijacking the agent's instructions

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

prompt injection
์™ธ๋ถ€ ์ž…๋ ฅ์ด ๋ชจ๋ธ ์ง€์‹œ๋ฅผ ํƒˆ์ทจํ•˜๋ ค๋Š” ๊ณต๊ฒฉ.
term

์ง์—ญ: ํ”„๋กฌํ”„ํŠธ ์ฃผ์ž…

๋‰˜์•™์Šค: RAG ๋ฌธ์„œ๋‚˜ ์›นํŽ˜์ด์ง€๊ฐ€ ์ˆจ์€ ๋ช…๋ น์„ ๋„ฃ๋Š” ๊ฒฝ์šฐ.

Tool use must defend against prompt injection.

ai:data-exfiltration

Data Exfiltration

The agent leaking sensitive data out

Open deck
embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

ai:least-privilege

Least Privilege

Giving the agent only the access it needs

Open deck
blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

by design
์šฐ์—ฐ์ด ์•„๋‹ˆ๋ผ ์˜๋„์ ์œผ๋กœ ๊ทธ๋ ‡๊ฒŒ ๋งŒ๋“  ๊ฒƒ.
phrase

์ง์—ญ: ์„ค๊ณ„์ƒ

๋‰˜์•™์Šค: ๊ฒฐํ•จ์ด ์•„๋‹ˆ๋ผ ์˜๋„๋œ trade-off์ž„์„ ๋งํ•  ๋•Œ ์œ ์šฉ.

The feed is eventually consistent by design.

least privilege
ํ•„์š”ํ•œ ๊ถŒํ•œ๋งŒ ์ฃผ๋Š” ๋ณด์•ˆ ์›์น™.
term

์ง์—ญ: ์ตœ์†Œ ๊ถŒํ•œ

๋‰˜์•™์Šค: AI tool, IAM, service account ๋ชจ๋‘์— ์ ์šฉ.

The agent runs with least privilege.

ai:pii-secret-handling

PII / Secret Handling

Controlling how sensitive data is collected, stored, and exposed

Open deck
context window
ํ•œ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ตœ๋Œ€ ํ† ํฐ ๋ฒ”์œ„.
term

์ง์—ญ: ๋ฌธ๋งฅ ์ฐฝ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ์žฅ๊ธฐ๊ธฐ์–ต์ด ์•„๋‹ˆ๋ผ ๊ทธ ์ˆœ๊ฐ„์˜ ์ž‘์—… ๊ณต๊ฐ„์ด๋‹ค.

Older turns fall out of the context window.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

ai:cost-budget

Cost Budget

Keeping token, tool, and retry costs in check

Open deck
fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

on top of that
์ถ”๊ฐ€ ๊ทผ๊ฑฐ๋‚˜ ์กฐ๊ฑด์„ ๋ง๋ถ™์ผ ๋•Œ ์“ฐ๋Š” ์—ฐ๊ฒฐ ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ทธ ์œ„์— ์ถ”๊ฐ€๋กœ

๋‰˜์•™์Šค: also๋ณด๋‹ค ๋” ๋งํ•˜๋Š” ํ๋ฆ„์ด ์ข‹๋‹ค.

On top of that, I would add citation checks.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

ai:latency-budget

Latency Budget

Designing within the time a user is willing to wait

Open deck
embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

tail latency
ํ‰๊ท  ๋’ค์— ์ˆจ์–ด ์žˆ๋Š” ๋А๋ฆฐ ์š”์ฒญ๋“ค์˜ ์ง€์—ฐ.
term

์ง์—ญ: ๊ผฌ๋ฆฌ ์ง€์—ฐ

๋‰˜์•™์Šค: p95/p99๋กœ ๋ณธ๋‹ค.

Tail latency dominates user experience.

vector store
embedding vector๋ฅผ ์ €์žฅํ•˜๊ณ  ์œ ์‚ฌ๋„ ๊ฒ€์ƒ‰ํ•˜๋Š” DB/์ธ๋ฑ์Šค.
term

์ง์—ญ: ๋ฒกํ„ฐ ์ €์žฅ์†Œ

๋‰˜์•™์Šค: Pinecone, pgvector, FAISS ๊ฐ™์€ ๊ฒƒ.

The vector store retrieves candidate chunks.

ai:rate-limit

Rate Limit

Preventing abuse and runaway cost

Open deck
fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

ai:canary-rollout

Canary Rollout

Shipping a new prompt, model, or agent to a slice of traffic first

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

ai:drift-monitoring

Drift Monitoring

Watching for quality changes over time

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

eval set
๋ชจ๋ธ/ํ”„๋กฌํ”„ํŠธ ๋ณ€๊ฒฝ์ด ์ข‹์•„์กŒ๋Š”์ง€ ์ธก์ •ํ•˜๋Š” ๊ณ ์ • ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ๋ฌถ์Œ.
term

์ง์—ญ: ํ‰๊ฐ€ ์„ธํŠธ

๋‰˜์•™์Šค: ๊ฐ์ด ์•„๋‹ˆ๋ผ regression์„ ์žก๋Š” ๊ธฐ์ค€.

I run the prompt against an eval set.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

fall out
context๋‚˜ cache ๋ฒ”์œ„์—์„œ ๋น ์ ธ์„œ ๋” ์ด์ƒ ๋ณด์ด์ง€ ์•Š๊ฒŒ ๋˜๋‹ค.
verb

์ง์—ญ: ๋ฐ–์œผ๋กœ ๋–จ์–ด์ง€๋‹ค

๋‰˜์•™์Šค: LLM history, cache, sliding window์—์„œ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์“ด๋‹ค.

Old messages fall out of the context window.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

regression
๊ธฐ์กด์— ๋˜๋˜ ๊ฒƒ์ด ๋ณ€๊ฒฝ ํ›„ ๊นจ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํšŒ๊ท€/ํ‡ดํ–‰

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ’ˆ์งˆ, ์ฝ”๋“œ, prompt ๋ชจ๋‘์— ์“ด๋‹ค.

The eval catches a regression in citation quality.

ai:vector-indexing

Vector Indexing (HNSW / IVF / pgvector)

Brute-force kNN over millions of embeddings is too slow โ€” ANN indexes trade recall against latency and memory

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

index scan
ํ…Œ์ด๋ธ” ์ „์ฒด๊ฐ€ ์•„๋‹ˆ๋ผ ์ธ๋ฑ์Šค๋ฅผ ํƒ€๊ณ  ์ฐพ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ธ๋ฑ์Šค ์Šค์บ”

๋‰˜์•™์Šค: ํ•ญ์ƒ ์ข‹์€ ๊ฒƒ์€ ์•„๋‹ˆ๊ณ  ์„ ํƒ๋„๊ฐ€ ์ค‘์š”ํ•˜๋‹ค.

The query switches from seq scan to index scan.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

semantic search
๊ฐ™์€ ๋‹จ์–ด๊ฐ€ ์—†์–ด๋„ ์˜๋ฏธ๊ฐ€ ๊ฐ€๊นŒ์šด ๋ฌธ์„œ๋ฅผ ์ฐพ๋Š” ๊ฒ€์ƒ‰.
term

์ง์—ญ: ์˜๋ฏธ ๊ฒ€์ƒ‰

๋‰˜์•™์Šค: ID, error code, rare token์€ BM25๊ฐ€ ๋” ๊ฐ•ํ•  ๋•Œ๊ฐ€ ์žˆ๋‹ค.

Embeddings power semantic search.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

ai:eval-metrics

Eval metrics: retrieval (recall@k, MRR, nDCG) vs generation (faithfulness, answer relevance, exact match)

Score the retrieval stage and the generation stage with separate metrics

Open deck
context window
ํ•œ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ตœ๋Œ€ ํ† ํฐ ๋ฒ”์œ„.
term

์ง์—ญ: ๋ฌธ๋งฅ ์ฐฝ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ์žฅ๊ธฐ๊ธฐ์–ต์ด ์•„๋‹ˆ๋ผ ๊ทธ ์ˆœ๊ฐ„์˜ ์ž‘์—… ๊ณต๊ฐ„์ด๋‹ค.

Older turns fall out of the context window.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

hallucination
๋ชจ๋ธ์ด ๊ทผ๊ฑฐ ์—†๋Š” ๋‚ด์šฉ์„ ๊ทธ๋Ÿด๋“ฏํ•˜๊ฒŒ ๋งํ•˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ™˜๊ฐ

๋‰˜์•™์Šค: ํ‹€๋ฆฐ๋ฐ ์œ ์ฐฝํ•ด์„œ ์œ„ํ—˜ํ•˜๋‹ค.

Grounding reduces hallucination but does not remove it.

reranker
๊ฒ€์ƒ‰ ํ›„๋ณด๋ฅผ ๋‹ค์‹œ ์ฝ๊ณ  ๋” ์ •ํ™•ํ•œ ์ˆœ์„œ๋กœ ์žฌ์ •๋ ฌํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์žฌ์ˆœ์œ„ ๋ชจ๋ธ

๋‰˜์•™์Šค: top-k retrieval ๋’ค ํ’ˆ์งˆ์„ ์˜ฌ๋ฆฌ๋Š” ๋‹จ๊ณ„.

A reranker improves the top five chunks.

ai:online-eval-production-feedback

Online Eval & Production Feedback

Measuring quality on live traffic to decide what ships

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

on top of that
์ถ”๊ฐ€ ๊ทผ๊ฑฐ๋‚˜ ์กฐ๊ฑด์„ ๋ง๋ถ™์ผ ๋•Œ ์“ฐ๋Š” ์—ฐ๊ฒฐ ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ทธ ์œ„์— ์ถ”๊ฐ€๋กœ

๋‰˜์•™์Šค: also๋ณด๋‹ค ๋” ๋งํ•˜๋Š” ํ๋ฆ„์ด ์ข‹๋‹ค.

On top of that, I would add citation checks.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

read path
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์„ ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์ฝ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: write path์™€ ๋‚˜๋ˆ ์„œ ์„ค๊ณ„ ์„ค๋ช…ํ•œ๋‹ค.

The read path hits Redis first.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

ai:caching-2

Caching: prompt/prefix caching, semantic caching, and embedding caching

Three caching layers โ€” prefix (exact match), semantic (meaning match), embedding (vector reuse) โ€” to cut cost and latency

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

vector store
embedding vector๋ฅผ ์ €์žฅํ•˜๊ณ  ์œ ์‚ฌ๋„ ๊ฒ€์ƒ‰ํ•˜๋Š” DB/์ธ๋ฑ์Šค.
term

์ง์—ญ: ๋ฒกํ„ฐ ์ €์žฅ์†Œ

๋‰˜์•™์Šค: Pinecone, pgvector, FAISS ๊ฐ™์€ ๊ฒƒ.

The vector store retrieves candidate chunks.

ai:fine-tuning-vs-rag-vs-prompting

Fine-tuning vs RAG vs prompting: when each is the right tool, and LoRA/PEFT basics

These three solve different problems: RAG for missing knowledge, fine-tuning for missing behavior/format, prompting first for everything else.

Open deck
adapter
์™ธ๋ถ€ API๋‚˜ ๊ตฌํ˜„ ์ฐจ์ด๋ฅผ ๋‚ด๋ถ€ ๊ณ„์•ฝ์— ๋งž์ถฐ ๊ฐ์‹ธ๋Š” ๋ ˆ์ด์–ด.
term

์ง์—ญ: ์–ด๋Œ‘ํ„ฐ

๋‰˜์•™์Šค: ๊ต์ฒด ๊ฐ€๋Šฅ์„ฑ๊ณผ testability๋ฅผ ์–ป๋Š”๋‹ค.

The payment adapter hides provider-specific APIs.

chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

few-shot
ํ”„๋กฌํ”„ํŠธ ์•ˆ์— ๋ช‡ ๊ฐœ ์˜ˆ์‹œ๋ฅผ ๋„ฃ์–ด ํŒจํ„ด์„ ๋ณด์—ฌ์ฃผ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋ช‡ ๊ฐœ ์˜ˆ์‹œ๋ฅผ ์ฃผ๋Š”

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ•™์Šต์ด ์•„๋‹ˆ๋ผ context ์•ˆ ์‹œ์—ฐ์ด๋‹ค.

Few-shot prompting teaches the expected shape.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

sequential scan
ํ…Œ์ด๋ธ”์„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ฝ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ˆœ์ฐจ ์Šค์บ”

๋‰˜์•™์Šค: ์ž‘์€ ํ…Œ์ด๋ธ”์—์„œ๋Š” ๊ดœ์ฐฎ์ง€๋งŒ ํฐ ํ…Œ์ด๋ธ”์—์„œ ์œ„ํ—˜.

EXPLAIN showed a sequential scan over ten million rows.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

structured output
JSON schema ๊ฐ™์€ ํ˜•์‹์— ๋งž์ถ˜ ๊ธฐ๊ณ„๊ฐ€ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ์ถœ๋ ฅ.
term

์ง์—ญ: ๊ตฌ์กฐํ™” ์ถœ๋ ฅ

๋‰˜์•™์Šค: ํ”„๋กฌํ”„ํŠธ๋งŒ์œผ๋กœ๋Š” ํ˜•์‹ ๊ฒฐ์ •์„ฑ์ด ์•ฝํ•˜๋‹ค.

Structured output makes the answer parseable.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

ai:guardrails

Guardrails: input/output filtering, allow/deny lists, schema validation, human-in-the-loop

Don't trust the model โ€” enforce deterministic checks at the input, the output, and just before any action

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

human-in-the-loop
์ž๋™ํ™” ์ค‘๊ฐ„์— ์‚ฌ๋žŒ์ด ์Šน์ธ/ํŒ๋‹จํ•˜๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์‚ฌ๋žŒ์ด ๋ฃจํ”„ ์•ˆ์— ์žˆ๋Š”

๋‰˜์•™์Šค: ๊ณ ์œ„ํ—˜ ํ–‰๋™์—์„œ ์•ˆ์ „์žฅ์น˜๋กœ ์“ด๋‹ค.

High-risk actions require human-in-the-loop approval.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

prompt injection
์™ธ๋ถ€ ์ž…๋ ฅ์ด ๋ชจ๋ธ ์ง€์‹œ๋ฅผ ํƒˆ์ทจํ•˜๋ ค๋Š” ๊ณต๊ฒฉ.
term

์ง์—ญ: ํ”„๋กฌํ”„ํŠธ ์ฃผ์ž…

๋‰˜์•™์Šค: RAG ๋ฌธ์„œ๋‚˜ ์›นํŽ˜์ด์ง€๊ฐ€ ์ˆจ์€ ๋ช…๋ น์„ ๋„ฃ๋Š” ๊ฒฝ์šฐ.

Tool use must defend against prompt injection.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

ai:text-to-sql-nl-to-query-over-a-relationa

Text-to-SQL: Schema Grounding, Validation, Read-Only Roles

Turn natural language into SQL, but ground it in schema, validate it, and cage it behind a read-only role

Open deck
context window
ํ•œ ์š”์ฒญ์—์„œ ๋ชจ๋ธ์ด ๋ณผ ์ˆ˜ ์žˆ๋Š” ์ตœ๋Œ€ ํ† ํฐ ๋ฒ”์œ„.
term

์ง์—ญ: ๋ฌธ๋งฅ ์ฐฝ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ์žฅ๊ธฐ๊ธฐ์–ต์ด ์•„๋‹ˆ๋ผ ๊ทธ ์ˆœ๊ฐ„์˜ ์ž‘์—… ๊ณต๊ฐ„์ด๋‹ค.

Older turns fall out of the context window.

last line of defense
์•ž๋‹จ ์ฝ”๋“œ๊ฐ€ ์ƒˆ๋„ ์ตœ์ข…์ ์œผ๋กœ ๋ง‰์•„์ฃผ๋Š” ๋ฐฉ์–ด ์žฅ์น˜.
phrase

์ง์—ญ: ๋งˆ์ง€๋ง‰ ๋ฐฉ์–ด์„ 

๋‰˜์•™์Šค: DB constraint, approval gate, type system ๊ฐ™์€ ๊ฒƒ์„ ์„ค๋ช…ํ•  ๋•Œ ์“ด๋‹ค.

The unique index is the last line of defense.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

prompt injection
์™ธ๋ถ€ ์ž…๋ ฅ์ด ๋ชจ๋ธ ์ง€์‹œ๋ฅผ ํƒˆ์ทจํ•˜๋ ค๋Š” ๊ณต๊ฒฉ.
term

์ง์—ญ: ํ”„๋กฌํ”„ํŠธ ์ฃผ์ž…

๋‰˜์•™์Šค: RAG ๋ฌธ์„œ๋‚˜ ์›นํŽ˜์ด์ง€๊ฐ€ ์ˆจ์€ ๋ช…๋ น์„ ๋„ฃ๋Š” ๊ฒฝ์šฐ.

Tool use must defend against prompt injection.

ai:streaming-responses-and-partial-result-u

Streaming responses (SSE/token streaming) and partial-result UX/backend handling

Push partial results over SSE instead of waiting for the whole answer

Open deck
chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

happy path
๋ชจ๋“  ๊ฒƒ์ด ์ •์ƒ์ ์œผ๋กœ ๋˜๋Š” ๊ธฐ๋ณธ ์„ฑ๊ณต ํ๋ฆ„.
term

์ง์—ญ: ํ–‰๋ณตํ•œ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: ์‹ค๋ฌด ๊ณ ์ • ํ‘œํ˜„. success path๋ณด๋‹ค ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

The happy path works, but retries break it.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

concept:latency

Latency

Time to finish a single request

Open deck
fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

headroom
ํ˜„์žฌ ๋ถ€ํ•˜ ์œ„์— ๋‚จ๊ฒจ๋‘” ์•ˆ์ „ ์—ฌ์œ .
term

์ง์—ญ: ์—ฌ์œ  ์šฉ๋Ÿ‰

๋‰˜์•™์Šค: 100% utilization๊นŒ์ง€ ์“ฐ๋ฉด ์žฅ์• ์— ์ทจ์•ฝํ•˜๋‹ค.

We keep headroom for traffic spikes.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

saturation
CPU, pool, queue ๋“ฑ์ด ํ•œ๊ณ„์— ๊ฐ€๊นŒ์›Œ์ง„ ์ƒํƒœ.
term

์ง์—ญ: ํฌํ™”

๋‰˜์•™์Šค: ํฌํ™” ๊ทผ์ฒ˜์—์„œ latency๊ฐ€ ๊ธ‰๊ฒฉํžˆ ์˜ค๋ฅธ๋‹ค.

Latency spikes near saturation.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

tail latency
ํ‰๊ท  ๋’ค์— ์ˆจ์–ด ์žˆ๋Š” ๋А๋ฆฐ ์š”์ฒญ๋“ค์˜ ์ง€์—ฐ.
term

์ง์—ญ: ๊ผฌ๋ฆฌ ์ง€์—ฐ

๋‰˜์•™์Šค: p95/p99๋กœ ๋ณธ๋‹ค.

Tail latency dominates user experience.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:throughput

Throughput

How much you process per unit of time

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

SLO
ํŒ€ ๋‚ด๋ถ€ ์‹ ๋ขฐ์„ฑ ๋ชฉํ‘œ.
term

์ง์—ญ: ์„œ๋น„์Šค ๋ชฉํ‘œ

๋‰˜์•™์Šค: SLA๋Š” ์™ธ๋ถ€ ๊ณ„์•ฝ, SLI๋Š” ์ธก์ • ์ง€ํ‘œ.

The SLO defines the latency target.

tail latency
ํ‰๊ท  ๋’ค์— ์ˆจ์–ด ์žˆ๋Š” ๋А๋ฆฐ ์š”์ฒญ๋“ค์˜ ์ง€์—ฐ.
term

์ง์—ญ: ๊ผฌ๋ฆฌ ์ง€์—ฐ

๋‰˜์•™์Šค: p95/p99๋กœ ๋ณธ๋‹ค.

Tail latency dominates user experience.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:p99

p50 / p95 / p99

The metric that surfaces the slow requests the average hides

Open deck
cache miss
์บ์‹œ์— ์—†์–ด ์›๋ณธ ์ €์žฅ์†Œ๋กœ ๊ฐ€์•ผ ํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์บ์‹œ ๋ฏธ์Šค

๋‰˜์•™์Šค: miss๊ฐ€ ๋ชฐ๋ฆฌ๋ฉด DB๊ฐ€ ํ„ฐ์ง„๋‹ค.

Cache misses spike after TTL expiry.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

lock contention
์—ฌ๋Ÿฌ ์š”์ฒญ์ด ๊ฐ™์€ lock์„ ๊ธฐ๋‹ค๋ฆฌ๋ฉฐ ์ง€์—ฐ๋˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋ฝ ๊ฒฝํ•ฉ

๋‰˜์•™์Šค: p99 spike์˜ ํ”ํ•œ ์›์ธ.

Lock contention pushed p99 above the SLO.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

regression
๊ธฐ์กด์— ๋˜๋˜ ๊ฒƒ์ด ๋ณ€๊ฒฝ ํ›„ ๊นจ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํšŒ๊ท€/ํ‡ดํ–‰

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ’ˆ์งˆ, ์ฝ”๋“œ, prompt ๋ชจ๋‘์— ์“ด๋‹ค.

The eval catches a regression in citation quality.

concept:slo-sli-sla

SLI / SLO / SLA

Putting numbers on the reliability you promise

Open deck
error budget
SLO ์•ˆ์—์„œ ํ—ˆ์šฉ๋˜๋Š” ์‹คํŒจ๋Ÿ‰.
term

์ง์—ญ: ์—๋Ÿฌ ์˜ˆ์‚ฐ

๋‰˜์•™์Šค: ๋ฐฐํฌ ์†๋„์™€ ์•ˆ์ •ํ™” ์ž‘์—…์„ ์กฐ์ ˆํ•˜๋Š” ๊ธฐ์ค€.

If we burn the error budget, we stop risky launches.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

load balancer
์š”์ฒญ์„ ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๋‚˜๋ˆ  ๋ณด๋‚ด๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ถ„์‚ฐ๊ธฐ

๋‰˜์•™์Šค: LB๋Š” scale๊ณผ availability์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์–ด.

The load balancer routes traffic to healthy instances.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

SLO
ํŒ€ ๋‚ด๋ถ€ ์‹ ๋ขฐ์„ฑ ๋ชฉํ‘œ.
term

์ง์—ญ: ์„œ๋น„์Šค ๋ชฉํ‘œ

๋‰˜์•™์Šค: SLA๋Š” ์™ธ๋ถ€ ๊ณ„์•ฝ, SLI๋Š” ์ธก์ • ์ง€ํ‘œ.

The SLO defines the latency target.

concept:availability

Availability

The fraction of time users can actually succeed

Open deck
error budget
SLO ์•ˆ์—์„œ ํ—ˆ์šฉ๋˜๋Š” ์‹คํŒจ๋Ÿ‰.
term

์ง์—ญ: ์—๋Ÿฌ ์˜ˆ์‚ฐ

๋‰˜์•™์Šค: ๋ฐฐํฌ ์†๋„์™€ ์•ˆ์ •ํ™” ์ž‘์—…์„ ์กฐ์ ˆํ•˜๋Š” ๊ธฐ์ค€.

If we burn the error budget, we stop risky launches.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:rate-limiting

Rate Limiting

Capping excessive traffic to protect the system

Open deck
exponential backoff
์žฌ์‹œ๋„ ๊ฐ„๊ฒฉ์„ 1์ดˆ, 2์ดˆ, 4์ดˆ์ฒ˜๋Ÿผ ์ ์  ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ง€์ˆ˜ ๋ฐฑ์˜คํ”„

๋‰˜์•™์Šค: ์ฃฝ์–ด๊ฐ€๋Š” ์˜์กด์„ฑ์— ๋ถ€ํ•˜๋ฅผ ๋”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์“ด๋‹ค.

Retries use exponential backoff.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

concept:load-balancer

Load Balancer

Spreading traffic across multiple instances

Open deck
connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

load balancer
์š”์ฒญ์„ ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๋‚˜๋ˆ  ๋ณด๋‚ด๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ถ„์‚ฐ๊ธฐ

๋‰˜์•™์Šค: LB๋Š” scale๊ณผ availability์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์–ด.

The load balancer routes traffic to healthy instances.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:caching

Caching

Storing expensive read results close by

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

cache invalidation
์›๋ณธ ๋ณ€๊ฒฝ ํ›„ ๋‚ก์€ ์บ์‹œ๋ฅผ ์ง€์šฐ๊ฑฐ๋‚˜ ๊ฐฑ์‹ ํ•˜๋Š” ์ผ.
term

์ง์—ญ: ์บ์‹œ ๋ฌดํšจํ™”

๋‰˜์•™์Šค: cache์˜ ๊ฐ€์žฅ ์–ด๋ ค์šด ์šด์˜ ๋ฌธ์ œ.

The hard part is cache invalidation.

cache miss
์บ์‹œ์— ์—†์–ด ์›๋ณธ ์ €์žฅ์†Œ๋กœ ๊ฐ€์•ผ ํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์บ์‹œ ๋ฏธ์Šค

๋‰˜์•™์Šค: miss๊ฐ€ ๋ชฐ๋ฆฌ๋ฉด DB๊ฐ€ ํ„ฐ์ง„๋‹ค.

Cache misses spike after TTL expiry.

cache stampede
์บ์‹œ๊ฐ€ ๋™์‹œ์— ๋งŒ๋ฃŒ๋˜์–ด ๋งŽ์€ ์š”์ฒญ์ด ํ•œ๊บผ๋ฒˆ์— DB๋กœ ๋ชฐ๋ฆฌ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์บ์‹œ ๋–ผ๋ชฐ๋ฆผ

๋‰˜์•™์Šค: single-flight, lock, jitter TTL๋กœ ๋ง‰๋Š”๋‹ค.

Single-flight prevents a cache stampede.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:cache-stampede

Cache Stampede

A wave of simultaneous misses slamming the DB

Open deck
cache stampede
์บ์‹œ๊ฐ€ ๋™์‹œ์— ๋งŒ๋ฃŒ๋˜์–ด ๋งŽ์€ ์š”์ฒญ์ด ํ•œ๊บผ๋ฒˆ์— DB๋กœ ๋ชฐ๋ฆฌ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์บ์‹œ ๋–ผ๋ชฐ๋ฆผ

๋‰˜์•™์Šค: single-flight, lock, jitter TTL๋กœ ๋ง‰๋Š”๋‹ค.

Single-flight prevents a cache stampede.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

hot key
์š”์ฒญ์ด ํ•œ ํ‚ค/ํŒŒํ‹ฐ์…˜์— ๊ณผ๋„ํ•˜๊ฒŒ ๋ชฐ๋ฆฌ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋œจ๊ฑฐ์šด ํ‚ค

๋‰˜์•™์Šค: cache, Redis, Kafka, DynamoDB์—์„œ ์ž์ฃผ ๋ฌธ์ œ ๋œ๋‹ค.

A viral listing becomes a hot key.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

single-flight
๊ฐ™์€ key miss์— ๋Œ€ํ•ด ํ•œ ์š”์ฒญ๋งŒ ์›๋ณธ์„ ์ฑ„์šฐ๊ณ  ๋‚˜๋จธ์ง€๋Š” ๊ธฐ๋‹ค๋ฆฌ๊ฒŒ ํ•˜๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‹จ์ผ ๋น„ํ–‰

๋‰˜์•™์Šค: cache stampede ๋ฐฉ์–ด ํ‘œํ˜„.

Only one request fills the cache through single-flight.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

concept:backpressure

Backpressure

Pushing back or slowing input you can't keep up with

Open deck
backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

exponential backoff
์žฌ์‹œ๋„ ๊ฐ„๊ฒฉ์„ 1์ดˆ, 2์ดˆ, 4์ดˆ์ฒ˜๋Ÿผ ์ ์  ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ง€์ˆ˜ ๋ฐฑ์˜คํ”„

๋‰˜์•™์Šค: ์ฃฝ์–ด๊ฐ€๋Š” ์˜์กด์„ฑ์— ๋ถ€ํ•˜๋ฅผ ๋”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์“ด๋‹ค.

Retries use exponential backoff.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

retry storm
์‹คํŒจํ•œ ์š”์ฒญ๋“ค์ด ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋ฉฐ ์žฅ์• ๋ฅผ ํ‚ค์šฐ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์žฌ์‹œ๋„ ํญํ’

๋‰˜์•™์Šค: ์žฅ์•  ๋Œ€์‘์—์„œ ์ž์ฃผ ๋‚˜์˜ค๋Š” ํ‘œํ˜„.

A retry storm overloaded the dependency.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:timeout

Timeout

A time budget for cutting off calls that hang

Open deck
exponential backoff
์žฌ์‹œ๋„ ๊ฐ„๊ฒฉ์„ 1์ดˆ, 2์ดˆ, 4์ดˆ์ฒ˜๋Ÿผ ์ ์  ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ง€์ˆ˜ ๋ฐฑ์˜คํ”„

๋‰˜์•™์Šค: ์ฃฝ์–ด๊ฐ€๋Š” ์˜์กด์„ฑ์— ๋ถ€ํ•˜๋ฅผ ๋”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์“ด๋‹ค.

Retries use exponential backoff.

fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

headroom
ํ˜„์žฌ ๋ถ€ํ•˜ ์œ„์— ๋‚จ๊ฒจ๋‘” ์•ˆ์ „ ์—ฌ์œ .
term

์ง์—ญ: ์—ฌ์œ  ์šฉ๋Ÿ‰

๋‰˜์•™์Šค: 100% utilization๊นŒ์ง€ ์“ฐ๋ฉด ์žฅ์• ์— ์ทจ์•ฝํ•˜๋‹ค.

We keep headroom for traffic spikes.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

timeout budget
์ „์ฒด ์š”์ฒญ ์‹œ๊ฐ„ ์•ˆ์—์„œ ๊ฐ ํ•˜์œ„ ํ˜ธ์ถœ์— ๋ฐฐ์ •ํ•œ ์‹œ๊ฐ„.
term

์ง์—ญ: ํƒ€์ž„์•„์›ƒ ์˜ˆ์‚ฐ

๋‰˜์•™์Šค: ํ•˜์œ„ ํ˜ธ์ถœ timeout ํ•ฉ์ด ์‚ฌ์šฉ์ž SLO๋ฅผ ๋„˜์œผ๋ฉด ์•ˆ ๋œ๋‹ค.

The payment call gets 800ms of the timeout budget.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:retry

Retry

Re-attempting a transient failure

Open deck
exponential backoff
์žฌ์‹œ๋„ ๊ฐ„๊ฒฉ์„ 1์ดˆ, 2์ดˆ, 4์ดˆ์ฒ˜๋Ÿผ ์ ์  ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ง€์ˆ˜ ๋ฐฑ์˜คํ”„

๋‰˜์•™์Šค: ์ฃฝ์–ด๊ฐ€๋Š” ์˜์กด์„ฑ์— ๋ถ€ํ•˜๋ฅผ ๋”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์“ด๋‹ค.

Retries use exponential backoff.

fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

retry storm
์‹คํŒจํ•œ ์š”์ฒญ๋“ค์ด ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋ฉฐ ์žฅ์• ๋ฅผ ํ‚ค์šฐ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์žฌ์‹œ๋„ ํญํ’

๋‰˜์•™์Šค: ์žฅ์•  ๋Œ€์‘์—์„œ ์ž์ฃผ ๋‚˜์˜ค๋Š” ํ‘œํ˜„.

A retry storm overloaded the dependency.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

timeout budget
์ „์ฒด ์š”์ฒญ ์‹œ๊ฐ„ ์•ˆ์—์„œ ๊ฐ ํ•˜์œ„ ํ˜ธ์ถœ์— ๋ฐฐ์ •ํ•œ ์‹œ๊ฐ„.
term

์ง์—ญ: ํƒ€์ž„์•„์›ƒ ์˜ˆ์‚ฐ

๋‰˜์•™์Šค: ํ•˜์œ„ ํ˜ธ์ถœ timeout ํ•ฉ์ด ์‚ฌ์šฉ์ž SLO๋ฅผ ๋„˜์œผ๋ฉด ์•ˆ ๋œ๋‹ค.

The payment call gets 800ms of the timeout budget.

concept:circuit-breaker

Circuit Breaker

Briefly cutting off calls to a broken dependency

Open deck
circuit breaker
์˜์กด์„ฑ์ด ๊ณ„์† ์‹คํŒจํ•˜๋ฉด ํ˜ธ์ถœ์„ ์ž ์‹œ ๋ง‰๊ณ  ๋น ๋ฅด๊ฒŒ ์‹คํŒจ์‹œํ‚ค๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์ฐจ๋‹จ๊ธฐ

๋‰˜์•™์Šค: ์ง‘ ์ „๊ธฐ ์ฐจ๋‹จ๊ธฐ ๋น„์œ  ๊ทธ๋Œ€๋กœ๋‹ค.

The circuit breaker opens after repeated failures.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:idempotency

Idempotency

Sending the same request many times but it lands once

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

exactly-once
์ค‘๋ณต๋„ ์†์‹ค๋„ ์—†๊ฒŒ ๋ณด์ด๋„๋ก ๋งŒ๋“  ์ฒ˜๋ฆฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๋Œ€๊ฐœ ํ˜„์‹ค์—์„œ๋Š” ์ œํ•œ๋œ ๋ฒ”์œ„์˜ transaction/idempotency ์กฐํ•ฉ์ด๋‹ค.

Exactly-once is scoped, not magic.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

concept:eventual-consistency

Eventual Consistency

Diverges now, converges eventually

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

read path
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์„ ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์ฝ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: write path์™€ ๋‚˜๋ˆ ์„œ ์„ค๊ณ„ ์„ค๋ช…ํ•œ๋‹ค.

The read path hits Redis first.

read-your-writes
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐฉ๊ธˆ ์“ด ๊ฐ’์„ ๋ฐ”๋กœ ๋‹ค์‹œ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๋ณด์žฅ.
term

์ง์—ญ: ๋‚ด๊ฐ€ ์“ด ๊ฒƒ์€ ๋‚ด๊ฐ€ ์ฝ๋Š”๋‹ค

๋‰˜์•™์Šค: replica๋ฅผ ์ฝ์œผ๋ฉด ๊นจ์งˆ ์ˆ˜ ์žˆ๋‹ค.

Route the user to primary when read-your-writes matters.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

replication lag
primary์˜ ์ตœ์‹  ๋ณ€๊ฒฝ์ด replica์— ์•„์ง ๋„์ฐฉํ•˜์ง€ ์•Š์€ ์‹œ๊ฐ„์ฐจ.
term

์ง์—ญ: ๋ณต์ œ ์ง€์—ฐ

๋‰˜์•™์Šค: read-your-writes ๋ฌธ์ œ์™€ ์ง๊ฒฐ๋œ๋‹ค.

Replication lag can make a fresh write invisible.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:cap-theorem

CAP Theorem

Pick consistency or availability under a partition

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:sharding

Sharding / Partitioning

Split data across multiple partitions

Open deck
fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

hot key
์š”์ฒญ์ด ํ•œ ํ‚ค/ํŒŒํ‹ฐ์…˜์— ๊ณผ๋„ํ•˜๊ฒŒ ๋ชฐ๋ฆฌ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋œจ๊ฑฐ์šด ํ‚ค

๋‰˜์•™์Šค: cache, Redis, Kafka, DynamoDB์—์„œ ์ž์ฃผ ๋ฌธ์ œ ๋œ๋‹ค.

A viral listing becomes a hot key.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:replication

Replication

Copy the same data to multiple nodes

Open deck
fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

replication lag
primary์˜ ์ตœ์‹  ๋ณ€๊ฒฝ์ด replica์— ์•„์ง ๋„์ฐฉํ•˜์ง€ ์•Š์€ ์‹œ๊ฐ„์ฐจ.
term

์ง์—ญ: ๋ณต์ œ ์ง€์—ฐ

๋‰˜์•™์Šค: read-your-writes ๋ฌธ์ œ์™€ ์ง๊ฒฐ๋œ๋‹ค.

Replication lag can make a fresh write invisible.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:quorum

Quorum

Read and write with agreement from enough replicas

Open deck
eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

handoff
ํ•œ agent/์„œ๋น„์Šค/์‚ฌ๋žŒ์ด ๋‹ค๋ฅธ ์ฃผ์ฒด์—๊ฒŒ ์ž‘์—…์„ ๋„˜๊ธฐ๋Š” ์ง€์ .
term

์ง์—ญ: ์ธ๊ณ„

๋‰˜์•™์Šค: handoff์—์„œ context loss๊ฐ€ ์ž์ฃผ ์ƒ๊ธด๋‹ค.

The handoff includes the artifact and trace.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

judge
์ถœ๋ ฅ ํ’ˆ์งˆ์„ rubric์œผ๋กœ ํ‰๊ฐ€ํ•˜๋Š” ๋ชจ๋ธ/๋กœ์ง.
term

์ง์—ญ: ์ฑ„์ ์ž

๋‰˜์•™์Šค: LLM-as-judge๋Š” ๋ณด์กฐ ์‹ ํ˜ธ์ด์ง€ ์ ˆ๋Œ€ ์ง„์‹ค์ด ์•„๋‹ˆ๋‹ค.

A judge scores clarity and groundedness.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

read-your-writes
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐฉ๊ธˆ ์“ด ๊ฐ’์„ ๋ฐ”๋กœ ๋‹ค์‹œ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๋ณด์žฅ.
term

์ง์—ญ: ๋‚ด๊ฐ€ ์“ด ๊ฒƒ์€ ๋‚ด๊ฐ€ ์ฝ๋Š”๋‹ค

๋‰˜์•™์Šค: replica๋ฅผ ์ฝ์œผ๋ฉด ๊นจ์งˆ ์ˆ˜ ์žˆ๋‹ค.

Route the user to primary when read-your-writes matters.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

strong consistency
์ฝ๊ธฐ๊ฐ€ ํ•ญ์ƒ ์ตœ์‹  ์“ฐ๊ธฐ๋ฅผ ๋ฐ˜์˜ํ•˜๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ๊ฐ•ํ•œ ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: latency/availability ๋น„์šฉ์„ ๋‚ธ๋‹ค.

We choose strong consistency for account balances.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:transaction

Transaction / ACID

Group several DB operations into one logical unit

Open deck
deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

isolation level
๋™์‹œ ํŠธ๋žœ์žญ์…˜์ด ์„œ๋กœ๋ฅผ ์–ผ๋งˆ๋‚˜ ๋ณด๊ฒŒ ํ• ์ง€ ์ •ํ•œ DB ๊ทœ์น™.
term

์ง์—ญ: ๊ฒฉ๋ฆฌ ์ˆ˜์ค€

๋‰˜์•™์Šค: READ COMMITTED, REPEATABLE READ, SERIALIZABLE ๊ฐ™์€ ๊ฒƒ.

The isolation level controls which anomalies are possible.

not free
์ข‹์•„ ๋ณด์ด๋Š” ์„ ํƒ์—๋„ ๋น„์šฉ์ด ์žˆ๋‹ค๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ณต์งœ๊ฐ€ ์•„๋‹ˆ๋‹ค

๋‰˜์•™์Šค: ์งง๊ณ  ์ž์—ฐ์Šค๋Ÿฌ์šด trade-off ๋ฌธ์žฅ.

Caching is not free; it introduces staleness.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

concept:isolation-level

Isolation Level

How much concurrent transactions hide from each other

Open deck
isolation level
๋™์‹œ ํŠธ๋žœ์žญ์…˜์ด ์„œ๋กœ๋ฅผ ์–ผ๋งˆ๋‚˜ ๋ณด๊ฒŒ ํ• ์ง€ ์ •ํ•œ DB ๊ทœ์น™.
term

์ง์—ญ: ๊ฒฉ๋ฆฌ ์ˆ˜์ค€

๋‰˜์•™์Šค: READ COMMITTED, REPEATABLE READ, SERIALIZABLE ๊ฐ™์€ ๊ฒƒ.

The isolation level controls which anomalies are possible.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:index

Database Index

Sorted lookup structure that makes reads fast

Open deck
index scan
ํ…Œ์ด๋ธ” ์ „์ฒด๊ฐ€ ์•„๋‹ˆ๋ผ ์ธ๋ฑ์Šค๋ฅผ ํƒ€๊ณ  ์ฐพ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ธ๋ฑ์Šค ์Šค์บ”

๋‰˜์•™์Šค: ํ•ญ์ƒ ์ข‹์€ ๊ฒƒ์€ ์•„๋‹ˆ๊ณ  ์„ ํƒ๋„๊ฐ€ ์ค‘์š”ํ•˜๋‹ค.

The query switches from seq scan to index scan.

sequential scan
ํ…Œ์ด๋ธ”์„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ฝ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ˆœ์ฐจ ์Šค์บ”

๋‰˜์•™์Šค: ์ž‘์€ ํ…Œ์ด๋ธ”์—์„œ๋Š” ๊ดœ์ฐฎ์ง€๋งŒ ํฐ ํ…Œ์ด๋ธ”์—์„œ ์œ„ํ—˜.

EXPLAIN showed a sequential scan over ten million rows.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write amplification
๋…ผ๋ฆฌ์  ์“ฐ๊ธฐ ํ•˜๋‚˜๊ฐ€ ๋‚ด๋ถ€์ ์œผ๋กœ ์—ฌ๋Ÿฌ ์“ฐ๊ธฐ๋กœ ๋Š˜์–ด๋‚˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์“ฐ๊ธฐ ์ฆํญ

๋‰˜์•™์Šค: index, fan-out, replication, LSM์—์„œ ์ค‘์š”.

Fan-out-on-write causes write amplification.

concept:query-plan

Query Plan

The DB's plan for how it'll run your query

Open deck
index scan
ํ…Œ์ด๋ธ” ์ „์ฒด๊ฐ€ ์•„๋‹ˆ๋ผ ์ธ๋ฑ์Šค๋ฅผ ํƒ€๊ณ  ์ฐพ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ธ๋ฑ์Šค ์Šค์บ”

๋‰˜์•™์Šค: ํ•ญ์ƒ ์ข‹์€ ๊ฒƒ์€ ์•„๋‹ˆ๊ณ  ์„ ํƒ๋„๊ฐ€ ์ค‘์š”ํ•˜๋‹ค.

The query switches from seq scan to index scan.

N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

sequential scan
ํ…Œ์ด๋ธ”์„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ฝ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ˆœ์ฐจ ์Šค์บ”

๋‰˜์•™์Šค: ์ž‘์€ ํ…Œ์ด๋ธ”์—์„œ๋Š” ๊ดœ์ฐฎ์ง€๋งŒ ํฐ ํ…Œ์ด๋ธ”์—์„œ ์œ„ํ—˜.

EXPLAIN showed a sequential scan over ten million rows.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

concept:connection-pool

Connection Pool

Reuses DB connections and caps concurrency

Open deck
connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

headroom
ํ˜„์žฌ ๋ถ€ํ•˜ ์œ„์— ๋‚จ๊ฒจ๋‘” ์•ˆ์ „ ์—ฌ์œ .
term

์ง์—ญ: ์—ฌ์œ  ์šฉ๋Ÿ‰

๋‰˜์•™์Šค: 100% utilization๊นŒ์ง€ ์“ฐ๋ฉด ์žฅ์• ์— ์ทจ์•ฝํ•˜๋‹ค.

We keep headroom for traffic spikes.

lock contention
์—ฌ๋Ÿฌ ์š”์ฒญ์ด ๊ฐ™์€ lock์„ ๊ธฐ๋‹ค๋ฆฌ๋ฉฐ ์ง€์—ฐ๋˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋ฝ ๊ฒฝํ•ฉ

๋‰˜์•™์Šค: p99 spike์˜ ํ”ํ•œ ์›์ธ.

Lock contention pushed p99 above the SLO.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

saturation
CPU, pool, queue ๋“ฑ์ด ํ•œ๊ณ„์— ๊ฐ€๊นŒ์›Œ์ง„ ์ƒํƒœ.
term

์ง์—ญ: ํฌํ™”

๋‰˜์•™์Šค: ํฌํ™” ๊ทผ์ฒ˜์—์„œ latency๊ฐ€ ๊ธ‰๊ฒฉํžˆ ์˜ค๋ฅธ๋‹ค.

Latency spikes near saturation.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:n-plus-one

N+1 Query

One list query, then an extra query per row

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

concept:outbox

Transactional Outbox

Safely ties a DB write to publishing an event

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

CDC
DB ๋ณ€๊ฒฝ ๋กœ๊ทธ๋ฅผ ์ฝ์–ด downstream์œผ๋กœ ๋ณด๋‚ด๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋ณ€๊ฒฝ ๋ฐ์ดํ„ฐ ์บก์ฒ˜

๋‰˜์•™์Šค: outbox relay ๊ตฌํ˜„์— ์ž์ฃผ ์“ด๋‹ค.

CDC streams outbox rows to Kafka.

exactly-once
์ค‘๋ณต๋„ ์†์‹ค๋„ ์—†๊ฒŒ ๋ณด์ด๋„๋ก ๋งŒ๋“  ์ฒ˜๋ฆฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๋Œ€๊ฐœ ํ˜„์‹ค์—์„œ๋Š” ์ œํ•œ๋œ ๋ฒ”์œ„์˜ transaction/idempotency ์กฐํ•ฉ์ด๋‹ค.

Exactly-once is scoped, not magic.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stable key
์žฌ์‹œ๋„ํ•ด๋„ ๋ณ€ํ•˜์ง€ ์•Š๋Š” dedup/idempotency ๊ธฐ์ค€๊ฐ’.
term

์ง์—ญ: ์•ˆ์ •์ ์ธ ํ‚ค

๋‰˜์•™์Šค: ๋งค๋ฒˆ ์ƒˆ๋กœ ๋งŒ๋“ค๋ฉด ๋ฉฑ๋“ฑ์„ฑ์ด ๊นจ์ง„๋‹ค.

The idempotency key must be stable across retries.

concept:saga

Saga

Keeps consistency with compensating steps instead of a distributed transaction

Open deck
compensation
์ด๋ฏธ ์„ฑ๊ณตํ•œ ๋‹จ๊ณ„๋ฅผ ๋˜๋Œ๋ฆฌ๊ธฐ ์œ„ํ•œ ๋ฐ˜๋Œ€ ์ž‘์—….
term

์ง์—ญ: ๋ณด์ƒ

๋‰˜์•™์Šค: Saga์—์„œ rollback ๋Œ€์‹  ์“ฐ๋Š” ๊ฐœ๋….

If shipment fails, the saga runs compensation.

eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

observability
์‹œ์Šคํ…œ ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ logs/metrics/traces๋กœ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ.
term

์ง์—ญ: ๊ด€์ธก ๊ฐ€๋Šฅ์„ฑ

๋‰˜์•™์Šค: monitoring๋ณด๋‹ค ๋„“๋‹ค.

Observability tells me why the request was slow.

orchestration
์—ฌ๋Ÿฌ ๋‹จ๊ณ„, ๋„๊ตฌ, agent๋ฅผ ์ˆœ์„œ์™€ ์กฐ๊ฑด์— ๋งž์ถฐ ์šด์˜ํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜/์กฐ์œจ

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ '์—ฌ๋Ÿฌ agent'๊ฐ€ ์•„๋‹ˆ๋ผ ํ๋ฆ„ ์ œ์–ด๊ฐ€ ํ•ต์‹ฌ.

The orchestrator routes work to verifiers.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

saga
์—ฌ๋Ÿฌ ๋กœ์ปฌ ํŠธ๋žœ์žญ์…˜๊ณผ ๋ณด์ƒ ์ž‘์—…์œผ๋กœ ๊ธด workflow๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์‚ฌ๊ฐ€

๋‰˜์•™์Šค: ๋ถ„์‚ฐ ํŠธ๋žœ์žญ์…˜ ๋Œ€์‹  ์“ด๋‹ค.

The payment workflow is modeled as a saga.

state machine
ํ—ˆ์šฉ๋œ ์ƒํƒœ์™€ ์ „์ด๋งŒ ์ •์˜ํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์ƒํƒœ ๊ธฐ๊ณ„

๋‰˜์•™์Šค: ๋ถˆ๋ฒ• ์ƒํƒœ๋ฅผ ๋ง‰๋Š” LLD/๋„๋ฉ”์ธ ํ•ต์‹ฌ.

A state machine rejects illegal transitions.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:queue

Queue

Buffers work asynchronously for workers to process

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

by design
์šฐ์—ฐ์ด ์•„๋‹ˆ๋ผ ์˜๋„์ ์œผ๋กœ ๊ทธ๋ ‡๊ฒŒ ๋งŒ๋“  ๊ฒƒ.
phrase

์ง์—ญ: ์„ค๊ณ„์ƒ

๋‰˜์•™์Šค: ๊ฒฐํ•จ์ด ์•„๋‹ˆ๋ผ ์˜๋„๋œ trade-off์ž„์„ ๋งํ•  ๋•Œ ์œ ์šฉ.

The feed is eventually consistent by design.

dead letter queue
๊ณ„์† ์‹คํŒจํ•œ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฒ„๋ฆฌ์ง€ ์•Š๊ณ  ๊ฒฉ๋ฆฌ ๋ณด๊ด€ํ•˜๋Š” ํ.
term

์ง์—ญ: ์ฃฝ์€ ํŽธ์ง€ ํ

๋‰˜์•™์Šค: DLQ๋ผ๊ณ  ๋งŽ์ด ๋งํ•œ๋‹ค.

Poison messages go to the dead letter queue.

exactly-once
์ค‘๋ณต๋„ ์†์‹ค๋„ ์—†๊ฒŒ ๋ณด์ด๋„๋ก ๋งŒ๋“  ์ฒ˜๋ฆฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๋Œ€๊ฐœ ํ˜„์‹ค์—์„œ๋Š” ์ œํ•œ๋œ ๋ฒ”์œ„์˜ transaction/idempotency ์กฐํ•ฉ์ด๋‹ค.

Exactly-once is scoped, not magic.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

poison message
์†Œ๋น„์ž๊ฐ€ ์ฒ˜๋ฆฌํ•  ๋•Œ๋งˆ๋‹ค ์‹คํŒจํ•ด ํ๋ฅผ ๋ง‰๋Š” ๋ฉ”์‹œ์ง€.
term

์ง์—ญ: ๋… ๋ฉ”์‹œ์ง€

๋‰˜์•™์Šค: DLQ์˜ ๋Œ€ํ‘œ ์‚ฌ์šฉ ์‚ฌ๋ก€.

A poison message can block the whole partition.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:kafka-topic

Kafka Topic

Logical name for a stream of events

Open deck
append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

concept:kafka-partition

Kafka Partition

Splitting a topic into parallel log slices

Open deck
headroom
ํ˜„์žฌ ๋ถ€ํ•˜ ์œ„์— ๋‚จ๊ฒจ๋‘” ์•ˆ์ „ ์—ฌ์œ .
term

์ง์—ญ: ์—ฌ์œ  ์šฉ๋Ÿ‰

๋‰˜์•™์Šค: 100% utilization๊นŒ์ง€ ์“ฐ๋ฉด ์žฅ์• ์— ์ทจ์•ฝํ•˜๋‹ค.

We keep headroom for traffic spikes.

hot key
์š”์ฒญ์ด ํ•œ ํ‚ค/ํŒŒํ‹ฐ์…˜์— ๊ณผ๋„ํ•˜๊ฒŒ ๋ชฐ๋ฆฌ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋œจ๊ฑฐ์šด ํ‚ค

๋‰˜์•™์Šค: cache, Redis, Kafka, DynamoDB์—์„œ ์ž์ฃผ ๋ฌธ์ œ ๋œ๋‹ค.

A viral listing becomes a hot key.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

concept:consumer-group

Kafka Consumer Group

A group of consumers splitting partitions between them

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:kafka-offset

Kafka Offset

Where a record sits inside a partition

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

exactly-once
์ค‘๋ณต๋„ ์†์‹ค๋„ ์—†๊ฒŒ ๋ณด์ด๋„๋ก ๋งŒ๋“  ์ฒ˜๋ฆฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๋Œ€๊ฐœ ํ˜„์‹ค์—์„œ๋Š” ์ œํ•œ๋œ ๋ฒ”์œ„์˜ transaction/idempotency ์กฐํ•ฉ์ด๋‹ค.

Exactly-once is scoped, not magic.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

concept:dlq

Dead Letter Queue

Quarantine for messages that keep failing

Open deck
dead letter queue
๊ณ„์† ์‹คํŒจํ•œ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฒ„๋ฆฌ์ง€ ์•Š๊ณ  ๊ฒฉ๋ฆฌ ๋ณด๊ด€ํ•˜๋Š” ํ.
term

์ง์—ญ: ์ฃฝ์€ ํŽธ์ง€ ํ

๋‰˜์•™์Šค: DLQ๋ผ๊ณ  ๋งŽ์ด ๋งํ•œ๋‹ค.

Poison messages go to the dead letter queue.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

poison message
์†Œ๋น„์ž๊ฐ€ ์ฒ˜๋ฆฌํ•  ๋•Œ๋งˆ๋‹ค ์‹คํŒจํ•ด ํ๋ฅผ ๋ง‰๋Š” ๋ฉ”์‹œ์ง€.
term

์ง์—ญ: ๋… ๋ฉ”์‹œ์ง€

๋‰˜์•™์Šค: DLQ์˜ ๋Œ€ํ‘œ ์‚ฌ์šฉ ์‚ฌ๋ก€.

A poison message can block the whole partition.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:schema-registry

Schema Registry

Managing event formats and compatibility

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

concept:git-worktree

Git Worktree

Multiple branch working folders from one repo at once

Open deck
stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

concept:git-rebase-merge

Rebase vs Merge

Two ways to combine branch history

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

turns into
ํ•œ ๋ฌธ์ œ๊ฐ€ ๋‹ค๋ฅธ ๋ฌธ์ œ๋กœ ๋ฐ”๋€๋‹ค๋Š” ํ‘œํ˜„.
verb

์ง์—ญ: ~๋กœ ๋ณ€ํ•œ๋‹ค

๋‰˜์•™์Šค: scale/trade-off ์„ค๋ช…์— ์ข‹๋‹ค.

A local cache problem turns into a consistency problem.

concept:ci-cd

CI/CD

Pipeline that automates verification and deploy

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

load balancer
์š”์ฒญ์„ ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๋‚˜๋ˆ  ๋ณด๋‚ด๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ถ„์‚ฐ๊ธฐ

๋‰˜์•™์Šค: LB๋Š” scale๊ณผ availability์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์–ด.

The load balancer routes traffic to healthy instances.

concept:terraform-state

Terraform State

The ledger mapping code to real infra

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

concept:terraform-plan

Terraform Plan / Apply

Reviewing the infra diff before applying

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

concept:terraform-drift

Terraform Drift

When code and real infra fall out of sync

Open deck
audit trail
๋ˆ„๊ฐ€ ์–ธ์ œ ๋ฌด์—‡์„ ๋ฐ”๊ฟจ๋Š”์ง€ ๋‚จ๊ธด ๊ธฐ๋ก.
term

์ง์—ญ: ๊ฐ์‚ฌ ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: history log๋ณด๋‹ค ํ›จ์”ฌ ์ž์—ฐ์Šค๋Ÿฌ์šด ์‹ค๋ฌด ํ‘œํ˜„.

Every state transition writes an audit trail.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

fall out
context๋‚˜ cache ๋ฒ”์œ„์—์„œ ๋น ์ ธ์„œ ๋” ์ด์ƒ ๋ณด์ด์ง€ ์•Š๊ฒŒ ๋˜๋‹ค.
verb

์ง์—ญ: ๋ฐ–์œผ๋กœ ๋–จ์–ด์ง€๋‹ค

๋‰˜์•™์Šค: LLM history, cache, sliding window์—์„œ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์“ด๋‹ค.

Old messages fall out of the context window.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

concept:aws-vpc

AWS VPC

The logical network boundary inside AWS

Open deck
gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

concept:aws-iam

AWS IAM

Controlling who can do what

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

least privilege
ํ•„์š”ํ•œ ๊ถŒํ•œ๋งŒ ์ฃผ๋Š” ๋ณด์•ˆ ์›์น™.
term

์ง์—ญ: ์ตœ์†Œ ๊ถŒํ•œ

๋‰˜์•™์Šค: AI tool, IAM, service account ๋ชจ๋‘์— ์ ์šฉ.

The agent runs with least privilege.

concept:container

Container

Packaging an app and its runtime deps into an image

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:kubernetes-pod

Kubernetes Pod

The smallest deployable unit in Kubernetes

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

concept:kubernetes-deployment

Kubernetes Deployment

Managing pod replicas and rollouts

Open deck
deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:spring-di

Spring Dependency Injection

Spring wiring up object creation and dependencies

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:spring-transactional

@Transactional

Spring applying a transaction at the method boundary

Open deck
connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

concept:jpa-persistence-context

JPA Persistence Context

The first-level cache that tracks entities and detects changes

Open deck
in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

concept:thread-pool

Thread Pool

Capping and reusing worker threads

Open deck
backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

tail latency
ํ‰๊ท  ๋’ค์— ์ˆจ์–ด ์žˆ๋Š” ๋А๋ฆฐ ์š”์ฒญ๋“ค์˜ ์ง€์—ฐ.
term

์ง์—ญ: ๊ผฌ๋ฆฌ ์ง€์—ฐ

๋‰˜์•™์Šค: p95/p99๋กœ ๋ณธ๋‹ค.

Tail latency dominates user experience.

thread pool
์ž‘์—…์„ ์ฒ˜๋ฆฌํ•  worker thread ๋ฌถ์Œ.
term

์ง์—ญ: ์Šค๋ ˆ๋“œ ํ’€

๋‰˜์•™์Šค: ๋А๋ฆฐ ํ˜ธ์ถœ์ด ์Šค๋ ˆ๋“œ๋ฅผ ์žก๊ณ  ์žˆ์œผ๋ฉด ์ „์ฒด endpoint๊ฐ€ ๋ง‰ํžŒ๋‹ค.

Timeouts prevent thread pool exhaustion.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:jvm-gc

JVM Garbage Collection

Reclaiming memory from objects you no longer use

Open deck
garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

not free
์ข‹์•„ ๋ณด์ด๋Š” ์„ ํƒ์—๋„ ๋น„์šฉ์ด ์žˆ๋‹ค๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ณต์งœ๊ฐ€ ์•„๋‹ˆ๋‹ค

๋‰˜์•™์Šค: ์งง๊ณ  ์ž์—ฐ์Šค๋Ÿฌ์šด trade-off ๋ฌธ์žฅ.

Caching is not free; it introduces staleness.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

tail latency
ํ‰๊ท  ๋’ค์— ์ˆจ์–ด ์žˆ๋Š” ๋А๋ฆฐ ์š”์ฒญ๋“ค์˜ ์ง€์—ฐ.
term

์ง์—ญ: ๊ผฌ๋ฆฌ ์ง€์—ฐ

๋‰˜์•™์Šค: p95/p99๋กœ ๋ณธ๋‹ค.

Tail latency dominates user experience.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:rest-api

REST API

A resource-oriented HTTP interface

Open deck
idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:solid

SOLID

A set of principles for designing classes that absorb change

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:dependency-inversion

Dependency Inversion

Keeping high-level policy from depending directly on low-level details

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:strategy-pattern

Strategy Pattern

Pulling an algorithm or policy out into a swappable object

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:repository-pattern

Repository Pattern

Keeping the domain from knowing the persistence details

Open deck
chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

turns into
ํ•œ ๋ฌธ์ œ๊ฐ€ ๋‹ค๋ฅธ ๋ฌธ์ œ๋กœ ๋ฐ”๋€๋‹ค๋Š” ํ‘œํ˜„.
verb

์ง์—ญ: ~๋กœ ๋ณ€ํ•œ๋‹ค

๋‰˜์•™์Šค: scale/trade-off ์„ค๋ช…์— ์ข‹๋‹ค.

A local cache problem turns into a consistency problem.

concept:hash-map

Hash Map

Looking up values by key in roughly O(1)

Open deck
trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:heap

Heap / Priority Queue

Data structure for fast min/max access

Open deck
heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

concept:bfs-dfs

BFS / DFS

The basic ways to traverse graphs and trees

Open deck
heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

concept:binary-search

Binary Search

Halving the search range on sorted or monotonic data

Open deck
invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

concept:dynamic-programming

Dynamic Programming

Solving by caching overlapping subproblems

Open deck
unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:two-pointers

Two Pointers

Scanning linearly by moving two indices

Open deck
invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

concept:sliding-window

Sliding Window

Growing and shrinking a contiguous range to meet a condition

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:log-metric-trace

Logs / Metrics / Traces

The three signals for observing a system

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

logs, metrics, traces
๊ด€์ธก์„ฑ์˜ ์„ธ ์ถ•.
phrase

์ง์—ญ: ๋กœ๊ทธ, ์ง€ํ‘œ, ํŠธ๋ ˆ์ด์Šค

๋‰˜์•™์Šค: logs=์‚ฌ๊ฑด, metrics=์ˆซ์ž ์ถ”์„ธ, traces=์š”์ฒญ ํ๋ฆ„.

I start with metrics, then traces, then logs.

observability
์‹œ์Šคํ…œ ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ logs/metrics/traces๋กœ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ.
term

์ง์—ญ: ๊ด€์ธก ๊ฐ€๋Šฅ์„ฑ

๋‰˜์•™์Šค: monitoring๋ณด๋‹ค ๋„“๋‹ค.

Observability tells me why the request was slow.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:alerting

Alerting

Only alert on signals worth waking someone up for

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

concept:authn-authz

Authentication vs Authorization

Proving who you are vs deciding what you can do

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:jwt

JWT

A bundle of signed claims you pass around

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:oauth-oidc

OAuth 2.0 / OIDC

Delegated access plus a login identity layer

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

verifier
๊ฒฐ๊ณผ๊ฐ€ ๊ทœ์น™, ํ…Œ์ŠคํŠธ, ๊ทผ๊ฑฐ๋ฅผ ๋งŒ์กฑํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๊ฒ€์ฆ๊ธฐ

๋‰˜์•™์Šค: ๋ชจ๋ธ์˜ ๋ง์„ ๋‹ค์‹œ ๋ชจ๋ธ/๊ทœ์น™/ํ…Œ์ŠคํŠธ๋กœ ํ™•์ธํ•œ๋‹ค.

The verifier rejects unsupported claims.

concept:frontend-browser-request-flow

Browser Request Flow

From typing the URL to pixels on the screen

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

load balancer
์š”์ฒญ์„ ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๋‚˜๋ˆ  ๋ณด๋‚ด๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ถ„์‚ฐ๊ธฐ

๋‰˜์•™์Šค: LB๋Š” scale๊ณผ availability์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์–ด.

The load balancer routes traffic to healthy instances.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

concept:react-component

React Component

A piece of UI declared from props and state

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

concept:react-state

React State

Local memory that triggers a re-render

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:react-effect

useEffect

Syncing with external systems after render

Open deck
side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

concept:frontend-data-fetching

Frontend Data Fetching

Wiring up the API with loading, error, and success states

Open deck
race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

concept:controlled-input

Controlled Input

React state owning the form value

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

concept:client-server-rendering

CSR / SSR / Hydration

How the browser and server split rendering work

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

mismatch
์„œ๋กœ ๋งž์•„์•ผ ํ•˜๋Š” ๊ฐ’์ด ๋งž์ง€ ์•Š๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ์ผ์น˜

๋‰˜์•™์Šค: reconciliation ๊ฒฐ๊ณผ๋ฅผ ๋ถ„๋ฅ˜ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The reconciler classifies amount mismatches as high severity.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:frontend-routing

Frontend Routing

Connecting the URL to screen state

Open deck
fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

concept:frontend-accessibility

Accessibility Basics

Designing for keyboard, screen readers, and semantic HTML

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:frontend-performance

Frontend Performance

Managing bundle, render, network, and interaction latency

Open deck
fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

concept:frontend-testing

Frontend Testing

Verify user flows with component, integration, and E2E tests

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:design-system

Design System

Keeping repeated UI and interaction rules consistent

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

concept:source-code

Source Code

The human-readable original of a program

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:compiler

Compiler

Turns source code into something runnable

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:runtime

Runtime

The environment where a program actually runs

Open deck
garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

concept:process

Process

A running program as the OS sees it

Open deck
heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

concept:thread

Thread

A flow of execution inside a process

Open deck
heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

thread pool
์ž‘์—…์„ ์ฒ˜๋ฆฌํ•  worker thread ๋ฌถ์Œ.
term

์ง์—ญ: ์Šค๋ ˆ๋“œ ํ’€

๋‰˜์•™์Šค: ๋А๋ฆฐ ํ˜ธ์ถœ์ด ์Šค๋ ˆ๋“œ๋ฅผ ์žก๊ณ  ์žˆ์œผ๋ฉด ์ „์ฒด endpoint๊ฐ€ ๋ง‰ํžŒ๋‹ค.

Timeouts prevent thread pool exhaustion.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:memory

Memory

Where a running program holds its data

Open deck
garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

tail latency
ํ‰๊ท  ๋’ค์— ์ˆจ์–ด ์žˆ๋Š” ๋А๋ฆฐ ์š”์ฒญ๋“ค์˜ ์ง€์—ฐ.
term

์ง์—ญ: ๊ผฌ๋ฆฌ ์ง€์—ฐ

๋‰˜์•™์Šค: p95/p99๋กœ ๋ณธ๋‹ค.

Tail latency dominates user experience.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:client-server

Client / Server

The side making the request vs. the side answering it

Open deck
first-class
๋ณด์กฐ๊ฐ€ ์•„๋‹ˆ๋ผ ์‹œ์Šคํ…œ์˜ ์ •์‹ ๊ฐœ๋…์œผ๋กœ ๋‹ค๋ฃฌ๋‹ค๋Š” ๋œป.
collocation

์ง์—ญ: ์ผ๊ธ‰์˜

๋‰˜์•™์Šค: abstention, approval, trace ๊ฐ™์€ ๊ฒƒ์— ๋ถ™์ด๋ฉด ์ข‹๋‹ค.

Abstention should be a first-class output.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:api

API

The agreed boundary where systems talk to each other

Open deck
API contract
์š”์ฒญ/์‘๋‹ต ํ˜•์‹, ์—๋Ÿฌ, ๋ณด์žฅ์‚ฌํ•ญ๊นŒ์ง€ ํฌํ•จํ•œ ์•ฝ์†.
term

์ง์—ญ: API ๊ณ„์•ฝ

๋‰˜์•™์Šค: ์—”๋“œํฌ์ธํŠธ ์ด๋ฆ„๋ณด๋‹ค ๊ฐ•ํ•œ ๊ฐœ๋….

The API contract defines idempotency and error codes.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

concept:endpoint

Endpoint

A concrete callable address or action on an API

Open deck
idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

concept:payload

Payload

The actual data body of a request or response

Open deck
idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:schema

Schema

The shape and constraints of your data

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

concept:serialization

Serialization

Turning an object into something you can send or store

Open deck
deserialization
byte/text๋ฅผ ๋‹ค์‹œ ๊ฐ์ฒด/๊ตฌ์กฐ๋กœ ์ฝ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์—ญ์ง๋ ฌํ™”

๋‰˜์•™์Šค: schema mismatch๊ฐ€ poison message๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

Deserialization failed after the schema change.

mismatch
์„œ๋กœ ๋งž์•„์•ผ ํ•˜๋Š” ๊ฐ’์ด ๋งž์ง€ ์•Š๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ์ผ์น˜

๋‰˜์•™์Šค: reconciliation ๊ฒฐ๊ณผ๋ฅผ ๋ถ„๋ฅ˜ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The reconciler classifies amount mismatches as high severity.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:protocol

Protocol

A set of communication rules

Open deck
comes down to
ํ•ต์‹ฌ์ด ๊ฒฐ๊ตญ ๋ฌด์—‡์ธ์ง€ ์••์ถ•ํ•˜๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ฒฐ๊ตญ ~๋กœ ๋‚ด๋ ค์˜จ๋‹ค

๋‰˜์•™์Šค: ๊ฒฐ๋ก ์„ ๋‹จ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

This comes down to the transaction boundary.

first-class
๋ณด์กฐ๊ฐ€ ์•„๋‹ˆ๋ผ ์‹œ์Šคํ…œ์˜ ์ •์‹ ๊ฐœ๋…์œผ๋กœ ๋‹ค๋ฃฌ๋‹ค๋Š” ๋œป.
collocation

์ง์—ญ: ์ผ๊ธ‰์˜

๋‰˜์•™์Šค: abstention, approval, trace ๊ฐ™์€ ๊ฒƒ์— ๋ถ™์ด๋ฉด ์ข‹๋‹ค.

Abstention should be a first-class output.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:http-method

HTTP Methods

What GET, POST, PUT, PATCH, DELETE mean

Open deck
idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

concept:status-code

HTTP Status Code

Standard numeric codes for the result

Open deck
gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:dependency

Dependency

External code or services your code relies on

Open deck
blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

circuit breaker
์˜์กด์„ฑ์ด ๊ณ„์† ์‹คํŒจํ•˜๋ฉด ํ˜ธ์ถœ์„ ์ž ์‹œ ๋ง‰๊ณ  ๋น ๋ฅด๊ฒŒ ์‹คํŒจ์‹œํ‚ค๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์ฐจ๋‹จ๊ธฐ

๋‰˜์•™์Šค: ์ง‘ ์ „๊ธฐ ์ฐจ๋‹จ๊ธฐ ๋น„์œ  ๊ทธ๋Œ€๋กœ๋‹ค.

The circuit breaker opens after repeated failures.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

concept:library

Library

Reusable code your code calls into

Open deck
blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

concept:framework

Framework

The skeleton that shapes your app's flow

Open deck
reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:sdk

SDK

A dev toolkit for a specific platform or API

Open deck
on top of that
์ถ”๊ฐ€ ๊ทผ๊ฑฐ๋‚˜ ์กฐ๊ฑด์„ ๋ง๋ถ™์ผ ๋•Œ ์“ฐ๋Š” ์—ฐ๊ฒฐ ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ทธ ์œ„์— ์ถ”๊ฐ€๋กœ

๋‰˜์•™์Šค: also๋ณด๋‹ค ๋” ๋งํ•˜๋Š” ํ๋ฆ„์ด ์ข‹๋‹ค.

On top of that, I would add citation checks.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

concept:package-manager

Package Manager

Installing dependencies and pinning versions

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

concept:build

Build

Turning source code into a shippable artifact

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:artifact

Artifact

The deployable output of a build

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:deploy

Deploy

Getting the artifact running in a target environment

Open deck
observability
์‹œ์Šคํ…œ ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ logs/metrics/traces๋กœ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ.
term

์ง์—ญ: ๊ด€์ธก ๊ฐ€๋Šฅ์„ฑ

๋‰˜์•™์Šค: monitoring๋ณด๋‹ค ๋„“๋‹ค.

Observability tells me why the request was slow.

concept:release

Release

Exposing the feature to users

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

concept:environment

Environment

Run contexts like dev, staging, and production

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

concept:configuration

Configuration

Behavior you can change outside the code

Open deck
audit trail
๋ˆ„๊ฐ€ ์–ธ์ œ ๋ฌด์—‡์„ ๋ฐ”๊ฟจ๋Š”์ง€ ๋‚จ๊ธด ๊ธฐ๋ก.
term

์ง์—ญ: ๊ฐ์‚ฌ ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: history log๋ณด๋‹ค ํ›จ์”ฌ ์ž์—ฐ์Šค๋Ÿฌ์šด ์‹ค๋ฌด ํ‘œํ˜„.

Every state transition writes an audit trail.

fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:interface

Interface

The boundary that hides implementation and pins down how something is used

Open deck
gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

concept:abstraction

Abstraction

Surfacing only what matters and hiding the rest

Open deck
connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

concept:coupling

Coupling

How much a change in one place forces changes elsewhere

Open deck
blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:cohesion

Cohesion

How focused a module is on a single purpose

Open deck
blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

concept:validation

Validation

Checking that input actually satisfies the rules

Open deck
fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

concept:exception-error

Error / Exception

When the program can't finish its normal flow

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:stack-trace

Stack Trace

The call path that led to the error

Open deck
trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:logging

Logging

A record of what the system did

Open deck
thread pool
์ž‘์—…์„ ์ฒ˜๋ฆฌํ•  worker thread ๋ฌถ์Œ.
term

์ง์—ญ: ์Šค๋ ˆ๋“œ ํ’€

๋‰˜์•™์Šค: ๋А๋ฆฐ ํ˜ธ์ถœ์ด ์Šค๋ ˆ๋“œ๋ฅผ ์žก๊ณ  ์žˆ์œผ๋ฉด ์ „์ฒด endpoint๊ฐ€ ๋ง‰ํžŒ๋‹ค.

Timeouts prevent thread pool exhaustion.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:sync-async

Synchronous / Asynchronous

Calls you wait on vs. work handled later

Open deck
eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

webhook
์™ธ๋ถ€ ์‹œ์Šคํ…œ์ด ์šฐ๋ฆฌ ์„œ๋ฒ„๋กœ ๋ณด๋‚ด๋Š” ์ด๋ฒคํŠธ callback.
term

์ง์—ญ: ์›นํ›…

๋‰˜์•™์Šค: ์ค‘๋ณต, ์ˆœ์„œ ์—ญ์ „, ์„œ๋ช… ๊ฒ€์ฆ์ด ํ•ต์‹ฌ.

Payment webhooks are delivered at least once.

concept:concurrency

Concurrency

Multiple things in progress at once

Open deck
compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

optimistic lock
์ถฉ๋Œ์ด ๋“œ๋ฌผ๋‹ค๊ณ  ๋ณด๊ณ  version check๋กœ ์ถฉ๋Œ ์‹œ ์‹คํŒจ์‹œํ‚ค๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‚™๊ด€์  ๋ฝ

๋‰˜์•™์Šค: hot row์—์„œ๋Š” retry storm์ด ๋‚  ์ˆ˜ ์žˆ๋‹ค.

Optimistic locking rejects stale writes.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:race-condition

Race Condition

A bug where the outcome depends on timing

Open deck
compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

optimistic lock
์ถฉ๋Œ์ด ๋“œ๋ฌผ๋‹ค๊ณ  ๋ณด๊ณ  version check๋กœ ์ถฉ๋Œ ์‹œ ์‹คํŒจ์‹œํ‚ค๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‚™๊ด€์  ๋ฝ

๋‰˜์•™์Šค: hot row์—์„œ๋Š” retry storm์ด ๋‚  ์ˆ˜ ์žˆ๋‹ค.

Optimistic locking rejects stale writes.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

concept:worker

Worker

The thing that runs background jobs

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

dead letter queue
๊ณ„์† ์‹คํŒจํ•œ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฒ„๋ฆฌ์ง€ ์•Š๊ณ  ๊ฒฉ๋ฆฌ ๋ณด๊ด€ํ•˜๋Š” ํ.
term

์ง์—ญ: ์ฃฝ์€ ํŽธ์ง€ ํ

๋‰˜์•™์Šค: DLQ๋ผ๊ณ  ๋งŽ์ด ๋งํ•œ๋‹ค.

Poison messages go to the dead letter queue.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

poison message
์†Œ๋น„์ž๊ฐ€ ์ฒ˜๋ฆฌํ•  ๋•Œ๋งˆ๋‹ค ์‹คํŒจํ•ด ํ๋ฅผ ๋ง‰๋Š” ๋ฉ”์‹œ์ง€.
term

์ง์—ญ: ๋… ๋ฉ”์‹œ์ง€

๋‰˜์•™์Šค: DLQ์˜ ๋Œ€ํ‘œ ์‚ฌ์šฉ ์‚ฌ๋ก€.

A poison message can block the whole partition.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

concept:controller

Controller

Takes the HTTP request and hands it to the app logic

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:service-layer

Service Layer

Where use cases and business workflows live

Open deck
orchestration
์—ฌ๋Ÿฌ ๋‹จ๊ณ„, ๋„๊ตฌ, agent๋ฅผ ์ˆœ์„œ์™€ ์กฐ๊ฑด์— ๋งž์ถฐ ์šด์˜ํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜/์กฐ์œจ

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ '์—ฌ๋Ÿฌ agent'๊ฐ€ ์•„๋‹ˆ๋ผ ํ๋ฆ„ ์ œ์–ด๊ฐ€ ํ•ต์‹ฌ.

The orchestrator routes work to verifiers.

transaction boundary
๋ฌด์—‡๊นŒ์ง€ ํ•œ ์ปค๋ฐ‹์œผ๋กœ ๋ฌถ์„์ง€ ์ •ํ•œ ์„ .
term

์ง์—ญ: ํŠธ๋žœ์žญ์…˜ ๊ฒฝ๊ณ„

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ๋„“์œผ๋ฉด lock์ด ๊ธธ๊ณ , ๋„ˆ๋ฌด ์ข์œผ๋ฉด ๋ฐ˜์ชฝ ์ƒํƒœ๊ฐ€ ์ƒ๊ธด๋‹ค.

I would keep the state change and audit insert in one transaction boundary.

concept:dto

DTO

The data shape you pass across layers or the network

Open deck
API contract
์š”์ฒญ/์‘๋‹ต ํ˜•์‹, ์—๋Ÿฌ, ๋ณด์žฅ์‚ฌํ•ญ๊นŒ์ง€ ํฌํ•จํ•œ ์•ฝ์†.
term

์ง์—ญ: API ๊ณ„์•ฝ

๋‰˜์•™์Šค: ์—”๋“œํฌ์ธํŠธ ์ด๋ฆ„๋ณด๋‹ค ๊ฐ•ํ•œ ๊ฐœ๋….

The API contract defines idempotency and error codes.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:crud

CRUD

The basic data ops: create, read, update, delete

Open deck
audit trail
๋ˆ„๊ฐ€ ์–ธ์ œ ๋ฌด์—‡์„ ๋ฐ”๊ฟจ๋Š”์ง€ ๋‚จ๊ธด ๊ธฐ๋ก.
term

์ง์—ญ: ๊ฐ์‚ฌ ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: history log๋ณด๋‹ค ํ›จ์”ฌ ์ž์—ฐ์Šค๋Ÿฌ์šด ์‹ค๋ฌด ํ‘œํ˜„.

Every state transition writes an audit trail.

optimistic lock
์ถฉ๋Œ์ด ๋“œ๋ฌผ๋‹ค๊ณ  ๋ณด๊ณ  version check๋กœ ์ถฉ๋Œ ์‹œ ์‹คํŒจ์‹œํ‚ค๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‚™๊ด€์  ๋ฝ

๋‰˜์•™์Šค: hot row์—์„œ๋Š” retry storm์ด ๋‚  ์ˆ˜ ์žˆ๋‹ค.

Optimistic locking rejects stale writes.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

state machine
ํ—ˆ์šฉ๋œ ์ƒํƒœ์™€ ์ „์ด๋งŒ ์ •์˜ํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์ƒํƒœ ๊ธฐ๊ณ„

๋‰˜์•™์Šค: ๋ถˆ๋ฒ• ์ƒํƒœ๋ฅผ ๋ง‰๋Š” LLD/๋„๋ฉ”์ธ ํ•ต์‹ฌ.

A state machine rejects illegal transitions.

concept:handler

Handler

The function or component that processes a request, event, or job

Open deck
idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:middleware

Middleware

Shared logic that sits in the request/response path

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:mapper

Mapper

Converts one data shape into another

Open deck
turns into
ํ•œ ๋ฌธ์ œ๊ฐ€ ๋‹ค๋ฅธ ๋ฌธ์ œ๋กœ ๋ฐ”๋€๋‹ค๋Š” ํ‘œํ˜„.
verb

์ง์—ญ: ~๋กœ ๋ณ€ํ•œ๋‹ค

๋‰˜์•™์Šค: scale/trade-off ์„ค๋ช…์— ์ข‹๋‹ค.

A local cache problem turns into a consistency problem.

concept:migration

Migration

Safely changing your DB schema or data shape

Open deck
escape hatch
์‹œ์Šคํ…œ์ด ์•ˆ์ „ํ•˜๊ฒŒ ๋น ์ ธ๋‚˜๊ฐˆ ์ˆ˜ ์žˆ๋Š” ๋Œ€์ฒด ์„ ํƒ.
term

์ง์—ญ: ํƒˆ์ถœ๊ตฌ

๋‰˜์•™์Šค: LLM์ด ๋ชจ๋ฅผ ๋•Œ abstainํ•˜๋Š” ๊ตฌ์กฐ ๊ฐ™์€ ๊ฒƒ.

The model needs an escape hatch: say it is not in the sources.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

concept:mutex

Mutex (Lock)

A mutual-exclusion lock that lets exactly one thread into the critical section at a time

Open deck
deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:semaphore

Semaphore

A counting sync primitive that caps concurrent access to N permits

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

thread pool
์ž‘์—…์„ ์ฒ˜๋ฆฌํ•  worker thread ๋ฌถ์Œ.
term

์ง์—ญ: ์Šค๋ ˆ๋“œ ํ’€

๋‰˜์•™์Šค: ๋А๋ฆฐ ํ˜ธ์ถœ์ด ์Šค๋ ˆ๋“œ๋ฅผ ์žก๊ณ  ์žˆ์œผ๋ฉด ์ „์ฒด endpoint๊ฐ€ ๋ง‰ํžŒ๋‹ค.

Timeouts prevent thread pool exhaustion.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:read-write-lock

Read-Write Lock

Many readers at once, one writer alone

Open deck
deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

handoff
ํ•œ agent/์„œ๋น„์Šค/์‚ฌ๋žŒ์ด ๋‹ค๋ฅธ ์ฃผ์ฒด์—๊ฒŒ ์ž‘์—…์„ ๋„˜๊ธฐ๋Š” ์ง€์ .
term

์ง์—ญ: ์ธ๊ณ„

๋‰˜์•™์Šค: handoff์—์„œ context loss๊ฐ€ ์ž์ฃผ ์ƒ๊ธด๋‹ค.

The handoff includes the artifact and trace.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:deadlock

Deadlock

Two threads each waiting on the other's lock, frozen forever in a circular wait

Open deck
deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:livelock

Livelock

Not blocked, but threads keep reacting to each other and never make progress

Open deck
deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

exponential backoff
์žฌ์‹œ๋„ ๊ฐ„๊ฒฉ์„ 1์ดˆ, 2์ดˆ, 4์ดˆ์ฒ˜๋Ÿผ ์ ์  ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ง€์ˆ˜ ๋ฐฑ์˜คํ”„

๋‰˜์•™์Šค: ์ฃฝ์–ด๊ฐ€๋Š” ์˜์กด์„ฑ์— ๋ถ€ํ•˜๋ฅผ ๋”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์“ด๋‹ค.

Retries use exponential backoff.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

retry storm
์‹คํŒจํ•œ ์š”์ฒญ๋“ค์ด ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋ฉฐ ์žฅ์• ๋ฅผ ํ‚ค์šฐ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์žฌ์‹œ๋„ ํญํ’

๋‰˜์•™์Šค: ์žฅ์•  ๋Œ€์‘์—์„œ ์ž์ฃผ ๋‚˜์˜ค๋Š” ํ‘œํ˜„.

A retry storm overloaded the dependency.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:starvation

Starvation

One thread perpetually denied the resource it needs

Open deck
deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

handoff
ํ•œ agent/์„œ๋น„์Šค/์‚ฌ๋žŒ์ด ๋‹ค๋ฅธ ์ฃผ์ฒด์—๊ฒŒ ์ž‘์—…์„ ๋„˜๊ธฐ๋Š” ์ง€์ .
term

์ง์—ญ: ์ธ๊ณ„

๋‰˜์•™์Šค: handoff์—์„œ context loss๊ฐ€ ์ž์ฃผ ์ƒ๊ธด๋‹ค.

The handoff includes the artifact and trace.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:compare-and-swap

Compare-And-Swap (CAS)

Lock-free atomic update: swap only if the current value still matches what you expected

Open deck
compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:memory-visibility

Memory Visibility (volatile / happens-before)

One thread's write isn't visible to another without synchronization

Open deck
compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:spinlock

Spinlock

A lock that keeps checking instead of sleeping โ€” only for very short critical sections

Open deck
compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:optimistic-pessimistic-lock

Optimistic vs Pessimistic Locking

Optimistic when conflicts are rare, pessimistic when frequent

Open deck
deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

mismatch
์„œ๋กœ ๋งž์•„์•ผ ํ•˜๋Š” ๊ฐ’์ด ๋งž์ง€ ์•Š๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ์ผ์น˜

๋‰˜์•™์Šค: reconciliation ๊ฒฐ๊ณผ๋ฅผ ๋ถ„๋ฅ˜ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The reconciler classifies amount mismatches as high severity.

optimistic lock
์ถฉ๋Œ์ด ๋“œ๋ฌผ๋‹ค๊ณ  ๋ณด๊ณ  version check๋กœ ์ถฉ๋Œ ์‹œ ์‹คํŒจ์‹œํ‚ค๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‚™๊ด€์  ๋ฝ

๋‰˜์•™์Šค: hot row์—์„œ๋Š” retry storm์ด ๋‚  ์ˆ˜ ์žˆ๋‹ค.

Optimistic locking rejects stale writes.

pessimistic lock
์ถฉ๋Œ์ด ๋‚  ๊ฒƒ์ด๋ผ ๋ณด๊ณ  ๋จผ์ € lock์„ ์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ๊ฒŒ ํ•˜๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋น„๊ด€์  ๋ฝ

๋‰˜์•™์Šค: SELECT FOR UPDATE๋กœ ๋งŽ์ด ์„ค๋ช…ํ•œ๋‹ค.

Pessimistic locking serializes access to the row.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

retry storm
์‹คํŒจํ•œ ์š”์ฒญ๋“ค์ด ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋ฉฐ ์žฅ์• ๋ฅผ ํ‚ค์šฐ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์žฌ์‹œ๋„ ํญํ’

๋‰˜์•™์Šค: ์žฅ์•  ๋Œ€์‘์—์„œ ์ž์ฃผ ๋‚˜์˜ค๋Š” ํ‘œํ˜„.

A retry storm overloaded the dependency.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:distributed-lock

Distributed Lock

Mutual exclusion across nodes: TTL + fencing token are the core

Open deck
garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:condition-variable

Condition Variable (wait / notify)

Release the lock, sleep until a predicate holds, get woken by a signal

Open deck
trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:producer-consumer

Producer-Consumer (Blocking Queue)

Decouple producers and consumers with a bounded queue that applies backpressure

Open deck
backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:reentrant-lock

Reentrant Lock

The same thread can re-acquire a lock it already holds (hold count)

Open deck
deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:critical-section

Critical Section

Lock only the smallest region that touches shared state

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

single-flight
๊ฐ™์€ key miss์— ๋Œ€ํ•ด ํ•œ ์š”์ฒญ๋งŒ ์›๋ณธ์„ ์ฑ„์šฐ๊ณ  ๋‚˜๋จธ์ง€๋Š” ๊ธฐ๋‹ค๋ฆฌ๊ฒŒ ํ•˜๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‹จ์ผ ๋น„ํ–‰

๋‰˜์•™์Šค: cache stampede ๋ฐฉ์–ด ํ‘œํ˜„.

Only one request fills the cache through single-flight.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:false-sharing

False Sharing

No logical sharing, yet the shared cache line silently kills throughput

Open deck
lock contention
์—ฌ๋Ÿฌ ์š”์ฒญ์ด ๊ฐ™์€ lock์„ ๊ธฐ๋‹ค๋ฆฌ๋ฉฐ ์ง€์—ฐ๋˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋ฝ ๊ฒฝํ•ฉ

๋‰˜์•™์Šค: p99 spike์˜ ํ”ํ•œ ์›์ธ.

Lock contention pushed p99 above the SLO.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:context-switch

Context Switch

The cost of the CPU saving/restoring thread state โ€” too many threads and switching costs more than the work

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

cache miss
์บ์‹œ์— ์—†์–ด ์›๋ณธ ์ €์žฅ์†Œ๋กœ ๊ฐ€์•ผ ํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์บ์‹œ ๋ฏธ์Šค

๋‰˜์•™์Šค: miss๊ฐ€ ๋ชฐ๋ฆฌ๋ฉด DB๊ฐ€ ํ„ฐ์ง„๋‹ค.

Cache misses spike after TTL expiry.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:aba-problem

ABA Problem

CAS sees the value, not the history โ€” it misses Aโ†’Bโ†’A

Open deck
compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:thread-safety

Thread Safety

Code that behaves correctly under concurrent access with no extra caller coordination

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:concurrency-vs-parallelism

Concurrency vs Parallelism

Concurrency is structure, parallelism is execution

Open deck
N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:jvm-memory-areas

JVM Memory Areas

Heap, stacks, Metaspace โ€” what lives where and which OOM each one throws

Open deck
garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:concurrent-collections

Concurrent Collections

Less locking: ConcurrentHashMap, CopyOnWrite, BlockingQueue

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

handoff
ํ•œ agent/์„œ๋น„์Šค/์‚ฌ๋žŒ์ด ๋‹ค๋ฅธ ์ฃผ์ฒด์—๊ฒŒ ์ž‘์—…์„ ๋„˜๊ธฐ๋Š” ์ง€์ .
term

์ง์—ญ: ์ธ๊ณ„

๋‰˜์•™์Šค: handoff์—์„œ context loss๊ฐ€ ์ž์ฃผ ์ƒ๊ธด๋‹ค.

The handoff includes the artifact and trace.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:prepared-statement

PreparedStatement (JDBC)

Parameter binding blocks SQL injection and reuses the query plan

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

index scan
ํ…Œ์ด๋ธ” ์ „์ฒด๊ฐ€ ์•„๋‹ˆ๋ผ ์ธ๋ฑ์Šค๋ฅผ ํƒ€๊ณ  ์ฐพ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ธ๋ฑ์Šค ์Šค์บ”

๋‰˜์•™์Šค: ํ•ญ์ƒ ์ข‹์€ ๊ฒƒ์€ ์•„๋‹ˆ๊ณ  ์„ ํƒ๋„๊ฐ€ ์ค‘์š”ํ•˜๋‹ค.

The query switches from seq scan to index scan.

sequential scan
ํ…Œ์ด๋ธ”์„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ฝ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ˆœ์ฐจ ์Šค์บ”

๋‰˜์•™์Šค: ์ž‘์€ ํ…Œ์ด๋ธ”์—์„œ๋Š” ๊ดœ์ฐฎ์ง€๋งŒ ํฐ ํ…Œ์ด๋ธ”์—์„œ ์œ„ํ—˜.

EXPLAIN showed a sequential scan over ten million rows.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:lock-types-compared

synchronized vs ReentrantLock vs ReadWriteLock vs StampedLock

Four JVM locks: default to synchronized, climb to explicit locks only when you need their features

Open deck
compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

happy path
๋ชจ๋“  ๊ฒƒ์ด ์ •์ƒ์ ์œผ๋กœ ๋˜๋Š” ๊ธฐ๋ณธ ์„ฑ๊ณต ํ๋ฆ„.
term

์ง์—ญ: ํ–‰๋ณตํ•œ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: ์‹ค๋ฌด ๊ณ ์ • ํ‘œํ˜„. success path๋ณด๋‹ค ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

The happy path works, but retries break it.

read path
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์„ ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์ฝ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: write path์™€ ๋‚˜๋ˆ ์„œ ์„ค๊ณ„ ์„ค๋ช…ํ•œ๋‹ค.

The read path hits Redis first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:jvm-memory-model

JVM Memory Model (happens-before)

When one thread's write becomes visible to another

Open deck
stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:mvcc

MVCC (Multi-Version Concurrency Control)

Snapshot isolation where reads and writes don't block each other

Open deck
heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

turns into
ํ•œ ๋ฌธ์ œ๊ฐ€ ๋‹ค๋ฅธ ๋ฌธ์ œ๋กœ ๋ฐ”๋€๋‹ค๋Š” ํ‘œํ˜„.
verb

์ง์—ญ: ~๋กœ ๋ณ€ํ•œ๋‹ค

๋‰˜์•™์Šค: scale/trade-off ์„ค๋ช…์— ์ข‹๋‹ค.

A local cache problem turns into a consistency problem.

concept:capacity-estimation

Back-of-the-Envelope Estimation

Estimating QPS, storage, and bandwidth in under a minute with powers of ten

Open deck
partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:vertical-vs-horizontal-scaling

Vertical vs Horizontal Scaling

One bigger box vs many boxes โ€” scale up first, shard last

Open deck
connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

load balancer
์š”์ฒญ์„ ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๋‚˜๋ˆ  ๋ณด๋‚ด๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ถ„์‚ฐ๊ธฐ

๋‰˜์•™์Šค: LB๋Š” scale๊ณผ availability์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์–ด.

The load balancer routes traffic to healthy instances.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

read-your-writes
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐฉ๊ธˆ ์“ด ๊ฐ’์„ ๋ฐ”๋กœ ๋‹ค์‹œ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๋ณด์žฅ.
term

์ง์—ญ: ๋‚ด๊ฐ€ ์“ด ๊ฒƒ์€ ๋‚ด๊ฐ€ ์ฝ๋Š”๋‹ค

๋‰˜์•™์Šค: replica๋ฅผ ์ฝ์œผ๋ฉด ๊นจ์งˆ ์ˆ˜ ์žˆ๋‹ค.

Route the user to primary when read-your-writes matters.

replication lag
primary์˜ ์ตœ์‹  ๋ณ€๊ฒฝ์ด replica์— ์•„์ง ๋„์ฐฉํ•˜์ง€ ์•Š์€ ์‹œ๊ฐ„์ฐจ.
term

์ง์—ญ: ๋ณต์ œ ์ง€์—ฐ

๋‰˜์•™์Šค: read-your-writes ๋ฌธ์ œ์™€ ์ง๊ฒฐ๋œ๋‹ค.

Replication lag can make a fresh write invisible.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:stateless-tier

Stateless App Tier

Externalize state so any instance can serve any request

Open deck
heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

load balancer
์š”์ฒญ์„ ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๋‚˜๋ˆ  ๋ณด๋‚ด๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ถ„์‚ฐ๊ธฐ

๋‰˜์•™์Šค: LB๋Š” scale๊ณผ availability์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์–ด.

The load balancer routes traffic to healthy instances.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:cache-write-patterns

Cache Write Patterns

cache-aside is the default; write-through/behind trade consistency for latency

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:topological-sort

Topological Sort

Linearize a DAG so every edge points forward (Kahn / DFS post-order)

Open deck
side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

concept:finite-state-machine

Finite State Machine Modeling

Model status as explicit states, transitions, and guards; reject illegal moves

Open deck
audit trail
๋ˆ„๊ฐ€ ์–ธ์ œ ๋ฌด์—‡์„ ๋ฐ”๊ฟจ๋Š”์ง€ ๋‚จ๊ธด ๊ธฐ๋ก.
term

์ง์—ญ: ๊ฐ์‚ฌ ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: history log๋ณด๋‹ค ํ›จ์”ฌ ์ž์—ฐ์Šค๋Ÿฌ์šด ์‹ค๋ฌด ํ‘œํ˜„.

Every state transition writes an audit trail.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

optimistic lock
์ถฉ๋Œ์ด ๋“œ๋ฌผ๋‹ค๊ณ  ๋ณด๊ณ  version check๋กœ ์ถฉ๋Œ ์‹œ ์‹คํŒจ์‹œํ‚ค๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‚™๊ด€์  ๋ฝ

๋‰˜์•™์Šค: hot row์—์„œ๋Š” retry storm์ด ๋‚  ์ˆ˜ ์žˆ๋‹ค.

Optimistic locking rejects stale writes.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

state machine
ํ—ˆ์šฉ๋œ ์ƒํƒœ์™€ ์ „์ด๋งŒ ์ •์˜ํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์ƒํƒœ ๊ธฐ๊ณ„

๋‰˜์•™์Šค: ๋ถˆ๋ฒ• ์ƒํƒœ๋ฅผ ๋ง‰๋Š” LLD/๋„๋ฉ”์ธ ํ•ต์‹ฌ.

A state machine rejects illegal transitions.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:integer-overflow-money

Integer Overflow & Money Precision

int/long overflow and the money-precision trap

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

saturation
CPU, pool, queue ๋“ฑ์ด ํ•œ๊ณ„์— ๊ฐ€๊นŒ์›Œ์ง„ ์ƒํƒœ.
term

์ง์—ญ: ํฌํ™”

๋‰˜์•™์Šค: ํฌํ™” ๊ทผ์ฒ˜์—์„œ latency๊ฐ€ ๊ธ‰๊ฒฉํžˆ ์˜ค๋ฅธ๋‹ค.

Latency spikes near saturation.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:amortized-analysis

Amortized Analysis

One op can be expensive, but averaged over the whole sequence it's cheap

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

tail latency
ํ‰๊ท  ๋’ค์— ์ˆจ์–ด ์žˆ๋Š” ๋А๋ฆฐ ์š”์ฒญ๋“ค์˜ ์ง€์—ฐ.
term

์ง์—ญ: ๊ผฌ๋ฆฌ ์ง€์—ฐ

๋‰˜์•™์Šค: p95/p99๋กœ ๋ณธ๋‹ค.

Tail latency dominates user experience.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:bucket-top-k

Bucketing / O(n) Top-K

Get top-K by frequency in O(n) using count buckets instead of sorting

Open deck
heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:consistency-models

Consistency Models

linearizable to eventual: what each guarantees and what it gives up

Open deck
eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

read-your-writes
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐฉ๊ธˆ ์“ด ๊ฐ’์„ ๋ฐ”๋กœ ๋‹ค์‹œ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๋ณด์žฅ.
term

์ง์—ญ: ๋‚ด๊ฐ€ ์“ด ๊ฒƒ์€ ๋‚ด๊ฐ€ ์ฝ๋Š”๋‹ค

๋‰˜์•™์Šค: replica๋ฅผ ์ฝ์œผ๋ฉด ๊นจ์งˆ ์ˆ˜ ์žˆ๋‹ค.

Route the user to primary when read-your-writes matters.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:failover-split-brain

Failover & Split-Brain

A partition can leave two leaders writing at once โ€” fencing tokens stop the double-write

Open deck
partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:delivery-semantics

Delivery Semantics

Message delivery guarantees: lose it, dupe it, or process it once

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

exactly-once
์ค‘๋ณต๋„ ์†์‹ค๋„ ์—†๊ฒŒ ๋ณด์ด๋„๋ก ๋งŒ๋“  ์ฒ˜๋ฆฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๋Œ€๊ฐœ ํ˜„์‹ค์—์„œ๋Š” ์ œํ•œ๋œ ๋ฒ”์œ„์˜ transaction/idempotency ์กฐํ•ฉ์ด๋‹ค.

Exactly-once is scoped, not magic.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:session-guarantees

Session Guarantees (Read-Your-Writes)

Four per-client guarantees layered on top of eventual consistency

Open deck
eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

read-your-writes
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐฉ๊ธˆ ์“ด ๊ฐ’์„ ๋ฐ”๋กœ ๋‹ค์‹œ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๋ณด์žฅ.
term

์ง์—ญ: ๋‚ด๊ฐ€ ์“ด ๊ฒƒ์€ ๋‚ด๊ฐ€ ์ฝ๋Š”๋‹ค

๋‰˜์•™์Šค: replica๋ฅผ ์ฝ์œผ๋ฉด ๊นจ์งˆ ์ˆ˜ ์žˆ๋‹ค.

Route the user to primary when read-your-writes matters.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:write-ahead-log

Write-Ahead Log (WAL)

Log the change before applying it โ€” the substrate for crash recovery and replication

Open deck
append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:replica-vs-shard

Read Replicas vs Partitioning vs Sharding

Scale reads with replicas, split big tables with partitions, exceed one node with shards

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

replication lag
primary์˜ ์ตœ์‹  ๋ณ€๊ฒฝ์ด replica์— ์•„์ง ๋„์ฐฉํ•˜์ง€ ์•Š์€ ์‹œ๊ฐ„์ฐจ.
term

์ง์—ญ: ๋ณต์ œ ์ง€์—ฐ

๋‰˜์•™์Šค: read-your-writes ๋ฌธ์ œ์™€ ์ง๊ฒฐ๋œ๋‹ค.

Replication lag can make a fresh write invisible.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:cascading-failures

Cascading Failures & Load Shedding

One slow dependency takes the whole system down โ€” and how to stop it

Open deck
backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

bulkhead
ํ•œ ์˜์—ญ ์žฅ์• ๊ฐ€ ๋‹ค๋ฅธ ์˜์—ญ์œผ๋กœ ๋ฒˆ์ง€์ง€ ์•Š๊ฒŒ ๋ฆฌ์†Œ์Šค๋ฅผ ๋ถ„๋ฆฌํ•˜๋Š” ํŒจํ„ด.
term

์ง์—ญ: ๊ฒฉ๋ฒฝ

๋‰˜์•™์Šค: thread pool, connection pool ๋ถ„๋ฆฌ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A bulkhead keeps the shipping API from exhausting checkout threads.

circuit breaker
์˜์กด์„ฑ์ด ๊ณ„์† ์‹คํŒจํ•˜๋ฉด ํ˜ธ์ถœ์„ ์ž ์‹œ ๋ง‰๊ณ  ๋น ๋ฅด๊ฒŒ ์‹คํŒจ์‹œํ‚ค๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์ฐจ๋‹จ๊ธฐ

๋‰˜์•™์Šค: ์ง‘ ์ „๊ธฐ ์ฐจ๋‹จ๊ธฐ ๋น„์œ  ๊ทธ๋Œ€๋กœ๋‹ค.

The circuit breaker opens after repeated failures.

connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

exponential backoff
์žฌ์‹œ๋„ ๊ฐ„๊ฒฉ์„ 1์ดˆ, 2์ดˆ, 4์ดˆ์ฒ˜๋Ÿผ ์ ์  ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ง€์ˆ˜ ๋ฐฑ์˜คํ”„

๋‰˜์•™์Šค: ์ฃฝ์–ด๊ฐ€๋Š” ์˜์กด์„ฑ์— ๋ถ€ํ•˜๋ฅผ ๋”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์“ด๋‹ค.

Retries use exponential backoff.

fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

load shedding
์‹œ์Šคํ…œ์„ ์‚ด๋ฆฌ๊ธฐ ์œ„ํ•ด ์ผ๋ถ€ ์š”์ฒญ์„ ์˜๋„์ ์œผ๋กœ ๊ฑฐ์ ˆํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ฒ„๋ฆฌ๊ธฐ

๋‰˜์•™์Šค: ๋ฌด์ž‘์ • ์ฒ˜๋ฆฌํ•˜๋ ค๋‹ค ์ „์ฒด๊ฐ€ ์ฃฝ๋Š” ๊ฒƒ์„ ๋ง‰๋Š”๋‹ค.

We shed low-priority traffic when the queue is almost full.

retry storm
์‹คํŒจํ•œ ์š”์ฒญ๋“ค์ด ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋ฉฐ ์žฅ์• ๋ฅผ ํ‚ค์šฐ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์žฌ์‹œ๋„ ํญํ’

๋‰˜์•™์Šค: ์žฅ์•  ๋Œ€์‘์—์„œ ์ž์ฃผ ๋‚˜์˜ค๋Š” ํ‘œํ˜„.

A retry storm overloaded the dependency.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:consistent-hashing

Consistent Hashing

A hash ring where adding/removing a node moves only ~1/N keys

Open deck
consistent hashing
๋…ธ๋“œ ์ถ”๊ฐ€/์ œ๊ฑฐ ์‹œ ์ผ๋ถ€ key๋งŒ ์ด๋™ํ•˜๊ฒŒ ํ•˜๋Š” ํ•ด์‹ฑ ๋ฐฉ์‹.
term

์ง์—ญ: ์ผ๊ด€ ํ•ด์‹ฑ

๋‰˜์•™์Šค: cache cluster, shard routing์—์„œ ๋‚˜์˜จ๋‹ค.

Consistent hashing limits key movement when nodes change.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:state-pattern

State Pattern

Encapsulate per-state behavior in objects so illegal transitions are blocked structurally at runtime

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

concept:transition-table

Enum + Transition Table

Declare valid transitions as data; reject everything else

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:factory-pattern

Factory / Factory Method

Hide object creation behind an interface so callers don't depend on concrete classes

Open deck
in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:design-for-testability

Designing for Testability

Seams and dependency injection to test logic without a real DB or network

Open deck
adapter
์™ธ๋ถ€ API๋‚˜ ๊ตฌํ˜„ ์ฐจ์ด๋ฅผ ๋‚ด๋ถ€ ๊ณ„์•ฝ์— ๋งž์ถฐ ๊ฐ์‹ธ๋Š” ๋ ˆ์ด์–ด.
term

์ง์—ญ: ์–ด๋Œ‘ํ„ฐ

๋‰˜์•™์Šค: ๊ต์ฒด ๊ฐ€๋Šฅ์„ฑ๊ณผ testability๋ฅผ ์–ป๋Š”๋‹ค.

The payment adapter hides provider-specific APIs.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:composition-over-inheritance

Composition over Inheritance

Assemble behavior by delegating to collaborators (has-a) instead of subclassing (is-a)

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:make-illegal-states-unrepresentable

Make Illegal States Unrepresentable

Use types and encapsulation so a wrong state can't be built

Open deck
append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

deserialization
byte/text๋ฅผ ๋‹ค์‹œ ๊ฐ์ฒด/๊ตฌ์กฐ๋กœ ์ฝ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์—ญ์ง๋ ฌํ™”

๋‰˜์•™์Šค: schema mismatch๊ฐ€ poison message๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

Deserialization failed after the schema change.

illegal state
๋„๋ฉ”์ธ ๊ทœ์น™์ƒ ์กด์žฌํ•˜๋ฉด ์•ˆ ๋˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ๋ฒ• ์ƒํƒœ

๋‰˜์•™์Šค: make illegal states unrepresentable ํ‘œํ˜„๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

The type model makes illegal states unrepresentable.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

mismatch
์„œ๋กœ ๋งž์•„์•ผ ํ•˜๋Š” ๊ฐ’์ด ๋งž์ง€ ์•Š๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ์ผ์น˜

๋‰˜์•™์Šค: reconciliation ๊ฒฐ๊ณผ๋ฅผ ๋ถ„๋ฅ˜ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The reconciler classifies amount mismatches as high severity.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:adapter-pattern

Adapter Pattern

Wrap an incompatible vendor interface so your code talks to one stable contract

Open deck
adapter
์™ธ๋ถ€ API๋‚˜ ๊ตฌํ˜„ ์ฐจ์ด๋ฅผ ๋‚ด๋ถ€ ๊ณ„์•ฝ์— ๋งž์ถฐ ๊ฐ์‹ธ๋Š” ๋ ˆ์ด์–ด.
term

์ง์—ญ: ์–ด๋Œ‘ํ„ฐ

๋‰˜์•™์Šค: ๊ต์ฒด ๊ฐ€๋Šฅ์„ฑ๊ณผ testability๋ฅผ ์–ป๋Š”๋‹ค.

The payment adapter hides provider-specific APIs.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

orchestration
์—ฌ๋Ÿฌ ๋‹จ๊ณ„, ๋„๊ตฌ, agent๋ฅผ ์ˆœ์„œ์™€ ์กฐ๊ฑด์— ๋งž์ถฐ ์šด์˜ํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜/์กฐ์œจ

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ '์—ฌ๋Ÿฌ agent'๊ฐ€ ์•„๋‹ˆ๋ผ ํ๋ฆ„ ์ œ์–ด๊ฐ€ ํ•ต์‹ฌ.

The orchestrator routes work to verifiers.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:when-not-to-pattern

When NOT to Apply a Pattern

A pattern is a cost โ€” abstract only when the seam is real

Open deck
by design
์šฐ์—ฐ์ด ์•„๋‹ˆ๋ผ ์˜๋„์ ์œผ๋กœ ๊ทธ๋ ‡๊ฒŒ ๋งŒ๋“  ๊ฒƒ.
phrase

์ง์—ญ: ์„ค๊ณ„์ƒ

๋‰˜์•™์Šค: ๊ฒฐํ•จ์ด ์•„๋‹ˆ๋ผ ์˜๋„๋œ trade-off์ž„์„ ๋งํ•  ๋•Œ ์œ ์šฉ.

The feed is eventually consistent by design.

concept:domain-modeling

Domain Modeling from Requirements

Turning a written requirement into objects and the invariants they protect

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

illegal state
๋„๋ฉ”์ธ ๊ทœ์น™์ƒ ์กด์žฌํ•˜๋ฉด ์•ˆ ๋˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ๋ฒ• ์ƒํƒœ

๋‰˜์•™์Šค: make illegal states unrepresentable ํ‘œํ˜„๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

The type model makes illegal states unrepresentable.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

concept:public-api-design

Designing a Public API / Method Signatures

A signature is a contract: naming, return vs throw, null, immutability, minimal surface

Open deck
invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:when-not-fancy-ds

When NOT to Use a Fancy Data Structure

When a plain array or HashMap beats the clever structure

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

benchmark
์„ฑ๋Šฅ/ํ’ˆ์งˆ์„ ๋น„๊ตํ•˜๊ธฐ ์œ„ํ•œ ํ‘œ์ค€ ๊ณผ์ œ๋‚˜ ์ธก์ •.
term

์ง์—ญ: ๋ฒค์น˜๋งˆํฌ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ… ๋ฌธ๋งฅ์—์„œ๋Š” ์‹ค์ œ ์‚ฌ์šฉ์„ฑ๊ณผ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ๋‹ค.

A benchmark is not the same as production quality.

cache miss
์บ์‹œ์— ์—†์–ด ์›๋ณธ ์ €์žฅ์†Œ๋กœ ๊ฐ€์•ผ ํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์บ์‹œ ๋ฏธ์Šค

๋‰˜์•™์Šค: miss๊ฐ€ ๋ชฐ๋ฆฌ๋ฉด DB๊ฐ€ ํ„ฐ์ง„๋‹ค.

Cache misses spike after TTL expiry.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:string-internals

String internals: immutability, intern pool, StringBuilder, compact strings, charset

Immutable String, intern pool, StringBuilder, compact strings, UTF-8 encoding bugs

Open deck
fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

on top of that
์ถ”๊ฐ€ ๊ทผ๊ฑฐ๋‚˜ ์กฐ๊ฑด์„ ๋ง๋ถ™์ผ ๋•Œ ์“ฐ๋Š” ์—ฐ๊ฒฐ ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ทธ ์œ„์— ์ถ”๊ฐ€๋กœ

๋‰˜์•™์Šค: also๋ณด๋‹ค ๋” ๋งํ•˜๋Š” ํ๋ฆ„์ด ์ข‹๋‹ค.

On top of that, I would add citation checks.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:generics

Java Generics: Erasure, PECS, Variance, Heap Pollution

Generics are a compile-time safety net; at runtime the type is erased

Open deck
by design
์šฐ์—ฐ์ด ์•„๋‹ˆ๋ผ ์˜๋„์ ์œผ๋กœ ๊ทธ๋ ‡๊ฒŒ ๋งŒ๋“  ๊ฒƒ.
phrase

์ง์—ญ: ์„ค๊ณ„์ƒ

๋‰˜์•™์Šค: ๊ฒฐํ•จ์ด ์•„๋‹ˆ๋ผ ์˜๋„๋œ trade-off์ž„์„ ๋งํ•  ๋•Œ ์œ ์šฉ.

The feed is eventually consistent by design.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:virtual-threads-structured-concurrency-c

Virtual Threads & Structured Concurrency

JVM-managed lightweight threads and the carrier-thread pinning trap

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:completablefuture-async-composition

CompletableFuture & async composition

Compose async stages, propagate exceptions, and pin executors explicitly

Open deck
fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:thread-lifecycle-daemon-threads-interrup

Thread Lifecycle, Daemon Threads & Interruption

Thread states, daemon threads, and stopping work cooperatively

Open deck
garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:outofmemoryerror-taxonomy

OutOfMemoryError Taxonomy

OOM is not one bug โ€” the message string is a map to the root cause

Open deck
garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

thread pool
์ž‘์—…์„ ์ฒ˜๋ฆฌํ•  worker thread ๋ฌถ์Œ.
term

์ง์—ญ: ์Šค๋ ˆ๋“œ ํ’€

๋‰˜์•™์Šค: ๋А๋ฆฐ ํ˜ธ์ถœ์ด ์Šค๋ ˆ๋“œ๋ฅผ ์žก๊ณ  ์žˆ์œผ๋ฉด ์ „์ฒด endpoint๊ฐ€ ๋ง‰ํžŒ๋‹ค.

Timeouts prevent thread pool exhaustion.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:profiling-observability

Profiling & Observability: async-profiler, Flame Graphs, JFR

Find JVM bottlenecks in production safely, via sampling

Open deck
connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

observability
์‹œ์Šคํ…œ ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ logs/metrics/traces๋กœ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ.
term

์ง์—ญ: ๊ด€์ธก ๊ฐ€๋Šฅ์„ฑ

๋‰˜์•™์Šค: monitoring๋ณด๋‹ค ๋„“๋‹ค.

Observability tells me why the request was slow.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:producer-consumer-fork-join-work-stealin

Producer-consumer, fork-join, work-stealing, ForkJoinPool / parallel streams pit

Decouple produce/consume with a queue; split divide-and-conquer onto a work-stealing pool โ€” but the shared ForkJoinPool and blocking I/O are traps

Open deck
backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

thread pool
์ž‘์—…์„ ์ฒ˜๋ฆฌํ•  worker thread ๋ฌถ์Œ.
term

์ง์—ญ: ์Šค๋ ˆ๋“œ ํ’€

๋‰˜์•™์Šค: ๋А๋ฆฐ ํ˜ธ์ถœ์ด ์Šค๋ ˆ๋“œ๋ฅผ ์žก๊ณ  ์žˆ์œผ๋ฉด ์ „์ฒด endpoint๊ฐ€ ๋ง‰ํžŒ๋‹ค.

Timeouts prevent thread pool exhaustion.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:coordination-primitives

Coordination primitives

Thread coordination tools: when to reach for which

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:equals-hashcode-comparable-comparator-co

equals / hashCode / Comparable / Comparator contracts

equals/hashCode are a pair; Comparable/Comparator order โ€” and TreeSet/TreeMap dedupe by compareTo, not equals

Open deck
in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:graceful-shutdown-lifecycle

Graceful Shutdown & Lifecycle

On a stop signal, finish in-flight work, then exit cleanly

Open deck
connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

load balancer
์š”์ฒญ์„ ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๋‚˜๋ˆ  ๋ณด๋‚ด๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ถ„์‚ฐ๊ธฐ

๋‰˜์•™์Šค: LB๋Š” scale๊ณผ availability์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์–ด.

The load balancer routes traffic to healthy instances.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:java-i-o-nio

Java I/O & NIO

Blocking streams vs non-blocking channels/selectors, buffers, backpressure

Open deck
backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:class-loading

Class Loading: Delegation, Static Init, NoClassDefFound

Parent delegation, classloaders, static init order, and the two "class missing" errors

Open deck
trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:jit-compilation

JIT compilation: C1/C2 tiers, warmup, inlining, deoptimization, escape analysis

How HotSpot profiles bytecode and compiles only the hot paths to native

Open deck
garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:microbenchmarking-with-jmh

Microbenchmarking with JMH: dead-code elimination, warmup, fork isolation

Why JMH stops the JIT from lying so you measure real nanoseconds

Open deck
benchmark
์„ฑ๋Šฅ/ํ’ˆ์งˆ์„ ๋น„๊ตํ•˜๊ธฐ ์œ„ํ•œ ํ‘œ์ค€ ๊ณผ์ œ๋‚˜ ์ธก์ •.
term

์ง์—ญ: ๋ฒค์น˜๋งˆํฌ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ… ๋ฌธ๋งฅ์—์„œ๋Š” ์‹ค์ œ ์‚ฌ์šฉ์„ฑ๊ณผ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ๋‹ค.

A benchmark is not the same as production quality.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:object-lifecycle-references

Object lifecycle & references: strong/soft/weak/phantom, finalizers, Cleaner

Reference strength drives GC reachability โ€” finalizers are dead, Cleaner is the replacement

Open deck
by design
์šฐ์—ฐ์ด ์•„๋‹ˆ๋ผ ์˜๋„์ ์œผ๋กœ ๊ทธ๋ ‡๊ฒŒ ๋งŒ๋“  ๊ฒƒ.
phrase

์ง์—ญ: ์„ค๊ณ„์ƒ

๋‰˜์•™์Šค: ๊ฒฐํ•จ์ด ์•„๋‹ˆ๋ผ ์˜๋„๋œ trade-off์ž„์„ ๋งํ•  ๋•Œ ์œ ์šฉ.

The feed is eventually consistent by design.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:streams-api-functional-java

Streams API & Functional Java

Lazy pipelines, stateless ops, side-effect-free collectors

Open deck
race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:time-ordering

Time & ordering: nanoTime vs currentTimeMillis

Monotonic clock for durations, wall clock for timestamps

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:two-phase-commit-distributed-transaction

Two-phase commit / distributed transactions and why to avoid them

Distributed-txn 2PC: coordinator crash = blocking locks forever, so avoid it

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

happy path
๋ชจ๋“  ๊ฒƒ์ด ์ •์ƒ์ ์œผ๋กœ ๋˜๋Š” ๊ธฐ๋ณธ ์„ฑ๊ณต ํ๋ฆ„.
term

์ง์—ญ: ํ–‰๋ณตํ•œ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: ์‹ค๋ฌด ๊ณ ์ • ํ‘œํ˜„. success path๋ณด๋‹ค ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

The happy path works, but retries break it.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

saga
์—ฌ๋Ÿฌ ๋กœ์ปฌ ํŠธ๋žœ์žญ์…˜๊ณผ ๋ณด์ƒ ์ž‘์—…์œผ๋กœ ๊ธด workflow๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์‚ฌ๊ฐ€

๋‰˜์•™์Šค: ๋ถ„์‚ฐ ํŠธ๋žœ์žญ์…˜ ๋Œ€์‹  ์“ด๋‹ค.

The payment workflow is modeled as a saga.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:database-backup-pitr-and-failover-promot

Database backup, PITR, and failover/promotion of replicas

Backups protect data, PITR rewinds to a point in time, replica promotion survives failure

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:cdn-edge-caching-layer-cache-control-eta

CDN / edge caching + Cache-Control & ETag

The outermost rung of the caching ladder: HTTP headers that let the browser and CDN hold the response

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

not free
์ข‹์•„ ๋ณด์ด๋Š” ์„ ํƒ์—๋„ ๋น„์šฉ์ด ์žˆ๋‹ค๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ณต์งœ๊ฐ€ ์•„๋‹ˆ๋‹ค

๋‰˜์•™์Šค: ์งง๊ณ  ์ž์—ฐ์Šค๋Ÿฌ์šด trade-off ๋ฌธ์žฅ.

Caching is not free; it introduces staleness.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:denormalization-materialized-views-read

Denormalization / Materialized Views / Read Models (CQRS-lite)

A read-only model precomputed and stored to make reads fast

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

materialized view
๋ฏธ๋ฆฌ ๊ณ„์‚ฐํ•ด ์ €์žฅํ•ด๋‘” ์ฝ๊ธฐ์šฉ ๊ฒฐ๊ณผ.
term

์ง์—ญ: ๋ฌผ๋ฆฌํ™”๋œ ๋ทฐ

๋‰˜์•™์Šค: ์ฝ๊ธฐ๋Š” ๋นจ๋ผ์ง€์ง€๋งŒ refresh/write ๋น„์šฉ์ด ์ƒ๊ธด๋‹ค.

A materialized view precomputes the dashboard totals.

mismatch
์„œ๋กœ ๋งž์•„์•ผ ํ•˜๋Š” ๊ฐ’์ด ๋งž์ง€ ์•Š๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ์ผ์น˜

๋‰˜์•™์Šค: reconciliation ๊ฒฐ๊ณผ๋ฅผ ๋ถ„๋ฅ˜ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The reconciler classifies amount mismatches as high severity.

read path
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์„ ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์ฝ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: write path์™€ ๋‚˜๋ˆ ์„œ ์„ค๊ณ„ ์„ค๋ช…ํ•œ๋‹ค.

The read path hits Redis first.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

strong consistency
์ฝ๊ธฐ๊ฐ€ ํ•ญ์ƒ ์ตœ์‹  ์“ฐ๊ธฐ๋ฅผ ๋ฐ˜์˜ํ•˜๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ๊ฐ•ํ•œ ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: latency/availability ๋น„์šฉ์„ ๋‚ธ๋‹ค.

We choose strong consistency for account balances.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:saga-orchestration-vs-choreography-axis

Saga: Orchestration vs Choreography

Drive steps from a central coordinator, or let services react to events

Open deck
compensation
์ด๋ฏธ ์„ฑ๊ณตํ•œ ๋‹จ๊ณ„๋ฅผ ๋˜๋Œ๋ฆฌ๊ธฐ ์œ„ํ•œ ๋ฐ˜๋Œ€ ์ž‘์—….
term

์ง์—ญ: ๋ณด์ƒ

๋‰˜์•™์Šค: Saga์—์„œ rollback ๋Œ€์‹  ์“ฐ๋Š” ๊ฐœ๋….

If shipment fails, the saga runs compensation.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

observability
์‹œ์Šคํ…œ ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ logs/metrics/traces๋กœ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ.
term

์ง์—ญ: ๊ด€์ธก ๊ฐ€๋Šฅ์„ฑ

๋‰˜์•™์Šค: monitoring๋ณด๋‹ค ๋„“๋‹ค.

Observability tells me why the request was slow.

orchestration
์—ฌ๋Ÿฌ ๋‹จ๊ณ„, ๋„๊ตฌ, agent๋ฅผ ์ˆœ์„œ์™€ ์กฐ๊ฑด์— ๋งž์ถฐ ์šด์˜ํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜/์กฐ์œจ

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ '์—ฌ๋Ÿฌ agent'๊ฐ€ ์•„๋‹ˆ๋ผ ํ๋ฆ„ ์ œ์–ด๊ฐ€ ํ•ต์‹ฌ.

The orchestrator routes work to verifiers.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

saga
์—ฌ๋Ÿฌ ๋กœ์ปฌ ํŠธ๋žœ์žญ์…˜๊ณผ ๋ณด์ƒ ์ž‘์—…์œผ๋กœ ๊ธด workflow๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์‚ฌ๊ฐ€

๋‰˜์•™์Šค: ๋ถ„์‚ฐ ํŠธ๋žœ์žญ์…˜ ๋Œ€์‹  ์“ด๋‹ค.

The payment workflow is modeled as a saga.

concept:batch-vs-stream-processing-as-a-decision

Batch vs Stream: the decision + stream primitives

When batch is enough, when you actually need a stream โ€” and the primitives (watermarks, out-of-order, checkpoints) that make streams correct

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

exactly-once
์ค‘๋ณต๋„ ์†์‹ค๋„ ์—†๊ฒŒ ๋ณด์ด๋„๋ก ๋งŒ๋“  ์ฒ˜๋ฆฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๋Œ€๊ฐœ ํ˜„์‹ค์—์„œ๋Š” ์ œํ•œ๋œ ๋ฒ”์œ„์˜ transaction/idempotency ์กฐํ•ฉ์ด๋‹ค.

Exactly-once is scoped, not magic.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

out-of-order
๋‚˜์ค‘ ์ด๋ฒคํŠธ๊ฐ€ ๋จผ์ € ๋„์ฐฉํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์ˆœ์„œ๊ฐ€ ๋’ค๋ฐ”๋€

๋‰˜์•™์Šค: event version/state machine์œผ๋กœ ๋ง‰๋Š”๋‹ค.

The cancel event arrived out-of-order.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:pacelc-framed-honestly

PACELC framed honestly

Even with no partition, you still trade latency vs consistency

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

isolation level
๋™์‹œ ํŠธ๋žœ์žญ์…˜์ด ์„œ๋กœ๋ฅผ ์–ผ๋งˆ๋‚˜ ๋ณด๊ฒŒ ํ• ์ง€ ์ •ํ•œ DB ๊ทœ์น™.
term

์ง์—ญ: ๊ฒฉ๋ฆฌ ์ˆ˜์ค€

๋‰˜์•™์Šค: READ COMMITTED, REPEATABLE READ, SERIALIZABLE ๊ฐ™์€ ๊ฒƒ.

The isolation level controls which anomalies are possible.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

tail latency
ํ‰๊ท  ๋’ค์— ์ˆจ์–ด ์žˆ๋Š” ๋А๋ฆฐ ์š”์ฒญ๋“ค์˜ ์ง€์—ฐ.
term

์ง์—ญ: ๊ผฌ๋ฆฌ ์ง€์—ฐ

๋‰˜์•™์Šค: p95/p99๋กœ ๋ณธ๋‹ค.

Tail latency dominates user experience.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:bloom-filters-probabilistic-structures-f

Bloom Filters & Probabilistic Dedup / Negative Caching

A probabilistic set that cheaply proves "definitely not here" to skip the DB

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:value-objects-vs-entities

Value objects vs entities (identity vs equality, immutability)

Entities are equal by identity; value objects are equal by their attributes

Open deck
mismatch
์„œ๋กœ ๋งž์•„์•ผ ํ•˜๋Š” ๊ฐ’์ด ๋งž์ง€ ์•Š๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ์ผ์น˜

๋‰˜์•™์Šค: reconciliation ๊ฒฐ๊ณผ๋ฅผ ๋ถ„๋ฅ˜ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The reconciler classifies amount mismatches as high severity.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stable key
์žฌ์‹œ๋„ํ•ด๋„ ๋ณ€ํ•˜์ง€ ์•Š๋Š” dedup/idempotency ๊ธฐ์ค€๊ฐ’.
term

์ง์—ญ: ์•ˆ์ •์ ์ธ ํ‚ค

๋‰˜์•™์Šค: ๋งค๋ฒˆ ์ƒˆ๋กœ ๋งŒ๋“ค๋ฉด ๋ฉฑ๋“ฑ์„ฑ์ด ๊นจ์ง„๋‹ค.

The idempotency key must be stable across retries.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:equals-hashcode-comparable-correctness

equals/hashCode/Comparable correctness (and Comparator.comparing)

The contract you must honor when you define what "equal" means for your objects

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:exception-design

Exception Design: Checked vs Unchecked, IllegalArgument vs IllegalState, Custom

Exceptions split by whether the caller can recover, and by input vs state vs domain meaning

Open deck
in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:interface-vs-abstract-class

Interface vs abstract class โ€” when to use each

"What it can do (contract)" vs "what it is (shared base)"

Open deck
in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:aggregate-roots-boundaries-and-consisten

Aggregate Roots & Consistency Boundaries

The object cluster you keep invariant in one transaction

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

deadlock
์„œ๋กœ ์ƒ๋Œ€๊ฐ€ ๊ฐ€์ง„ ์ž์›์„ ๊ธฐ๋‹ค๋ ค ์˜์›ํžˆ ์ง„ํ–‰ ๋ชป ํ•˜๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๊ต์ฐฉ ์ƒํƒœ

๋‰˜์•™์Šค: ์ž ๊ธˆ ์ˆœ์„œ ํ†ต์ผ์ด ๋Œ€ํ‘œ ํ•ด๋ฒ•.

Locking rows in different orders caused a deadlock.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

optimistic lock
์ถฉ๋Œ์ด ๋“œ๋ฌผ๋‹ค๊ณ  ๋ณด๊ณ  version check๋กœ ์ถฉ๋Œ ์‹œ ์‹คํŒจ์‹œํ‚ค๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‚™๊ด€์  ๋ฝ

๋‰˜์•™์Šค: hot row์—์„œ๋Š” retry storm์ด ๋‚  ์ˆ˜ ์žˆ๋‹ค.

Optimistic locking rejects stale writes.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

saga
์—ฌ๋Ÿฌ ๋กœ์ปฌ ํŠธ๋žœ์žญ์…˜๊ณผ ๋ณด์ƒ ์ž‘์—…์œผ๋กœ ๊ธด workflow๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์‚ฌ๊ฐ€

๋‰˜์•™์Šค: ๋ถ„์‚ฐ ํŠธ๋žœ์žญ์…˜ ๋Œ€์‹  ์“ด๋‹ค.

The payment workflow is modeled as a saga.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

strong consistency
์ฝ๊ธฐ๊ฐ€ ํ•ญ์ƒ ์ตœ์‹  ์“ฐ๊ธฐ๋ฅผ ๋ฐ˜์˜ํ•˜๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ๊ฐ•ํ•œ ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: latency/availability ๋น„์šฉ์„ ๋‚ธ๋‹ค.

We choose strong consistency for account balances.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:facade-dispatcher

Facade / Dispatcher (single thin entry point coordinating subsystems)

One thin entry point that coordinates several subsystems

Open deck
compensation
์ด๋ฏธ ์„ฑ๊ณตํ•œ ๋‹จ๊ณ„๋ฅผ ๋˜๋Œ๋ฆฌ๊ธฐ ์œ„ํ•œ ๋ฐ˜๋Œ€ ์ž‘์—….
term

์ง์—ญ: ๋ณด์ƒ

๋‰˜์•™์Šค: Saga์—์„œ rollback ๋Œ€์‹  ์“ฐ๋Š” ๊ฐœ๋….

If shipment fails, the saga runs compensation.

exactly-once
์ค‘๋ณต๋„ ์†์‹ค๋„ ์—†๊ฒŒ ๋ณด์ด๋„๋ก ๋งŒ๋“  ์ฒ˜๋ฆฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๋Œ€๊ฐœ ํ˜„์‹ค์—์„œ๋Š” ์ œํ•œ๋œ ๋ฒ”์œ„์˜ transaction/idempotency ์กฐํ•ฉ์ด๋‹ค.

Exactly-once is scoped, not magic.

gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

transaction boundary
๋ฌด์—‡๊นŒ์ง€ ํ•œ ์ปค๋ฐ‹์œผ๋กœ ๋ฌถ์„์ง€ ์ •ํ•œ ์„ .
term

์ง์—ญ: ํŠธ๋žœ์žญ์…˜ ๊ฒฝ๊ณ„

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ๋„“์œผ๋ฉด lock์ด ๊ธธ๊ณ , ๋„ˆ๋ฌด ์ข์œผ๋ฉด ๋ฐ˜์ชฝ ์ƒํƒœ๊ฐ€ ์ƒ๊ธด๋‹ค.

I would keep the state change and audit insert in one transaction boundary.

concept:template-method

Template Method (shared workflow with site/region override points)

Parent owns the skeleton; each site overrides only what differs

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:observer-pub-sub

Observer / Pub-Sub (realtime board updates, decoupled event consumers)

One state change, many decoupled consumers notified loosely

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

exactly-once
์ค‘๋ณต๋„ ์†์‹ค๋„ ์—†๊ฒŒ ๋ณด์ด๋„๋ก ๋งŒ๋“  ์ฒ˜๋ฆฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๋Œ€๊ฐœ ํ˜„์‹ค์—์„œ๋Š” ์ œํ•œ๋œ ๋ฒ”์œ„์˜ transaction/idempotency ์กฐํ•ฉ์ด๋‹ค.

Exactly-once is scoped, not magic.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:command-pattern

Command pattern (transition carrying actorId + reason + idempotencyKey)

Model a state transition as a Command object carrying who, why, and dedup key

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

audit trail
๋ˆ„๊ฐ€ ์–ธ์ œ ๋ฌด์—‡์„ ๋ฐ”๊ฟจ๋Š”์ง€ ๋‚จ๊ธด ๊ธฐ๋ก.
term

์ง์—ญ: ๊ฐ์‚ฌ ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: history log๋ณด๋‹ค ํ›จ์”ฌ ์ž์—ฐ์Šค๋Ÿฌ์šด ์‹ค๋ฌด ํ‘œํ˜„.

Every state transition writes an audit trail.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

state machine
ํ—ˆ์šฉ๋œ ์ƒํƒœ์™€ ์ „์ด๋งŒ ์ •์˜ํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์ƒํƒœ ๊ธฐ๊ณ„

๋‰˜์•™์Šค: ๋ถˆ๋ฒ• ์ƒํƒœ๋ฅผ ๋ง‰๋Š” LLD/๋„๋ฉ”์ธ ํ•ต์‹ฌ.

A state machine rejects illegal transitions.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:refactoring-to-patterns-code-smells

Refactoring to Patterns / Code Smells

Spotting code smells and refactoring toward patterns in small, safe steps

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

by design
์šฐ์—ฐ์ด ์•„๋‹ˆ๋ผ ์˜๋„์ ์œผ๋กœ ๊ทธ๋ ‡๊ฒŒ ๋งŒ๋“  ๊ฒƒ.
phrase

์ง์—ญ: ์„ค๊ณ„์ƒ

๋‰˜์•™์Šค: ๊ฒฐํ•จ์ด ์•„๋‹ˆ๋ผ ์˜๋„๋œ trade-off์ž„์„ ๋งํ•  ๋•Œ ์œ ์šฉ.

The feed is eventually consistent by design.

chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:dry-yagni-kiss

DRY, YAGNI, KISS โ€” and when DRY is wrong

Removing duplication vs guessing the future vs staying simple โ€” and when DRY backfires

Open deck
source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

concept:decorator-pattern

Decorator pattern (layering retry/logging/caching around a provider)

Wrap the same interface to stack cross-cutting behavior one layer at a time

Open deck
cache miss
์บ์‹œ์— ์—†์–ด ์›๋ณธ ์ €์žฅ์†Œ๋กœ ๊ฐ€์•ผ ํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์บ์‹œ ๋ฏธ์Šค

๋‰˜์•™์Šค: miss๊ฐ€ ๋ชฐ๋ฆฌ๋ฉด DB๊ฐ€ ํ„ฐ์ง„๋‹ค.

Cache misses spike after TTL expiry.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

retry storm
์‹คํŒจํ•œ ์š”์ฒญ๋“ค์ด ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋ฉฐ ์žฅ์• ๋ฅผ ํ‚ค์šฐ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์žฌ์‹œ๋„ ํญํ’

๋‰˜์•™์Šค: ์žฅ์•  ๋Œ€์‘์—์„œ ์ž์ฃผ ๋‚˜์˜ค๋Š” ํ‘œํ˜„.

A retry storm overloaded the dependency.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

turns into
ํ•œ ๋ฌธ์ œ๊ฐ€ ๋‹ค๋ฅธ ๋ฌธ์ œ๋กœ ๋ฐ”๋€๋‹ค๋Š” ํ‘œํ˜„.
verb

์ง์—ญ: ~๋กœ ๋ณ€ํ•œ๋‹ค

๋‰˜์•™์Šค: scale/trade-off ์„ค๋ช…์— ์ข‹๋‹ค.

A local cache problem turns into a consistency problem.

concept:class-sequence-diagram-fluency

Class/sequence diagram fluency (UML-lite on a whiteboard)

Sketching structure and call flow fast with boxes and arrows on a whiteboard

Open deck
eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:builder-pattern

Builder pattern (Offer/Request objects)

Assemble complex immutable objects step by step without constructor explosion

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

concept:singleton

Singleton โ€” code smell & testability hazard

One global instance โ€” convenient, but it wrecks testing and concurrency

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:law-of-demeter-tell-don-t-ask

Law of Demeter / tell-don't-ask

Talk only to your immediate neighbors, and tell objects what to do instead of asking for their guts

Open deck
N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:union-find-disjoint-set-union-with-path

Union-Find / Disjoint Set Union (path compression + union by rank)

Merge sets and answer "same group?" in near-O(1)

Open deck
trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:trie-for-prefix-search-autocomplete

Trie (prefix tree) for prefix search / autocomplete

A char-by-char tree that makes prefix lookup fast

Open deck
CDC
DB ๋ณ€๊ฒฝ ๋กœ๊ทธ๋ฅผ ์ฝ์–ด downstream์œผ๋กœ ๋ณด๋‚ด๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋ณ€๊ฒฝ ๋ฐ์ดํ„ฐ ์บก์ฒ˜

๋‰˜์•™์Šค: outbox relay ๊ตฌํ˜„์— ์ž์ฃผ ์“ด๋‹ค.

CDC streams outbox rows to Kafka.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:time-based-key-value-store

Time-Based Key-Value Store (LC 981)

Per-key versioned values; get does a floor binary search over timestamps

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:linkedlist-mechanics

LinkedList Mechanics

Reversal, Floyd cycle detection, dummy-head, pointer surgery

Open deck
edge case
๋ณดํ†ต ํ๋ฆ„์ด ์•„๋‹Œ ๊ฒฝ๊ณ„/์˜ˆ์™ธ ์ƒํ™ฉ.
term

์ง์—ญ: ๊ฐ€์žฅ์ž๋ฆฌ ๊ฒฝ์šฐ

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ๋Š” happy path์™€ ๋Œ€๋น„ํ•ด์„œ ๋งํ•œ๋‹ค.

I would test the timeout edge case separately.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:bst-balanced-bst

BST / balanced BST (TreeMap/TreeSet)

Order-keeping map/set โ€” floor/ceiling/range in O(log n)

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

cache miss
์บ์‹œ์— ์—†์–ด ์›๋ณธ ์ €์žฅ์†Œ๋กœ ๊ฐ€์•ผ ํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์บ์‹œ ๋ฏธ์Šค

๋‰˜์•™์Šค: miss๊ฐ€ ๋ชฐ๋ฆฌ๋ฉด DB๊ฐ€ ํ„ฐ์ง„๋‹ค.

Cache misses spike after TTL expiry.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:grid-matrix-bfs-dfs-connected-components

Grid BFS/DFS & Number of Islands

Treat a 2D grid as a graph and count connected blobs (islands) by flood fill

Open deck
fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

concept:string-algorithms

String Algorithms

Tokenizing/parsing, StringBuilder vs concat O(n^2), char-count maps

Open deck
comes down to
ํ•ต์‹ฌ์ด ๊ฒฐ๊ตญ ๋ฌด์—‡์ธ์ง€ ์••์ถ•ํ•˜๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ฒฐ๊ตญ ~๋กœ ๋‚ด๋ ค์˜จ๋‹ค

๋‰˜์•™์Šค: ๊ฒฐ๋ก ์„ ๋‹จ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

This comes down to the transaction boundary.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

concept:prefix-sums-running-aggregates

Prefix sums / running aggregates (and difference arrays)

One O(n) pass each way: range-sum query in O(1), range-update in O(1)

Open deck
N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:merge-k-sorted-lists-streams

Merge K sorted lists/streams (heap-based merge)

Merging K already-sorted streams into one sorted output with a min-heap

Open deck
edge case
๋ณดํ†ต ํ๋ฆ„์ด ์•„๋‹Œ ๊ฒฝ๊ณ„/์˜ˆ์™ธ ์ƒํ™ฉ.
term

์ง์—ญ: ๊ฐ€์žฅ์ž๋ฆฌ ๊ฒฝ์šฐ

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ๋Š” happy path์™€ ๋Œ€๋น„ํ•ด์„œ ๋งํ•œ๋‹ค.

I would test the timeout edge case separately.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:monotonic-stack-awareness

Monotonic stack awareness

Recognizing the monotonic-stack pattern for "next greater/smaller" in O(n)

Open deck
invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:in-memory-model-persistence-handoff

In-memory model -> persistence handoff

Moving a Map prototype to a Postgres repo: picking the index / composite key

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

handoff
ํ•œ agent/์„œ๋น„์Šค/์‚ฌ๋žŒ์ด ๋‹ค๋ฅธ ์ฃผ์ฒด์—๊ฒŒ ์ž‘์—…์„ ๋„˜๊ธฐ๋Š” ์ง€์ .
term

์ง์—ญ: ์ธ๊ณ„

๋‰˜์•™์Šค: handoff์—์„œ context loss๊ฐ€ ์ž์ฃผ ์ƒ๊ธด๋‹ค.

The handoff includes the artifact and trace.

index scan
ํ…Œ์ด๋ธ” ์ „์ฒด๊ฐ€ ์•„๋‹ˆ๋ผ ์ธ๋ฑ์Šค๋ฅผ ํƒ€๊ณ  ์ฐพ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ธ๋ฑ์Šค ์Šค์บ”

๋‰˜์•™์Šค: ํ•ญ์ƒ ์ข‹์€ ๊ฒƒ์€ ์•„๋‹ˆ๊ณ  ์„ ํƒ๋„๊ฐ€ ์ค‘์š”ํ•˜๋‹ค.

The query switches from seq scan to index scan.

sequential scan
ํ…Œ์ด๋ธ”์„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ฝ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ˆœ์ฐจ ์Šค์บ”

๋‰˜์•™์Šค: ์ž‘์€ ํ…Œ์ด๋ธ”์—์„œ๋Š” ๊ดœ์ฐฎ์ง€๋งŒ ํฐ ํ…Œ์ด๋ธ”์—์„œ ์œ„ํ—˜.

EXPLAIN showed a sequential scan over ten million rows.

concept:advanced-graph

Advanced graph: Dijkstra / shortest-path, MST (Prim/Kruskal), A*

When to use weighted shortest path (Dijkstra/A*) vs minimum spanning tree (Prim/Kruskal)

Open deck
heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

concept:segment-tree-fenwick-for-range-queries-u

Segment tree / Fenwick (BIT) for range queries + updates

Range sum + point update in O(log n): when BIT, when segment tree

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:quickselect-median-of-medians-for-o-kth

Quickselect / median-of-medians for O(n) Kth-element

Partition-based selection that finds the Kth element in average O(n) without full sorting

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

the catch is
๊ฒ‰๋ณด๊ธฐ์—” ์ข‹์•„ ๋ณด์ด๋‚˜ ์ˆจ์–ด ์žˆ๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ๋‹ค๋Š” ๋ง.
phrase

์ง์—ญ: ํ•จ์ •์€

๋‰˜์•™์Šค: trade-off ์†Œ๊ฐœ์— ์ข‹๋‹ค.

The catch is that the cache can become stale.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:bit-manipulation

Bit Manipulation: Masks, XOR, Single-Number, Power-of-Two

Bit ops give O(1)-space toggling, set membership, and pair cancellation

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:logical-vs-physical-replication-cdc

Logical vs physical replication / CDC

Byte-level copy vs a row-level change stream you can consume

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

CDC
DB ๋ณ€๊ฒฝ ๋กœ๊ทธ๋ฅผ ์ฝ์–ด downstream์œผ๋กœ ๋ณด๋‚ด๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋ณ€๊ฒฝ ๋ฐ์ดํ„ฐ ์บก์ฒ˜

๋‰˜์•™์Šค: outbox relay ๊ตฌํ˜„์— ์ž์ฃผ ์“ด๋‹ค.

CDC streams outbox rows to Kafka.

exactly-once
์ค‘๋ณต๋„ ์†์‹ค๋„ ์—†๊ฒŒ ๋ณด์ด๋„๋ก ๋งŒ๋“  ์ฒ˜๋ฆฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๋Œ€๊ฐœ ํ˜„์‹ค์—์„œ๋Š” ์ œํ•œ๋œ ๋ฒ”์œ„์˜ transaction/idempotency ์กฐํ•ฉ์ด๋‹ค.

Exactly-once is scoped, not magic.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:two-phase-commit-and-its-blocking-coordi

Two-phase commit (2PC)

Commits a transaction across nodes atomically in two phases โ€” but it blocks if the coordinator dies

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

saga
์—ฌ๋Ÿฌ ๋กœ์ปฌ ํŠธ๋žœ์žญ์…˜๊ณผ ๋ณด์ƒ ์ž‘์—…์œผ๋กœ ๊ธด workflow๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์‚ฌ๊ฐ€

๋‰˜์•™์Šค: ๋ถ„์‚ฐ ํŠธ๋žœ์žญ์…˜ ๋Œ€์‹  ์“ด๋‹ค.

The payment workflow is modeled as a saga.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:conflict-resolution

Conflict resolution: LWW, vector clocks, CRDTs

Three ways to resolve concurrent-write conflicts: simplicity, causality, automatic merge

Open deck
idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

optimistic lock
์ถฉ๋Œ์ด ๋“œ๋ฌผ๋‹ค๊ณ  ๋ณด๊ณ  version check๋กœ ์ถฉ๋Œ ์‹œ ์‹คํŒจ์‹œํ‚ค๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‚™๊ด€์  ๋ฝ

๋‰˜์•™์Šค: hot row์—์„œ๋Š” retry storm์ด ๋‚  ์ˆ˜ ์žˆ๋‹ค.

Optimistic locking rejects stale writes.

pessimistic lock
์ถฉ๋Œ์ด ๋‚  ๊ฒƒ์ด๋ผ ๋ณด๊ณ  ๋จผ์ € lock์„ ์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ๊ฒŒ ํ•˜๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋น„๊ด€์  ๋ฝ

๋‰˜์•™์Šค: SELECT FOR UPDATE๋กœ ๋งŽ์ด ์„ค๋ช…ํ•œ๋‹ค.

Pessimistic locking serializes access to the row.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

serialization
๊ฐ์ฒด/๋ฐ์ดํ„ฐ๋ฅผ ์ „์†ก ๊ฐ€๋Šฅํ•œ byte/text ํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์ง๋ ฌํ™”

๋‰˜์•™์Šค: JSON encoding๋„ serialization์ด๋‹ค.

Serialization adds latency to every response.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:consensus

Consensus: Raft (and Paxos at a high level)

One leader replicates a log; terms fence off split-brain.

Open deck
garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

state machine
ํ—ˆ์šฉ๋œ ์ƒํƒœ์™€ ์ „์ด๋งŒ ์ •์˜ํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์ƒํƒœ ๊ธฐ๊ณ„

๋‰˜์•™์Šค: ๋ถˆ๋ฒ• ์ƒํƒœ๋ฅผ ๋ง‰๋Š” LLD/๋„๋ฉ”์ธ ํ•ต์‹ฌ.

A state machine rejects illegal transitions.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:failure-detection

Failure detection: heartbeats, timeouts, phi-accrual, and false positives

Telling a dead node apart from a slow one

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

leader election
์—ฌ๋Ÿฌ ๋…ธ๋“œ ์ค‘ ํ•˜๋‚˜๋งŒ leader๋กœ ์ •ํ•˜๋Š” ์ ˆ์ฐจ.
term

์ง์—ญ: ๋ฆฌ๋” ์„ ์ถœ

๋‰˜์•™์Šค: ๋ฐฐ์น˜, lock, consensus์—์„œ ๋‚˜์˜จ๋‹ค.

Leader election ensures only one worker runs the job.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

SLO
ํŒ€ ๋‚ด๋ถ€ ์‹ ๋ขฐ์„ฑ ๋ชฉํ‘œ.
term

์ง์—ญ: ์„œ๋น„์Šค ๋ชฉํ‘œ

๋‰˜์•™์Šค: SLA๋Š” ์™ธ๋ถ€ ๊ณ„์•ฝ, SLI๋Š” ์ธก์ • ์ง€ํ‘œ.

The SLO defines the latency target.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:hot-keys-cache-penetration-and-negative

Hot keys, cache penetration, and negative caching

One key overloaded, missing keys hammering the DB, and caching the empty result

Open deck
append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

hot key
์š”์ฒญ์ด ํ•œ ํ‚ค/ํŒŒํ‹ฐ์…˜์— ๊ณผ๋„ํ•˜๊ฒŒ ๋ชฐ๋ฆฌ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋œจ๊ฑฐ์šด ํ‚ค

๋‰˜์•™์Šค: cache, Redis, Kafka, DynamoDB์—์„œ ์ž์ฃผ ๋ฌธ์ œ ๋œ๋‹ค.

A viral listing becomes a hot key.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

read path
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์„ ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์ฝ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: write path์™€ ๋‚˜๋ˆ ์„œ ์„ค๊ณ„ ์„ค๋ช…ํ•œ๋‹ค.

The read path hits Redis first.

replication lag
primary์˜ ์ตœ์‹  ๋ณ€๊ฒฝ์ด replica์— ์•„์ง ๋„์ฐฉํ•˜์ง€ ์•Š์€ ์‹œ๊ฐ„์ฐจ.
term

์ง์—ญ: ๋ณต์ œ ์ง€์—ฐ

๋‰˜์•™์Šค: read-your-writes ๋ฌธ์ œ์™€ ์ง๊ฒฐ๋œ๋‹ค.

Replication lag can make a fresh write invisible.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:clocks

Clocks: NTP drift & Lamport

Why you can't order events by wall-clock time

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

concept:backups-pitr-and-rpo-rto

Backups, PITR, and RPO/RTO

Backup types and committing to a recovery point/time as numbers

Open deck
at scale
์ž‘์„ ๋•Œ๊ฐ€ ์•„๋‹ˆ๋ผ ํฐ ํŠธ๋ž˜ํ”ฝ/๋ฐ์ดํ„ฐ์—์„œ.
phrase

์ง์—ญ: ๊ทœ๋ชจ๊ฐ€ ์ปค์กŒ์„ ๋•Œ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์ฒ˜๋Ÿผ ์“ฐ์ง€ ๋ง๊ณ  ์–ด๋–ค ์ˆ˜์น˜์—์„œ ๊นจ์ง€๋Š”์ง€ ๋ถ™์—ฌ์•ผ ํ•œ๋‹ค.

This works locally but breaks at scale.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:pacelc

PACELC

Even with no partition (Else), you still trade latency vs consistency

Open deck
idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

read-your-writes
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐฉ๊ธˆ ์“ด ๊ฐ’์„ ๋ฐ”๋กœ ๋‹ค์‹œ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๋ณด์žฅ.
term

์ง์—ญ: ๋‚ด๊ฐ€ ์“ด ๊ฒƒ์€ ๋‚ด๊ฐ€ ์ฝ๋Š”๋‹ค

๋‰˜์•™์Šค: replica๋ฅผ ์ฝ์œผ๋ฉด ๊นจ์งˆ ์ˆ˜ ์žˆ๋‹ค.

Route the user to primary when read-your-writes matters.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:multi-leader-and-leaderless-replication

Multi-leader and leaderless (Dynamo-style quorum) replication

Two ways to drop the single leader and let many nodes take writes

Open deck
eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

handoff
ํ•œ agent/์„œ๋น„์Šค/์‚ฌ๋žŒ์ด ๋‹ค๋ฅธ ์ฃผ์ฒด์—๊ฒŒ ์ž‘์—…์„ ๋„˜๊ธฐ๋Š” ์ง€์ .
term

์ง์—ญ: ์ธ๊ณ„

๋‰˜์•™์Šค: handoff์—์„œ context loss๊ฐ€ ์ž์ฃผ ์ƒ๊ธด๋‹ค.

The handoff includes the artifact and trace.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

strong consistency
์ฝ๊ธฐ๊ฐ€ ํ•ญ์ƒ ์ตœ์‹  ์“ฐ๊ธฐ๋ฅผ ๋ฐ˜์˜ํ•˜๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ๊ฐ•ํ•œ ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: latency/availability ๋น„์šฉ์„ ๋‚ธ๋‹ค.

We choose strong consistency for account balances.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:event-sourcing-vs-state-stored

Event sourcing vs state-stored

Store the current state, or store the events that produced it

Open deck
append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

audit trail
๋ˆ„๊ฐ€ ์–ธ์ œ ๋ฌด์—‡์„ ๋ฐ”๊ฟจ๋Š”์ง€ ๋‚จ๊ธด ๊ธฐ๋ก.
term

์ง์—ญ: ๊ฐ์‚ฌ ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: history log๋ณด๋‹ค ํ›จ์”ฌ ์ž์—ฐ์Šค๋Ÿฌ์šด ์‹ค๋ฌด ํ‘œํ˜„.

Every state transition writes an audit trail.

eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:toast-snackbar

Toast / Snackbar

Brief self-dismissing notifications โ€” accessibility and queueing are the hard parts

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:banner-alert

Banner / Alert

A message strip that stays in context

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:modal-dialog

Modal / Dialog

An overlay that blocks the rest of the UI until resolved

Open deck
trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:tooltip-popover

Tooltip / Popover

Hint label vs click-opened interactive panel, plus positioning and a11y

Open deck
edge case
๋ณดํ†ต ํ๋ฆ„์ด ์•„๋‹Œ ๊ฒฝ๊ณ„/์˜ˆ์™ธ ์ƒํ™ฉ.
term

์ง์—ญ: ๊ฐ€์žฅ์ž๋ฆฌ ๊ฒฝ์šฐ

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ๋Š” happy path์™€ ๋Œ€๋น„ํ•ด์„œ ๋งํ•œ๋‹ค.

I would test the timeout edge case separately.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

concept:dropdown-menu

Dropdown / Menu

A trigger button plus a floating list, made accessible with keyboard nav and ARIA

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

state machine
ํ—ˆ์šฉ๋œ ์ƒํƒœ์™€ ์ „์ด๋งŒ ์ •์˜ํ•˜๋Š” ๋ชจ๋ธ.
term

์ง์—ญ: ์ƒํƒœ ๊ธฐ๊ณ„

๋‰˜์•™์Šค: ๋ถˆ๋ฒ• ์ƒํƒœ๋ฅผ ๋ง‰๋Š” LLD/๋„๋ฉ”์ธ ํ•ต์‹ฌ.

A state machine rejects illegal transitions.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:badge-chip

Badge / Chip / Tag

Small count/status labels vs. removable interactive chips

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:skeleton-loader

Skeleton loader

A gray placeholder that previews the final layout while data loads

Open deck
trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:spinner-progress

Spinner / Progress indicator

When to show an indeterminate spinner vs a determinate progress bar

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:tabs-component

Tabs

One space, many panels โ€” switch between them

Open deck
first-class
๋ณด์กฐ๊ฐ€ ์•„๋‹ˆ๋ผ ์‹œ์Šคํ…œ์˜ ์ •์‹ ๊ฐœ๋…์œผ๋กœ ๋‹ค๋ฃฌ๋‹ค๋Š” ๋œป.
collocation

์ง์—ญ: ์ผ๊ธ‰์˜

๋‰˜์•™์Šค: abstention, approval, trace ๊ฐ™์€ ๊ฒƒ์— ๋ถ™์ด๋ฉด ์ข‹๋‹ค.

Abstention should be a first-class output.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:accordion-disclosure

Accordion / Disclosure

Expand/collapse sections: native details vs custom ARIA

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:drawer-sheet

Drawer / Sheet

A panel that slides in from a screen edge

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:breadcrumb

Breadcrumb

A secondary nav showing your position in the page hierarchy

Open deck
trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:pagination-vs-infinite-scroll

Pagination vs Infinite scroll

Page buttons vs load-on-scroll, and what you trade away

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:empty-state

Empty state

The no-data UI: a blank screen is a bug, not a neutral default

Open deck
happy path
๋ชจ๋“  ๊ฒƒ์ด ์ •์ƒ์ ์œผ๋กœ ๋˜๋Š” ๊ธฐ๋ณธ ์„ฑ๊ณต ํ๋ฆ„.
term

์ง์—ญ: ํ–‰๋ณตํ•œ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: ์‹ค๋ฌด ๊ณ ์ • ํ‘œํ˜„. success path๋ณด๋‹ค ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

The happy path works, but retries break it.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:form-validation-ui

Form validation (client side)

Client validation is for UX; the server still enforces security

Open deck
race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:dom-virtual-dom

DOM & Virtual DOM

The browser DOM tree and React's virtual DOM diff/reconciliation

Open deck
mismatch
์„œ๋กœ ๋งž์•„์•ผ ํ•˜๋Š” ๊ฐ’์ด ๋งž์ง€ ์•Š๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ์ผ์น˜

๋‰˜์•™์Šค: reconciliation ๊ฒฐ๊ณผ๋ฅผ ๋ถ„๋ฅ˜ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The reconciler classifies amount mismatches as high severity.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:hydration

Hydration

React attaching event handlers to server-rendered HTML

Open deck
handoff
ํ•œ agent/์„œ๋น„์Šค/์‚ฌ๋žŒ์ด ๋‹ค๋ฅธ ์ฃผ์ฒด์—๊ฒŒ ์ž‘์—…์„ ๋„˜๊ธฐ๋Š” ์ง€์ .
term

์ง์—ญ: ์ธ๊ณ„

๋‰˜์•™์Šค: handoff์—์„œ context loss๊ฐ€ ์ž์ฃผ ์ƒ๊ธด๋‹ค.

The handoff includes the artifact and trace.

mismatch
์„œ๋กœ ๋งž์•„์•ผ ํ•˜๋Š” ๊ฐ’์ด ๋งž์ง€ ์•Š๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ์ผ์น˜

๋‰˜์•™์Šค: reconciliation ๊ฒฐ๊ณผ๋ฅผ ๋ถ„๋ฅ˜ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The reconciler classifies amount mismatches as high severity.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:debounce-throttle

Debounce vs Throttle

Two ways to tame high-frequency events: wait for quiet vs run at most every N ms

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

out-of-order
๋‚˜์ค‘ ์ด๋ฒคํŠธ๊ฐ€ ๋จผ์ € ๋„์ฐฉํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์ˆœ์„œ๊ฐ€ ๋’ค๋ฐ”๋€

๋‰˜์•™์Šค: event version/state machine์œผ๋กœ ๋ง‰๋Š”๋‹ค.

The cancel event arrived out-of-order.

race condition
์‹คํ–‰ ์ˆœ์„œ์— ๋”ฐ๋ผ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€๋Š” ๋ฒ„๊ทธ.
term

์ง์—ญ: ๊ฒฝ์Ÿ ์ƒํƒœ

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ์—์„œ ๊ฐ€์žฅ ๋จผ์ € ์˜์‹ฌํ•  ๋‹จ์–ด.

The bug was a race condition between two updates.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:lazy-loading-code-splitting

Lazy loading / Code splitting

Split the initial bundle and fetch code only when it's needed

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

chunk
๊ฒ€์ƒ‰๊ณผ RAG๋ฅผ ์œ„ํ•ด ๋ฌธ์„œ๋ฅผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ์ž‘์œผ๋ฉด ๋ฌธ๋งฅ ๋ถ€์กฑ, ๋„ˆ๋ฌด ํฌ๋ฉด noise๊ฐ€ ๋Š˜์–ด๋‚œ๋‹ค.

The answer cites the retrieved chunk.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:css-box-model-layout

CSS box model & Flexbox/Grid

4 box layers + Flexbox for 1D, Grid for 2D

Open deck
trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:responsive-design

Responsive design

Making one layout adapt to every screen width

Open deck
surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:z-index-stacking

z-index & stacking context

Why z-index "doesn't work": stacking context

Open deck
side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:web-vitals

Core Web Vitals

Google's UX scorecard measuring perceived loading, visual stability, and responsiveness

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:web-storage

Cookies / localStorage / sessionStorage

Three browser client storage mechanisms: size, expiry, server-transmission, and security differences

Open deck
trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:optimistic-ui

Optimistic UI

Update the screen before the server confirms, roll back on failure

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

concept:client-state-management

Client state management

Separate server state from client state, and reach for global state only when you must

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:sd-clarify-requirements

Clarify Requirements (Functional + Non-Functional)

Ask before designing: functional reqs + scale/latency/consistency, and an explicit scope cut

Open deck
edge case
๋ณดํ†ต ํ๋ฆ„์ด ์•„๋‹Œ ๊ฒฝ๊ณ„/์˜ˆ์™ธ ์ƒํ™ฉ.
term

์ง์—ญ: ๊ฐ€์žฅ์ž๋ฆฌ ๊ฒฝ์šฐ

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ๋Š” happy path์™€ ๋Œ€๋น„ํ•ด์„œ ๋งํ•œ๋‹ค.

I would test the timeout edge case separately.

eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

read path
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์„ ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์ฝ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: write path์™€ ๋‚˜๋ˆ ์„œ ์„ค๊ณ„ ์„ค๋ช…ํ•œ๋‹ค.

The read path hits Redis first.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

strong consistency
์ฝ๊ธฐ๊ฐ€ ํ•ญ์ƒ ์ตœ์‹  ์“ฐ๊ธฐ๋ฅผ ๋ฐ˜์˜ํ•˜๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ๊ฐ•ํ•œ ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: latency/availability ๋น„์šฉ์„ ๋‚ธ๋‹ค.

We choose strong consistency for account balances.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

concept:sd-define-api

Define the API first

Nail the contract before you draw a single box

Open deck
API contract
์š”์ฒญ/์‘๋‹ต ํ˜•์‹, ์—๋Ÿฌ, ๋ณด์žฅ์‚ฌํ•ญ๊นŒ์ง€ ํฌํ•จํ•œ ์•ฝ์†.
term

์ง์—ญ: API ๊ณ„์•ฝ

๋‰˜์•™์Šค: ์—”๋“œํฌ์ธํŠธ ์ด๋ฆ„๋ณด๋‹ค ๊ฐ•ํ•œ ๊ฐœ๋….

The API contract defines idempotency and error codes.

cursor pagination
offset ๋Œ€์‹  ๋งˆ์ง€๋ง‰ ๋ณธ ์œ„์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋‹ค์Œ ํŽ˜์ด์ง€๋ฅผ ์ฝ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ปค์„œ ํŽ˜์ด์ง€๋„ค์ด์…˜

๋‰˜์•™์Šค: ๋Œ€๋Ÿ‰ ๋ฐ์ดํ„ฐ์—์„œ drift์™€ skip ๋น„์šฉ์„ ์ค„์ธ๋‹ค.

Cursor pagination avoids offset drift.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

load balancer
์š”์ฒญ์„ ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๋‚˜๋ˆ  ๋ณด๋‚ด๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ถ„์‚ฐ๊ธฐ

๋‰˜์•™์Šค: LB๋Š” scale๊ณผ availability์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์–ด.

The load balancer routes traffic to healthy instances.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:sd-data-model-choice

Data model & storage choice

Pick storage from access patterns, not from vibes

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

append-only
๊ธฐ์กด ํ–‰์„ ๋ฎ์ง€ ์•Š๊ณ  ์ƒˆ ์‚ฌ๊ฑด์„ ๊ณ„์† ์Œ“๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ถ”๊ฐ€๋งŒ ํ•˜๋Š”

๋‰˜์•™์Šค: audit trail, event log, ledger์—์„œ ์“ฐ๋Š” ํ‘œํ˜„.

The audit trail is append-only.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

strong consistency
์ฝ๊ธฐ๊ฐ€ ํ•ญ์ƒ ์ตœ์‹  ์“ฐ๊ธฐ๋ฅผ ๋ฐ˜์˜ํ•˜๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ๊ฐ•ํ•œ ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: latency/availability ๋น„์šฉ์„ ๋‚ธ๋‹ค.

We choose strong consistency for account balances.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write amplification
๋…ผ๋ฆฌ์  ์“ฐ๊ธฐ ํ•˜๋‚˜๊ฐ€ ๋‚ด๋ถ€์ ์œผ๋กœ ์—ฌ๋Ÿฌ ์“ฐ๊ธฐ๋กœ ๋Š˜์–ด๋‚˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์“ฐ๊ธฐ ์ฆํญ

๋‰˜์•™์Šค: index, fan-out, replication, LSM์—์„œ ์ค‘์š”.

Fan-out-on-write causes write amplification.

concept:sd-high-level-architecture

High-level architecture (boxes & arrows)

The boring, legible skeleton you deep-dive from

Open deck
blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

read path
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์„ ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์ฝ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: write path์™€ ๋‚˜๋ˆ ์„œ ์„ค๊ณ„ ์„ค๋ช…ํ•œ๋‹ค.

The read path hits Redis first.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:sd-deep-dive-bottleneck

Deep-dive & find the bottleneck

Pick the riskiest component and go deep into its hot path and single point of failure

Open deck
backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

headroom
ํ˜„์žฌ ๋ถ€ํ•˜ ์œ„์— ๋‚จ๊ฒจ๋‘” ์•ˆ์ „ ์—ฌ์œ .
term

์ง์—ญ: ์—ฌ์œ  ์šฉ๋Ÿ‰

๋‰˜์•™์Šค: 100% utilization๊นŒ์ง€ ์“ฐ๋ฉด ์žฅ์• ์— ์ทจ์•ฝํ•˜๋‹ค.

We keep headroom for traffic spikes.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

on top of that
์ถ”๊ฐ€ ๊ทผ๊ฑฐ๋‚˜ ์กฐ๊ฑด์„ ๋ง๋ถ™์ผ ๋•Œ ์“ฐ๋Š” ์—ฐ๊ฒฐ ํ‘œํ˜„.
phrase

์ง์—ญ: ๊ทธ ์œ„์— ์ถ”๊ฐ€๋กœ

๋‰˜์•™์Šค: also๋ณด๋‹ค ๋” ๋งํ•˜๋Š” ํ๋ฆ„์ด ์ข‹๋‹ค.

On top of that, I would add citation checks.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:sd-articulate-tradeoffs

Articulate trade-offs (and when NOT to scale)

Every choice gives something up โ€” say it out loud

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

read-your-writes
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐฉ๊ธˆ ์“ด ๊ฐ’์„ ๋ฐ”๋กœ ๋‹ค์‹œ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๋ณด์žฅ.
term

์ง์—ญ: ๋‚ด๊ฐ€ ์“ด ๊ฒƒ์€ ๋‚ด๊ฐ€ ์ฝ๋Š”๋‹ค

๋‰˜์•™์Šค: replica๋ฅผ ์ฝ์œผ๋ฉด ๊นจ์งˆ ์ˆ˜ ์žˆ๋‹ค.

Route the user to primary when read-your-writes matters.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

SLO
ํŒ€ ๋‚ด๋ถ€ ์‹ ๋ขฐ์„ฑ ๋ชฉํ‘œ.
term

์ง์—ญ: ์„œ๋น„์Šค ๋ชฉํ‘œ

๋‰˜์•™์Šค: SLA๋Š” ์™ธ๋ถ€ ๊ณ„์•ฝ, SLI๋Š” ์ธก์ • ์ง€ํ‘œ.

The SLO defines the latency target.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:push-vs-pull

Push vs Pull (fan-out)

Precompute on write, or assemble on read

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

hot key
์š”์ฒญ์ด ํ•œ ํ‚ค/ํŒŒํ‹ฐ์…˜์— ๊ณผ๋„ํ•˜๊ฒŒ ๋ชฐ๋ฆฌ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋œจ๊ฑฐ์šด ํ‚ค

๋‰˜์•™์Šค: cache, Redis, Kafka, DynamoDB์—์„œ ์ž์ฃผ ๋ฌธ์ œ ๋œ๋‹ค.

A viral listing becomes a hot key.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

read path
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์„ ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์ฝ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: write path์™€ ๋‚˜๋ˆ ์„œ ์„ค๊ณ„ ์„ค๋ช…ํ•œ๋‹ค.

The read path hits Redis first.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write amplification
๋…ผ๋ฆฌ์  ์“ฐ๊ธฐ ํ•˜๋‚˜๊ฐ€ ๋‚ด๋ถ€์ ์œผ๋กœ ์—ฌ๋Ÿฌ ์“ฐ๊ธฐ๋กœ ๋Š˜์–ด๋‚˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์“ฐ๊ธฐ ์ฆํญ

๋‰˜์•™์Šค: index, fan-out, replication, LSM์—์„œ ์ค‘์š”.

Fan-out-on-write causes write amplification.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

concept:schema-design-access-patterns

Schema design around access patterns

Design the schema for how it's read โ€” query first, tables second

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

materialized view
๋ฏธ๋ฆฌ ๊ณ„์‚ฐํ•ด ์ €์žฅํ•ด๋‘” ์ฝ๊ธฐ์šฉ ๊ฒฐ๊ณผ.
term

์ง์—ญ: ๋ฌผ๋ฆฌํ™”๋œ ๋ทฐ

๋‰˜์•™์Šค: ์ฝ๊ธฐ๋Š” ๋นจ๋ผ์ง€์ง€๋งŒ refresh/write ๋น„์šฉ์ด ์ƒ๊ธด๋‹ค.

A materialized view precomputes the dashboard totals.

N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

strong consistency
์ฝ๊ธฐ๊ฐ€ ํ•ญ์ƒ ์ตœ์‹  ์“ฐ๊ธฐ๋ฅผ ๋ฐ˜์˜ํ•˜๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ๊ฐ•ํ•œ ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: latency/availability ๋น„์šฉ์„ ๋‚ธ๋‹ค.

We choose strong consistency for account balances.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write amplification
๋…ผ๋ฆฌ์  ์“ฐ๊ธฐ ํ•˜๋‚˜๊ฐ€ ๋‚ด๋ถ€์ ์œผ๋กœ ์—ฌ๋Ÿฌ ์“ฐ๊ธฐ๋กœ ๋Š˜์–ด๋‚˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์“ฐ๊ธฐ ์ฆํญ

๋‰˜์•™์Šค: index, fan-out, replication, LSM์—์„œ ์ค‘์š”.

Fan-out-on-write causes write amplification.

concept:human-in-the-loop-gate

Human-in-the-loop approval gate

A forced human confirm in front of irreversible actions

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

blast radius
์žฅ์• ๋‚˜ ๋ณ€๊ฒฝ์ด ์˜ํ–ฅ์„ ์ฃผ๋Š” ๋ฒ”์œ„.
term

์ง์—ญ: ํญ๋ฐœ ๋ฐ˜๊ฒฝ

๋‰˜์•™์Šค: ์œ„ํ—˜ํ•œ ์ž‘์—…์˜ ํฌ๊ธฐ๋ฅผ ๋งํ•  ๋•Œ ์“ด๋‹ค.

The approval gate limits the blast radius.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

human-in-the-loop
์ž๋™ํ™” ์ค‘๊ฐ„์— ์‚ฌ๋žŒ์ด ์Šน์ธ/ํŒ๋‹จํ•˜๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์‚ฌ๋žŒ์ด ๋ฃจํ”„ ์•ˆ์— ์žˆ๋Š”

๋‰˜์•™์Šค: ๊ณ ์œ„ํ—˜ ํ–‰๋™์—์„œ ์•ˆ์ „์žฅ์น˜๋กœ ์“ด๋‹ค.

High-risk actions require human-in-the-loop approval.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:idempotency-keys-design

Idempotency keys (design)

Make retries safe: same key, second request is a no-op

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

tool call
๋ชจ๋ธ์ด ์•ฑ์— ๊ตฌ์กฐํ™”๋œ ํ•จ์ˆ˜ ์‹คํ–‰ ์š”์ฒญ์„ ๋‚ด๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋„๊ตฌ ํ˜ธ์ถœ

๋‰˜์•™์Šค: ๋ชจ๋ธ์ด ์ง์ ‘ ๊ถŒํ•œ์„ ๊ฐ€์ง„ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

A tool call is a structured action request.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:backpressure-load-shedding

Backpressure & Load Shedding

When demand exceeds capacity: push back (backpressure) or drop (load shedding)

Open deck
backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

circuit breaker
์˜์กด์„ฑ์ด ๊ณ„์† ์‹คํŒจํ•˜๋ฉด ํ˜ธ์ถœ์„ ์ž ์‹œ ๋ง‰๊ณ  ๋น ๋ฅด๊ฒŒ ์‹คํŒจ์‹œํ‚ค๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์ฐจ๋‹จ๊ธฐ

๋‰˜์•™์Šค: ์ง‘ ์ „๊ธฐ ์ฐจ๋‹จ๊ธฐ ๋น„์œ  ๊ทธ๋Œ€๋กœ๋‹ค.

The circuit breaker opens after repeated failures.

connection pool
DB/์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๊ฒฐ์„ ์žฌ์‚ฌ์šฉํ•˜๋Š” ์ œํ•œ๋œ ์ž์› ๋ฌถ์Œ.
term

์ง์—ญ: ์ปค๋„ฅ์…˜ ํ’€

๋‰˜์•™์Šค: pool size๋ณด๋‹ค ์˜ค๋ž˜ ์žก๋Š” ์ฟผ๋ฆฌ๊ฐ€ ์ง„๋ฒ”์ผ ๋•Œ๊ฐ€ ๋งŽ๋‹ค.

A slow query can exhaust the connection pool.

exponential backoff
์žฌ์‹œ๋„ ๊ฐ„๊ฒฉ์„ 1์ดˆ, 2์ดˆ, 4์ดˆ์ฒ˜๋Ÿผ ์ ์  ๋Š˜๋ฆฌ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ง€์ˆ˜ ๋ฐฑ์˜คํ”„

๋‰˜์•™์Šค: ์ฃฝ์–ด๊ฐ€๋Š” ์˜์กด์„ฑ์— ๋ถ€ํ•˜๋ฅผ ๋”ํ•˜์ง€ ์•Š๊ธฐ ์œ„ํ•ด ์“ด๋‹ค.

Retries use exponential backoff.

gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

load shedding
์‹œ์Šคํ…œ์„ ์‚ด๋ฆฌ๊ธฐ ์œ„ํ•ด ์ผ๋ถ€ ์š”์ฒญ์„ ์˜๋„์ ์œผ๋กœ ๊ฑฐ์ ˆํ•˜๋Š” ๊ฒƒ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ฒ„๋ฆฌ๊ธฐ

๋‰˜์•™์Šค: ๋ฌด์ž‘์ • ์ฒ˜๋ฆฌํ•˜๋ ค๋‹ค ์ „์ฒด๊ฐ€ ์ฃฝ๋Š” ๊ฒƒ์„ ๋ง‰๋Š”๋‹ค.

We shed low-priority traffic when the queue is almost full.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

retry storm
์‹คํŒจํ•œ ์š”์ฒญ๋“ค์ด ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋ฉฐ ์žฅ์• ๋ฅผ ํ‚ค์šฐ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์žฌ์‹œ๋„ ํญํ’

๋‰˜์•™์Šค: ์žฅ์•  ๋Œ€์‘์—์„œ ์ž์ฃผ ๋‚˜์˜ค๋Š” ํ‘œํ˜„.

A retry storm overloaded the dependency.

saturation
CPU, pool, queue ๋“ฑ์ด ํ•œ๊ณ„์— ๊ฐ€๊นŒ์›Œ์ง„ ์ƒํƒœ.
term

์ง์—ญ: ํฌํ™”

๋‰˜์•™์Šค: ํฌํ™” ๊ทผ์ฒ˜์—์„œ latency๊ฐ€ ๊ธ‰๊ฒฉํžˆ ์˜ค๋ฅธ๋‹ค.

Latency spikes near saturation.

SLO
ํŒ€ ๋‚ด๋ถ€ ์‹ ๋ขฐ์„ฑ ๋ชฉํ‘œ.
term

์ง์—ญ: ์„œ๋น„์Šค ๋ชฉํ‘œ

๋‰˜์•™์Šค: SLA๋Š” ์™ธ๋ถ€ ๊ณ„์•ฝ, SLI๋Š” ์ธก์ • ์ง€ํ‘œ.

The SLO defines the latency target.

thread pool
์ž‘์—…์„ ์ฒ˜๋ฆฌํ•  worker thread ๋ฌถ์Œ.
term

์ง์—ญ: ์Šค๋ ˆ๋“œ ํ’€

๋‰˜์•™์Šค: ๋А๋ฆฐ ํ˜ธ์ถœ์ด ์Šค๋ ˆ๋“œ๋ฅผ ์žก๊ณ  ์žˆ์œผ๋ฉด ์ „์ฒด endpoint๊ฐ€ ๋ง‰ํžŒ๋‹ค.

Timeouts prevent thread pool exhaustion.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

concept:sota

SOTA

State of the art โ€” the claim that it's the current best

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

benchmark
์„ฑ๋Šฅ/ํ’ˆ์งˆ์„ ๋น„๊ตํ•˜๊ธฐ ์œ„ํ•œ ํ‘œ์ค€ ๊ณผ์ œ๋‚˜ ์ธก์ •.
term

์ง์—ญ: ๋ฒค์น˜๋งˆํฌ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ… ๋ฌธ๋งฅ์—์„œ๋Š” ์‹ค์ œ ์‚ฌ์šฉ์„ฑ๊ณผ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ๋‹ค.

A benchmark is not the same as production quality.

embedding
ํ…์ŠคํŠธ๋ฅผ ์˜๋ฏธ ๊ฒ€์ƒ‰ ๊ฐ€๋Šฅํ•œ ์ˆซ์ž ๋ฒกํ„ฐ๋กœ ๋ฐ”๊พผ ๊ฒƒ.
term

์ง์—ญ: ์ž„๋ฒ ๋”ฉ

๋‰˜์•™์Šค: similarity๋Š” truth๊ฐ€ ์•„๋‹ˆ๋‹ค.

An embedding turns text into a vector.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

SOTA
state of the art, ํ˜„์žฌ ๊ณต๊ฐœ ์ง€ํ‘œ์ƒ ์ตœ๊ณ  ์ˆ˜์ค€.
term

์ง์—ญ: ์ตœ์ฒจ๋‹จ ์„ฑ๋Šฅ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ…์—์„œ ๋‚จ์šฉ๋œ๋‹ค. ๋‚ด use case์—์„œ ๊ฒ€์ฆํ•ด์•ผ ํ•œ๋‹ค.

SOTA on a benchmark may not matter for our workflow.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:benchmark

Benchmark

A fixed test for comparing performance

Open deck
access pattern
๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ค ์กฐ๊ฑด/์ˆœ์„œ๋กœ ์ฝ๊ณ  ์“ฐ๋Š”์ง€.
term

์ง์—ญ: ์ ‘๊ทผ ํŒจํ„ด

๋‰˜์•™์Šค: schema์™€ index ์„ค๊ณ„๋Š” access pattern์—์„œ ์‹œ์ž‘ํ•œ๋‹ค.

Schema design starts from access patterns.

baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

benchmark
์„ฑ๋Šฅ/ํ’ˆ์งˆ์„ ๋น„๊ตํ•˜๊ธฐ ์œ„ํ•œ ํ‘œ์ค€ ๊ณผ์ œ๋‚˜ ์ธก์ •.
term

์ง์—ญ: ๋ฒค์น˜๋งˆํฌ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ… ๋ฌธ๋งฅ์—์„œ๋Š” ์‹ค์ œ ์‚ฌ์šฉ์„ฑ๊ณผ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ๋‹ค.

A benchmark is not the same as production quality.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

sequential scan
ํ…Œ์ด๋ธ”์„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ฝ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ˆœ์ฐจ ์Šค์บ”

๋‰˜์•™์Šค: ์ž‘์€ ํ…Œ์ด๋ธ”์—์„œ๋Š” ๊ดœ์ฐฎ์ง€๋งŒ ํฐ ํ…Œ์ด๋ธ”์—์„œ ์œ„ํ—˜.

EXPLAIN showed a sequential scan over ten million rows.

tail latency
ํ‰๊ท  ๋’ค์— ์ˆจ์–ด ์žˆ๋Š” ๋А๋ฆฐ ์š”์ฒญ๋“ค์˜ ์ง€์—ฐ.
term

์ง์—ญ: ๊ผฌ๋ฆฌ ์ง€์—ฐ

๋‰˜์•™์Šค: p95/p99๋กœ ๋ณธ๋‹ค.

Tail latency dominates user experience.

concept:baseline

Baseline

The current or simple approach you compare against

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

regression
๊ธฐ์กด์— ๋˜๋˜ ๊ฒƒ์ด ๋ณ€๊ฒฝ ํ›„ ๊นจ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํšŒ๊ท€/ํ‡ดํ–‰

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ’ˆ์งˆ, ์ฝ”๋“œ, prompt ๋ชจ๋‘์— ์“ด๋‹ค.

The eval catches a regression in citation quality.

concept:production-ready

Production-ready

Claiming it's ready to run in production

Open deck
fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

happy path
๋ชจ๋“  ๊ฒƒ์ด ์ •์ƒ์ ์œผ๋กœ ๋˜๋Š” ๊ธฐ๋ณธ ์„ฑ๊ณต ํ๋ฆ„.
term

์ง์—ญ: ํ–‰๋ณตํ•œ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: ์‹ค๋ฌด ๊ณ ์ • ํ‘œํ˜„. success path๋ณด๋‹ค ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

The happy path works, but retries break it.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

observability
์‹œ์Šคํ…œ ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ logs/metrics/traces๋กœ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ.
term

์ง์—ญ: ๊ด€์ธก ๊ฐ€๋Šฅ์„ฑ

๋‰˜์•™์Šค: monitoring๋ณด๋‹ค ๋„“๋‹ค.

Observability tells me why the request was slow.

SLO
ํŒ€ ๋‚ด๋ถ€ ์‹ ๋ขฐ์„ฑ ๋ชฉํ‘œ.
term

์ง์—ญ: ์„œ๋น„์Šค ๋ชฉํ‘œ

๋‰˜์•™์Šค: SLA๋Š” ์™ธ๋ถ€ ๊ณ„์•ฝ, SLI๋Š” ์ธก์ • ์ง€ํ‘œ.

The SLO defines the latency target.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:scalable

Scalable

Claiming it can handle growing load

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

cache miss
์บ์‹œ์— ์—†์–ด ์›๋ณธ ์ €์žฅ์†Œ๋กœ ๊ฐ€์•ผ ํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์บ์‹œ ๋ฏธ์Šค

๋‰˜์•™์Šค: miss๊ฐ€ ๋ชฐ๋ฆฌ๋ฉด DB๊ฐ€ ํ„ฐ์ง„๋‹ค.

Cache misses spike after TTL expiry.

consistent hashing
๋…ธ๋“œ ์ถ”๊ฐ€/์ œ๊ฑฐ ์‹œ ์ผ๋ถ€ key๋งŒ ์ด๋™ํ•˜๊ฒŒ ํ•˜๋Š” ํ•ด์‹ฑ ๋ฐฉ์‹.
term

์ง์—ญ: ์ผ๊ด€ ํ•ด์‹ฑ

๋‰˜์•™์Šค: cache cluster, shard routing์—์„œ ๋‚˜์˜จ๋‹ค.

Consistent hashing limits key movement when nodes change.

heap
๊ฐ์ฒด๊ฐ€ ์ฃผ๋กœ ํ• ๋‹น๋˜๋Š” JVM ๋ฉ”๋ชจ๋ฆฌ ์˜์—ญ.
term

์ง์—ญ: ํž™

๋‰˜์•™์Šค: ์ž๋ฃŒ๊ตฌ์กฐ heap๊ณผ JVM heap์€ ๋‹ค๋ฅด๋‹ค.

A memory leak grows the heap until OOM.

hot key
์š”์ฒญ์ด ํ•œ ํ‚ค/ํŒŒํ‹ฐ์…˜์— ๊ณผ๋„ํ•˜๊ฒŒ ๋ชฐ๋ฆฌ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋œจ๊ฑฐ์šด ํ‚ค

๋‰˜์•™์Šค: cache, Redis, Kafka, DynamoDB์—์„œ ์ž์ฃผ ๋ฌธ์ œ ๋œ๋‹ค.

A viral listing becomes a hot key.

load balancer
์š”์ฒญ์„ ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๋‚˜๋ˆ  ๋ณด๋‚ด๋Š” ์ปดํฌ๋„ŒํŠธ.
term

์ง์—ญ: ๋ถ€ํ•˜ ๋ถ„์‚ฐ๊ธฐ

๋‰˜์•™์Šค: LB๋Š” scale๊ณผ availability์˜ ๊ธฐ๋ณธ ๋ ˆ์ด์–ด.

The load balancer routes traffic to healthy instances.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

concept:agentic

Agentic

Acting like a goal-driven agent

Open deck
agentic
๋ชจ๋ธ์ด ๋ชฉํ‘œ๋ฅผ ํ–ฅํ•ด ๋„๊ตฌ ์‚ฌ์šฉ๊ณผ ๋ฐ˜๋ณต์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์„ฑ๊ฒฉ.
term

์ง์—ญ: ์—์ด์ „ํŠธ์ ์ธ

๋‰˜์•™์Šค: ๋งˆ์ผ€ํŒ… ๋‹จ์–ด๋ผ ๊ตฌ์ฒด์  loop/tool/state๋กœ ํ’€์–ด์•ผ ํ•œ๋‹ค.

Agentic means loop, state, tools, and stopping conditions.

approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

audit trail
๋ˆ„๊ฐ€ ์–ธ์ œ ๋ฌด์—‡์„ ๋ฐ”๊ฟจ๋Š”์ง€ ๋‚จ๊ธด ๊ธฐ๋ก.
term

์ง์—ญ: ๊ฐ์‚ฌ ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: history log๋ณด๋‹ค ํ›จ์”ฌ ์ž์—ฐ์Šค๋Ÿฌ์šด ์‹ค๋ฌด ํ‘œํ˜„.

Every state transition writes an audit trail.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

surface
์ˆจ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์ด๊ฒŒ ๋“œ๋Ÿฌ๋‚ด๋‹ค.
verb

์ง์—ญ: ํ‘œ๋ฉด์œผ๋กœ ์˜ฌ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: metrics/errors/failure๋ฅผ ๋“œ๋Ÿฌ๋‚ผ ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The DLQ surfaces failures instead of hiding them.

concept:multimodal

Multimodal

Handling images, audio, or video alongside text

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:real-time

Real-time

Claiming it responds almost instantly

Open deck
fall back to
์ฒซ ์„ ํƒ์ด ์‹คํŒจํ•˜๋ฉด ๋Œ€์ฒด ๊ฒฝ๋กœ๋ฅผ ์“ฐ๋‹ค.
verb

์ง์—ญ: ~๋กœ ํ›„ํ‡ดํ•˜๋‹ค

๋‰˜์•™์Šค: fallback์€ graceful degradation๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

If Redis misses, we fall back to the database.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

throughput
๋‹จ์œ„ ์‹œ๊ฐ„๋‹น ์™„๋ฃŒํ•œ ์ž‘์—… ์ˆ˜.
term

์ง์—ญ: ์ฒ˜๋ฆฌ๋Ÿ‰

๋‰˜์•™์Šค: latency์™€ ๋‹ค๋ฅด๋‹ค. ๋งŽ์ด ์ฒ˜๋ฆฌํ•ด๋„ ๊ฐ ์š”์ฒญ์€ ๋А๋ฆด ์ˆ˜ ์žˆ๋‹ค.

Throughput is requests per second.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

concept:end-to-end

End-to-end

Full path from user action to final result

Open deck
rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

concept:zero-shot

Zero-shot

Doing the task with no examples

Open deck
edge case
๋ณดํ†ต ํ๋ฆ„์ด ์•„๋‹Œ ๊ฒฝ๊ณ„/์˜ˆ์™ธ ์ƒํ™ฉ.
term

์ง์—ญ: ๊ฐ€์žฅ์ž๋ฆฌ ๊ฒฝ์šฐ

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ๋Š” happy path์™€ ๋Œ€๋น„ํ•ด์„œ ๋งํ•œ๋‹ค.

I would test the timeout edge case separately.

eval set
๋ชจ๋ธ/ํ”„๋กฌํ”„ํŠธ ๋ณ€๊ฒฝ์ด ์ข‹์•„์กŒ๋Š”์ง€ ์ธก์ •ํ•˜๋Š” ๊ณ ์ • ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค ๋ฌถ์Œ.
term

์ง์—ญ: ํ‰๊ฐ€ ์„ธํŠธ

๋‰˜์•™์Šค: ๊ฐ์ด ์•„๋‹ˆ๋ผ regression์„ ์žก๋Š” ๊ธฐ์ค€.

I run the prompt against an eval set.

few-shot
ํ”„๋กฌํ”„ํŠธ ์•ˆ์— ๋ช‡ ๊ฐœ ์˜ˆ์‹œ๋ฅผ ๋„ฃ์–ด ํŒจํ„ด์„ ๋ณด์—ฌ์ฃผ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋ช‡ ๊ฐœ ์˜ˆ์‹œ๋ฅผ ์ฃผ๋Š”

๋‰˜์•™์Šค: ๋ชจ๋ธ ํ•™์Šต์ด ์•„๋‹ˆ๋ผ context ์•ˆ ์‹œ์—ฐ์ด๋‹ค.

Few-shot prompting teaches the expected shape.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

zero-shot
์˜ˆ์‹œ ์—†์ด ์ง€์‹œ๋งŒ์œผ๋กœ ๊ณผ์ œ๋ฅผ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์˜ˆ์‹œ ์—†์ด ๋ฐ”๋กœ

๋‰˜์•™์Šค: few-shot๊ณผ ๋Œ€๋น„๋œ๋‹ค.

Zero-shot is weaker when the output format is unfamiliar.

concept:copilot

Copilot

AI that assists, user stays in control

Open deck
approval gate
์œ„ํ—˜ํ•œ ํ–‰๋™ ์ „์— ์‚ฌ๋žŒ/์ •์ฑ… ์Šน์ธ์„ ์š”๊ตฌํ•˜๋Š” ๊ด€๋ฌธ.
term

์ง์—ญ: ์Šน์ธ ๊ฒŒ์ดํŠธ

๋‰˜์•™์Šค: human-in-the-loop๊ณผ ์—ฐ๊ฒฐ๋œ๋‹ค.

Bulk delete must pass an approval gate.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

move:single-truth

์ง„์‹ค์€ ํ•œ ๊ณณ์—

Single source of truth

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

last line of defense
์•ž๋‹จ ์ฝ”๋“œ๊ฐ€ ์ƒˆ๋„ ์ตœ์ข…์ ์œผ๋กœ ๋ง‰์•„์ฃผ๋Š” ๋ฐฉ์–ด ์žฅ์น˜.
phrase

์ง์—ญ: ๋งˆ์ง€๋ง‰ ๋ฐฉ์–ด์„ 

๋‰˜์•™์Šค: DB constraint, approval gate, type system ๊ฐ™์€ ๊ฒƒ์„ ์„ค๋ช…ํ•  ๋•Œ ์“ด๋‹ค.

The unique index is the last line of defense.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

move:atomic

๋ฌถ๋Š”๋‹ค

Make it atomic

Open deck
commit together or fail together
์›์ž์  ๊ฒฝ๊ณ„๋ฅผ ์„ค๋ช…ํ•˜๋Š” ๋ง.
phrase

์ง์—ญ: ๊ฐ™์ด ์ปค๋ฐ‹๋˜๊ฑฐ๋‚˜ ๊ฐ™์ด ์‹คํŒจํ•œ๋‹ค

๋‰˜์•™์Šค: transaction boundary๋ฅผ ๋ฉด์ ‘์—์„œ ๋งํ•  ๋•Œ ๋งค์šฐ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

The status update and audit row must commit together or fail together.

compare-and-swap
๊ธฐ๋Œ€๊ฐ’๊ณผ ๊ฐ™์„ ๋•Œ๋งŒ ๊ฐ’์„ ๋ฐ”๊พธ๋Š” ์›์ž ์—ฐ์‚ฐ.
term

์ง์—ญ: ๋น„๊ต ํ›„ ๊ต์ฒด

๋‰˜์•™์Šค: CAS๋ผ๊ณ  ์ค„์—ฌ ๋งํ•œ๋‹ค.

CAS prevents lost updates without a wide lock.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

optimistic lock
์ถฉ๋Œ์ด ๋“œ๋ฌผ๋‹ค๊ณ  ๋ณด๊ณ  version check๋กœ ์ถฉ๋Œ ์‹œ ์‹คํŒจ์‹œํ‚ค๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋‚™๊ด€์  ๋ฝ

๋‰˜์•™์Šค: hot row์—์„œ๋Š” retry storm์ด ๋‚  ์ˆ˜ ์žˆ๋‹ค.

Optimistic locking rejects stale writes.

pessimistic lock
์ถฉ๋Œ์ด ๋‚  ๊ฒƒ์ด๋ผ ๋ณด๊ณ  ๋จผ์ € lock์„ ์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ๊ฒŒ ํ•˜๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋น„๊ด€์  ๋ฝ

๋‰˜์•™์Šค: SELECT FOR UPDATE๋กœ ๋งŽ์ด ์„ค๋ช…ํ•œ๋‹ค.

Pessimistic locking serializes access to the row.

retry storm
์‹คํŒจํ•œ ์š”์ฒญ๋“ค์ด ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋ฉฐ ์žฅ์• ๋ฅผ ํ‚ค์šฐ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์žฌ์‹œ๋„ ํญํ’

๋‰˜์•™์Šค: ์žฅ์•  ๋Œ€์‘์—์„œ ์ž์ฃผ ๋‚˜์˜ค๋Š” ํ‘œํ˜„.

A retry storm overloaded the dependency.

transaction boundary
๋ฌด์—‡๊นŒ์ง€ ํ•œ ์ปค๋ฐ‹์œผ๋กœ ๋ฌถ์„์ง€ ์ •ํ•œ ์„ .
term

์ง์—ญ: ํŠธ๋žœ์žญ์…˜ ๊ฒฝ๊ณ„

๋‰˜์•™์Šค: ๋„ˆ๋ฌด ๋„“์œผ๋ฉด lock์ด ๊ธธ๊ณ , ๋„ˆ๋ฌด ์ข์œผ๋ฉด ๋ฐ˜์ชฝ ์ƒํƒœ๊ฐ€ ์ƒ๊ธด๋‹ค.

I would keep the state change and audit insert in one transaction boundary.

move:idempotent

๋ฉฑ๋“ฑํ•˜๊ฒŒ ๋งŒ๋“ค๊ณ  ๋ฐ˜๋ณตํ•œ๋‹ค

Make retry safe

Open deck
idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

replay
๊ฐ™์€ ์š”์ฒญ์ด๋‚˜ ์ด๋ฒคํŠธ๊ฐ€ ๋‹ค์‹œ ์™”์„ ๋•Œ ์ด์ „ ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ๋Œ๋ ค์ฃผ๋‹ค.
verb

์ง์—ญ: ๋‹ค์‹œ ์žฌ์ƒํ•˜๋‹ค

๋‰˜์•™์Šค: ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค๊ฐ€ ์•„๋‹ˆ๋ผ ์ €์žฅ๋œ ๊ฒฐ๊ณผ๋ฅผ ์žฌ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๊ฐ•ํ•˜๋‹ค.

On retry, we replay the original response.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

stable key
์žฌ์‹œ๋„ํ•ด๋„ ๋ณ€ํ•˜์ง€ ์•Š๋Š” dedup/idempotency ๊ธฐ์ค€๊ฐ’.
term

์ง์—ญ: ์•ˆ์ •์ ์ธ ํ‚ค

๋‰˜์•™์Šค: ๋งค๋ฒˆ ์ƒˆ๋กœ ๋งŒ๋“ค๋ฉด ๋ฉฑ๋“ฑ์„ฑ์ด ๊นจ์ง„๋‹ค.

The idempotency key must be stable across retries.

move:record-first

๋จผ์ € ๊ธฐ๋กํ•˜๊ณ , ๋‚˜์ค‘์— ํ–‰๋™ํ•œ๋‹ค

Record first, act later

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

CDC
DB ๋ณ€๊ฒฝ ๋กœ๊ทธ๋ฅผ ์ฝ์–ด downstream์œผ๋กœ ๋ณด๋‚ด๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ๋ณ€๊ฒฝ ๋ฐ์ดํ„ฐ ์บก์ฒ˜

๋‰˜์•™์Šค: outbox relay ๊ตฌํ˜„์— ์ž์ฃผ ์“ด๋‹ค.

CDC streams outbox rows to Kafka.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

rather than
A ๋Œ€์‹  B๋ฅผ ํƒํ•œ๋‹ค๋Š” ๋Œ€๋น„ ํ‘œํ˜„.
phrase

์ง์—ญ: ~๋ผ๊ธฐ๋ณด๋‹ค

๋‰˜์•™์Šค: trade-off๋ฅผ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ ๋งํ•œ๋‹ค.

I would reject early rather than let the queue grow unbounded.

record first, act later
outbox/log ํŒจํ„ด์˜ ํ•ต์‹ฌ ์›์น™.
phrase

์ง์—ญ: ๋จผ์ € ๊ธฐ๋กํ•˜๊ณ  ๋‚˜์ค‘์— ํ–‰๋™ํ•œ๋‹ค

๋‰˜์•™์Šค: ์™ธ๋ถ€ side effect๋ฅผ DB transaction์— ์–ต์ง€๋กœ ๋ฌถ์ง€ ์•Š๋Š”๋‹ค๋Š” ๋œป.

For notifications, I record first and act later.

side effect
DB write, email, payment charge์ฒ˜๋Ÿผ ์„ธ์ƒ ์ƒํƒœ๋ฅผ ๋ฐ”๊พธ๋Š” ํ–‰๋™.
term

์ง์—ญ: ๋ถ€์ˆ˜ ํšจ๊ณผ

๋‰˜์•™์Šค: ํ•จ์ˆ˜ ๋ฐ˜ํ™˜๊ฐ’๋ณด๋‹ค ์œ„ํ—˜ํ•œ ์‹ค์ œ ๋ณ€๊ฒฝ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค.

Retrying is dangerous if the side effect is not idempotent.

move:reconcile

์ฃผ๊ธฐ์ ์œผ๋กœ ๋Œ€์กฐํ•œ๋‹ค

Reconcile drift

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

mismatch
์„œ๋กœ ๋งž์•„์•ผ ํ•˜๋Š” ๊ฐ’์ด ๋งž์ง€ ์•Š๋Š” ์ƒํƒœ.
term

์ง์—ญ: ๋ถˆ์ผ์น˜

๋‰˜์•™์Šค: reconciliation ๊ฒฐ๊ณผ๋ฅผ ๋ถ„๋ฅ˜ํ•  ๋•Œ ์ž์ฃผ ์“ด๋‹ค.

The reconciler classifies amount mismatches as high severity.

reconciliation loop
๋งž์•„์•ผ ํ•˜๋Š” ๋‘ ์‹œ์Šคํ…œ์„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋น„๊ตํ•ด drift๋ฅผ ์ฐพ๋Š” ์ž‘์—….
term

์ง์—ญ: ๋Œ€์กฐ ๋ฃจํ”„

๋‰˜์•™์Šค: ์ •์‚ฐ, inventory, AI output verification๊นŒ์ง€ ๋„“๊ฒŒ ์“ด๋‹ค.

A reconciliation loop catches the mismatches the first defenses missed.

move:do-less

๋œ ํ•œ๋‹ค

Do less work

Open deck
N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

move:copy

๋ณต์‚ฌํ•œ๋‹ค

Use a copy

Open deck
read replica
์ฝ๊ธฐ ๋ถ€ํ•˜๋ฅผ ๋ถ„์‚ฐํ•˜๊ธฐ ์œ„ํ•œ DB ์‚ฌ๋ณธ.
term

์ง์—ญ: ์ฝ๊ธฐ ๋ณต์ œ๋ณธ

๋‰˜์•™์Šค: ๋น ๋ฅด์ง€๋งŒ replication lag๊ฐ€ ์ƒ๊ธด๋‹ค.

Read replicas reduce primary load but can be stale.

read-your-writes
์‚ฌ์šฉ์ž๊ฐ€ ๋ฐฉ๊ธˆ ์“ด ๊ฐ’์„ ๋ฐ”๋กœ ๋‹ค์‹œ ์ฝ์„ ์ˆ˜ ์žˆ๋Š” ๋ณด์žฅ.
term

์ง์—ญ: ๋‚ด๊ฐ€ ์“ด ๊ฒƒ์€ ๋‚ด๊ฐ€ ์ฝ๋Š”๋‹ค

๋‰˜์•™์Šค: replica๋ฅผ ์ฝ์œผ๋ฉด ๊นจ์งˆ ์ˆ˜ ์žˆ๋‹ค.

Route the user to primary when read-your-writes matters.

replication lag
primary์˜ ์ตœ์‹  ๋ณ€๊ฒฝ์ด replica์— ์•„์ง ๋„์ฐฉํ•˜์ง€ ์•Š์€ ์‹œ๊ฐ„์ฐจ.
term

์ง์—ญ: ๋ณต์ œ ์ง€์—ฐ

๋‰˜์•™์Šค: read-your-writes ๋ฌธ์ œ์™€ ์ง๊ฒฐ๋œ๋‹ค.

Replication lag can make a fresh write invisible.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

move:split

์ชผ๊ฐ ๋‹ค

Split the load

Open deck
bulkhead
ํ•œ ์˜์—ญ ์žฅ์• ๊ฐ€ ๋‹ค๋ฅธ ์˜์—ญ์œผ๋กœ ๋ฒˆ์ง€์ง€ ์•Š๊ฒŒ ๋ฆฌ์†Œ์Šค๋ฅผ ๋ถ„๋ฆฌํ•˜๋Š” ํŒจํ„ด.
term

์ง์—ญ: ๊ฒฉ๋ฒฝ

๋‰˜์•™์Šค: thread pool, connection pool ๋ถ„๋ฆฌ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A bulkhead keeps the shipping API from exhausting checkout threads.

fan out
ํ•œ ์ด๋ฒคํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋Œ€์ƒ์—๊ฒŒ ๋ณต์‚ฌ/์ „ํŒŒํ•˜๋Š” ๊ฒƒ.
verb

์ง์—ญ: ๋ถ€์ฑ„๊ผด๋กœ ํผ๋œจ๋ฆฌ๋‹ค

๋‰˜์•™์Šค: feed, notification, parallel call์—์„œ ์“ด๋‹ค.

The worker fans out the price-drop event to followers.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

saga
์—ฌ๋Ÿฌ ๋กœ์ปฌ ํŠธ๋žœ์žญ์…˜๊ณผ ๋ณด์ƒ ์ž‘์—…์œผ๋กœ ๊ธด workflow๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์‚ฌ๊ฐ€

๋‰˜์•™์Šค: ๋ถ„์‚ฐ ํŠธ๋žœ์žญ์…˜ ๋Œ€์‹  ์“ด๋‹ค.

The payment workflow is modeled as a saga.

shard
๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋…ธ๋“œ๋‚˜ ํŒŒํ‹ฐ์…˜์œผ๋กœ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ์กฐ๊ฐ/์ƒค๋“œ

๋‰˜์•™์Šค: ์ชผ๊ฐœ๊ธฐ์˜ ๋Œ€๊ฐ€๋Š” cross-shard ์ž‘์—…์ด๋‹ค.

User id is the shard key.

thread pool
์ž‘์—…์„ ์ฒ˜๋ฆฌํ•  worker thread ๋ฌถ์Œ.
term

์ง์—ญ: ์Šค๋ ˆ๋“œ ํ’€

๋‰˜์•™์Šค: ๋А๋ฆฐ ํ˜ธ์ถœ์ด ์Šค๋ ˆ๋“œ๋ฅผ ์žก๊ณ  ์žˆ์œผ๋ฉด ์ „์ฒด endpoint๊ฐ€ ๋ง‰ํžŒ๋‹ค.

Timeouts prevent thread pool exhaustion.

move:precompute

๋ฏธ๋ฆฌ ํ•œ๋‹ค

Precompute

Open deck
drift
์›๋ž˜ ๊ฐ™์•„์•ผ ํ•˜๋Š” ๋‘ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉฐ ๋‹ฌ๋ผ์ง€๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ํ‘œ๋ฅ˜/์–ด๊ธ‹๋‚จ

๋‰˜์•™์Šค: data drift, model drift, ledger drift ๋ชจ๋‘์— ์“ด๋‹ค.

The two ledgers can drift if one event is missed.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

materialized view
๋ฏธ๋ฆฌ ๊ณ„์‚ฐํ•ด ์ €์žฅํ•ด๋‘” ์ฝ๊ธฐ์šฉ ๊ฒฐ๊ณผ.
term

์ง์—ญ: ๋ฌผ๋ฆฌํ™”๋œ ๋ทฐ

๋‰˜์•™์Šค: ์ฝ๊ธฐ๋Š” ๋นจ๋ผ์ง€์ง€๋งŒ refresh/write ๋น„์šฉ์ด ์ƒ๊ธด๋‹ค.

A materialized view precomputes the dashboard totals.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

write amplification
๋…ผ๋ฆฌ์  ์“ฐ๊ธฐ ํ•˜๋‚˜๊ฐ€ ๋‚ด๋ถ€์ ์œผ๋กœ ์—ฌ๋Ÿฌ ์“ฐ๊ธฐ๋กœ ๋Š˜์–ด๋‚˜๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์“ฐ๊ธฐ ์ฆํญ

๋‰˜์•™์Šค: index, fan-out, replication, LSM์—์„œ ์ค‘์š”.

Fan-out-on-write causes write amplification.

write path
๋ฐ์ดํ„ฐ๊ฐ€ ์ƒ์„ฑ/๋ณ€๊ฒฝ๋  ๋•Œ ๊ฑฐ์น˜๋Š” ํ๋ฆ„.
term

์ง์—ญ: ์“ฐ๊ธฐ ๊ฒฝ๋กœ

๋‰˜์•™์Šค: outbox, validation, storage๊ฐ€ ๋ณดํ†ต ์—ฌ๊ธฐ์— ์žˆ๋‹ค.

The write path records the event and publishes to Kafka.

move:queue

์ค„ ์„ธ์šด๋‹ค

Queue the work

Open deck
at-least-once
๋ฉ”์‹œ์ง€๊ฐ€ ์†์‹ค๋˜์ง€๋Š” ์•Š์ง€๋งŒ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ๋Š” ์ „๋‹ฌ ๋ณด์žฅ.
term

์ง์—ญ: ์ตœ์†Œ ํ•œ ๋ฒˆ

๋‰˜์•™์Šค: ๊ทธ๋ž˜์„œ consumer idempotency๊ฐ€ ํ•„์š”ํ•˜๋‹ค.

At-least-once delivery means duplicates are normal.

backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

eventual consistency
์ฆ‰์‹œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด ๋งž์•„์ง€๋Š” ์„ฑ์งˆ.
term

์ง์—ญ: ์ตœ์ข… ์ผ๊ด€์„ฑ

๋‰˜์•™์Šค: feed, analytics, notification์— ํ”ํ•˜๋‹ค.

The feed is eventually consistent.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

outbox
DB ๋ณ€๊ฒฝ๊ณผ ํ•จ๊ป˜ ๋ณด๋‚ผ ์ด๋ฒคํŠธ ์˜๋„๋ฅผ ์ €์žฅํ•˜๋Š” ํ…Œ์ด๋ธ”/ํŒจํ„ด.
term

์ง์—ญ: ๋ฐœ์‹ ํ•จ

๋‰˜์•™์Šค: DB commit๊ณผ publish ์‚ฌ์ด์˜ ์œ ์‹ค์„ ๋ง‰๋Š”๋‹ค.

The outbox worker publishes pending events.

move:approximate

๊ทผ์‚ฌํ•œ๋‹ค

Approximate

Open deck
error budget
SLO ์•ˆ์—์„œ ํ—ˆ์šฉ๋˜๋Š” ์‹คํŒจ๋Ÿ‰.
term

์ง์—ญ: ์—๋Ÿฌ ์˜ˆ์‚ฐ

๋‰˜์•™์Šค: ๋ฐฐํฌ ์†๋„์™€ ์•ˆ์ •ํ™” ์ž‘์—…์„ ์กฐ์ ˆํ•˜๋Š” ๊ธฐ์ค€.

If we burn the error budget, we stop risky launches.

hot key
์š”์ฒญ์ด ํ•œ ํ‚ค/ํŒŒํ‹ฐ์…˜์— ๊ณผ๋„ํ•˜๊ฒŒ ๋ชฐ๋ฆฌ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ๋œจ๊ฑฐ์šด ํ‚ค

๋‰˜์•™์Šค: cache, Redis, Kafka, DynamoDB์—์„œ ์ž์ฃผ ๋ฌธ์ œ ๋œ๋‹ค.

A viral listing becomes a hot key.

idempotent
์—ฌ๋Ÿฌ ๋ฒˆ ์‹คํ–‰ํ•ด๋„ ๊ฒฐ๊ณผ ์ƒํƒœ๊ฐ€ ํ•œ ๋ฒˆ ์‹คํ–‰ํ•œ ๊ฒƒ๊ณผ ๊ฐ™์€ ์„ฑ์งˆ.
term

์ง์—ญ: ๋ฉฑ๋“ฑํ•œ

๋‰˜์•™์Šค: retry๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ํ•ต์‹ฌ ๋‹จ์–ด.

The webhook handler must be idempotent.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

move:layer

์‚ฌ์ด์— ์ธต์„ ๋‘”๋‹ค

Add a layer

Open deck
adapter
์™ธ๋ถ€ API๋‚˜ ๊ตฌํ˜„ ์ฐจ์ด๋ฅผ ๋‚ด๋ถ€ ๊ณ„์•ฝ์— ๋งž์ถฐ ๊ฐ์‹ธ๋Š” ๋ ˆ์ด์–ด.
term

์ง์—ญ: ์–ด๋Œ‘ํ„ฐ

๋‰˜์•™์Šค: ๊ต์ฒด ๊ฐ€๋Šฅ์„ฑ๊ณผ testability๋ฅผ ์–ป๋Š”๋‹ค.

The payment adapter hides provider-specific APIs.

BFF
ํŠน์ • ํด๋ผ์ด์–ธํŠธ ํ™”๋ฉด์— ๋งž์ถฐ ์—ฌ๋Ÿฌ backend ์‘๋‹ต์„ ์กฐ๋ฆฝํ•˜๋Š” ๋ ˆ์ด์–ด.
term

์ง์—ญ: ๋ฐฑ์—”๋“œ ํฌ ํ”„๋ก ํŠธ์—”๋“œ

๋‰˜์•™์Šค: ํ•œ ํ™‰์„ ์ถ”๊ฐ€ํ•˜์ง€๋งŒ client call ์ˆ˜๋ฅผ ์ค„์ธ๋‹ค.

The mobile BFF shapes the home screen payload.

circuit breaker
์˜์กด์„ฑ์ด ๊ณ„์† ์‹คํŒจํ•˜๋ฉด ํ˜ธ์ถœ์„ ์ž ์‹œ ๋ง‰๊ณ  ๋น ๋ฅด๊ฒŒ ์‹คํŒจ์‹œํ‚ค๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์ฐจ๋‹จ๊ธฐ

๋‰˜์•™์Šค: ์ง‘ ์ „๊ธฐ ์ฐจ๋‹จ๊ธฐ ๋น„์œ  ๊ทธ๋Œ€๋กœ๋‹ค.

The circuit breaker opens after repeated failures.

failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

gateway
์—ฌ๋Ÿฌ ์„œ๋น„์Šค ์•ž์—์„œ ์ธ์ฆ, ๋ผ์šฐํŒ…, rate limit ๋“ฑ์„ ๋งก๋Š” ์ง„์ž…์ .
term

์ง์—ญ: ๊ฒŒ์ดํŠธ์›จ์ด

๋‰˜์•™์Šค: MCP gateway์™€ protocol์„ ํ˜ผ๋™ํ•˜์ง€ ๋ง ๊ฒƒ.

The API gateway applies auth and rate limits.

latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

trace
ํ•œ ์š”์ฒญ/์‹คํ–‰์ด ์–ด๋–ค ๋‹จ๊ณ„๋ฅผ ๊ฑฐ์ณค๋Š”์ง€ ์ด์–ด์„œ ๋ณด๋Š” ๊ธฐ๋ก.
term

์ง์—ญ: ์ถ”์  ๊ธฐ๋ก

๋‰˜์•™์Šค: logs๋ณด๋‹ค ํ๋ฆ„์„ ๋ณด๊ธฐ ์ข‹๋‹ค.

The trace shows which tool call failed.

move:limits

๋ชจ๋“  ๊ฒƒ์— ํ•œ๋„๋ฅผ ๊ฑด๋‹ค

Put limits on everything

Open deck
backpressure
์†Œ๋น„์ž๊ฐ€ ๋А๋ฆด ๋•Œ ์ƒ์‚ฐ์ž์—๊ฒŒ ์†๋„๋ฅผ ์ค„์ด๋ผ๋Š” ์‹ ํ˜ธ๋ฅผ ์ฃผ๋Š” ๊ตฌ์กฐ.
term

์ง์—ญ: ์—ญ์••/๋’ค์—์„œ ๋ฏธ๋Š” ์••๋ ฅ

๋‰˜์•™์Šค: queue depth, bounded queue, streaming์—์„œ ์ค‘์š”.

The bounded queue creates backpressure.

bounded queue
์ตœ๋Œ€ ํฌ๊ธฐ๊ฐ€ ์ •ํ•ด์ ธ ์žˆ์–ด ๋„˜์น˜๋ฉด ๊ฑฐ์ ˆํ•˜๋Š” ํ.
term

์ง์—ญ: ์ƒํ•œ ์žˆ๋Š” ํ

๋‰˜์•™์Šค: unbounded queue๋Š” OOM ์œ„ํ—˜์ด ์žˆ๋‹ค.

A bounded queue is the backpressure boundary.

cache miss
์บ์‹œ์— ์—†์–ด ์›๋ณธ ์ €์žฅ์†Œ๋กœ ๊ฐ€์•ผ ํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์บ์‹œ ๋ฏธ์Šค

๋‰˜์•™์Šค: miss๊ฐ€ ๋ชฐ๋ฆฌ๋ฉด DB๊ฐ€ ํ„ฐ์ง„๋‹ค.

Cache misses spike after TTL expiry.

jitter
์žฌ์‹œ๋„ ์‹œ๊ฐ„์„ ์กฐ๊ธˆ ๋žœ๋คํ•˜๊ฒŒ ํฉ๋œจ๋ฆฌ๋Š” ๊ฒƒ.
term

์ง์—ญ: ํ”๋“ค๋ฆผ/๋žœ๋ค ์ง€์—ฐ

๋‰˜์•™์Šค: ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋Š” ์ผ์„ ๋ง‰๋Š”๋‹ค.

Backoff needs jitter to avoid a retry herd.

p99
์š”์ฒญ์˜ 99%๊ฐ€ ์ด ๊ฐ’๋ณด๋‹ค ๋น ๋ฅธ ๊ฒฝ๊ณ„.
term

์ง์—ญ: 99๋ฒˆ์งธ ๋ฐฑ๋ถ„์œ„

๋‰˜์•™์Šค: ๊ฐ€์žฅ ๋А๋ฆฐ 1% ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ๋ณธ๋‹ค.

If p99 jumps, I check queues and dependencies.

retry cap
๋ฌดํ•œ ์žฌ์‹œ๋„๋ฅผ ๋ง‰๋Š” ์ตœ๋Œ€ ์‹œ๋„ ํšŸ์ˆ˜.
term

์ง์—ญ: ์žฌ์‹œ๋„ ์ƒํ•œ

๋‰˜์•™์Šค: timeout๋งŒ ์žˆ๊ณ  retry cap์ด ์—†์œผ๋ฉด retry storm์ด ๋‚œ๋‹ค.

I set a retry cap of three attempts.

retry storm
์‹คํŒจํ•œ ์š”์ฒญ๋“ค์ด ๋™์‹œ์— ์žฌ์‹œ๋„ํ•˜๋ฉฐ ์žฅ์• ๋ฅผ ํ‚ค์šฐ๋Š” ํ˜„์ƒ.
term

์ง์—ญ: ์žฌ์‹œ๋„ ํญํ’

๋‰˜์•™์Šค: ์žฅ์•  ๋Œ€์‘์—์„œ ์ž์ฃผ ๋‚˜์˜ค๋Š” ํ‘œํ˜„.

A retry storm overloaded the dependency.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

thread pool
์ž‘์—…์„ ์ฒ˜๋ฆฌํ•  worker thread ๋ฌถ์Œ.
term

์ง์—ญ: ์Šค๋ ˆ๋“œ ํ’€

๋‰˜์•™์Šค: ๋А๋ฆฐ ํ˜ธ์ถœ์ด ์Šค๋ ˆ๋“œ๋ฅผ ์žก๊ณ  ์žˆ์œผ๋ฉด ์ „์ฒด endpoint๊ฐ€ ๋ง‰ํžŒ๋‹ค.

Timeouts prevent thread pool exhaustion.

unbounded
๋์—†์ด ์ปค์งˆ ์ˆ˜ ์žˆ๋Š” ์ƒํƒœ.
term

์ง์—ญ: ์ƒํ•œ ์—†๋Š”

๋‰˜์•™์Šค: ์žฅ์• ์˜ ๋ƒ„์ƒˆ. queue, retry, memory, history์— ๋ถ™์œผ๋ฉด ์œ„ํ—˜ ์‹ ํ˜ธ.

Every unbounded thing becomes an outage.

move:fail-visible

ํฌ๊ฒŒยท๋นจ๋ฆฌยท๋ณด์ด๊ฒŒ ์‹คํŒจํ•œ๋‹ค

Fail visibly

Open deck
circuit breaker
์˜์กด์„ฑ์ด ๊ณ„์† ์‹คํŒจํ•˜๋ฉด ํ˜ธ์ถœ์„ ์ž ์‹œ ๋ง‰๊ณ  ๋น ๋ฅด๊ฒŒ ์‹คํŒจ์‹œํ‚ค๋Š” ํŒจํ„ด.
term

์ง์—ญ: ์ฐจ๋‹จ๊ธฐ

๋‰˜์•™์Šค: ์ง‘ ์ „๊ธฐ ์ฐจ๋‹จ๊ธฐ ๋น„์œ  ๊ทธ๋Œ€๋กœ๋‹ค.

The circuit breaker opens after repeated failures.

dead letter queue
๊ณ„์† ์‹คํŒจํ•œ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฒ„๋ฆฌ์ง€ ์•Š๊ณ  ๊ฒฉ๋ฆฌ ๋ณด๊ด€ํ•˜๋Š” ํ.
term

์ง์—ญ: ์ฃฝ์€ ํŽธ์ง€ ํ

๋‰˜์•™์Šค: DLQ๋ผ๊ณ  ๋งŽ์ด ๋งํ•œ๋‹ค.

Poison messages go to the dead letter queue.

deserialization
byte/text๋ฅผ ๋‹ค์‹œ ๊ฐ์ฒด/๊ตฌ์กฐ๋กœ ์ฝ๋Š” ๊ฒƒ.
term

์ง์—ญ: ์—ญ์ง๋ ฌํ™”

๋‰˜์•™์Šค: schema mismatch๊ฐ€ poison message๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

Deserialization failed after the schema change.

fail fast
๋ถ™์žก๊ณ  ๊ธฐ๋‹ค๋ฆฌ์ง€ ์•Š๊ณ  ๋นจ๋ฆฌ ์—๋Ÿฌ๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ์‹.
phrase

์ง์—ญ: ๋นจ๋ฆฌ ์‹คํŒจํ•˜๋‹ค

๋‰˜์•™์Šค: ์žฅ์• ๋ฅผ ์ˆจ๊ธฐ์ง€ ์•Š๊ณ  ์ž์› ๊ณ ๊ฐˆ์„ ๋ง‰๋Š” ์˜๋ฏธ.

The circuit breaker fails fast when the dependency is down.

preserve evidence
์‹คํŒจ ์›์ธ์„ ๋ถ„์„ํ•  ์ˆ˜ ์žˆ๋„๋ก payload/log/context๋ฅผ ๋‚จ๊ธฐ๋‹ค.
collocation

์ง์—ญ: ์ฆ๊ฑฐ๋ฅผ ๋ณด์กดํ•˜๋‹ค

๋‰˜์•™์Šค: DLQ์™€ audit์—์„œ ์ค‘์š”.

The DLQ preserves evidence for replay.

move:quorum

ํ•ฉ์˜ํ•œ๋‹ค

Reach agreement

Open deck
latency
์š”์ฒญ ํ•˜๋‚˜๊ฐ€ ๋๋‚˜๊ธฐ๊นŒ์ง€ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„.
term

์ง์—ญ: ์ง€์—ฐ์‹œ๊ฐ„

๋‰˜์•™์Šค: ํ‰๊ท ๋ณด๋‹ค percentile์ด ์ค‘์š”ํ•˜๋‹ค.

Latency is measured per request.

leader election
์—ฌ๋Ÿฌ ๋…ธ๋“œ ์ค‘ ํ•˜๋‚˜๋งŒ leader๋กœ ์ •ํ•˜๋Š” ์ ˆ์ฐจ.
term

์ง์—ญ: ๋ฆฌ๋” ์„ ์ถœ

๋‰˜์•™์Šค: ๋ฐฐ์น˜, lock, consensus์—์„œ ๋‚˜์˜จ๋‹ค.

Leader election ensures only one worker runs the job.

partition
๋ฐ์ดํ„ฐ๋‚˜ ์ž‘์—…์„ ๊ธฐ์ค€์— ๋”ฐ๋ผ ๋‚˜๋ˆˆ ๋‹จ์œ„.
term

์ง์—ญ: ํŒŒํ‹ฐ์…˜/๋ถ„ํ• 

๋‰˜์•™์Šค: DB partition, Kafka partition, network partition ๋ชจ๋‘ ๋ฌธ๋งฅ์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค.

The partition key decides where the data lives.

quorum
์—ฌ๋Ÿฌ replica ์ค‘ ๋ช‡ ๊ฐœ ์ด์ƒ์˜ ๋™์˜๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ทœ์น™.
term

์ง์—ญ: ์ •์กฑ์ˆ˜/๋‹ค์ˆ˜๊ฒฐ

๋‰˜์•™์Šค: R+W>N ๊ฐ™์€ ์กฐ๊ฑด์œผ๋กœ ์„ค๋ช…ํ•œ๋‹ค.

A quorum write waits for two of three replicas.

source of truth
์–ด๋–ค ์‚ฌ์‹ค์„ ์ตœ์ข…์ ์œผ๋กœ ๋ฏฟ์„ ํ•œ ๊ณณ.
term

์ง์—ญ: ์ง„์‹ค์˜ ์ถœ์ฒ˜

๋‰˜์•™์Šค: cache, UI, replica๋Š” ํŒŒ์ƒ๊ฐ’์ด๊ณ  ์ง„์งœ ์†Œ์œ ์ž๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‹ค๋Š” ๋œป์œผ๋กœ ์“ด๋‹ค.

The database is the source of truth for payment state.

stale
์›๋ณธ๋ณด๋‹ค ๋’ค์ฒ˜์ง„ ๋ฐ์ดํ„ฐ.
term

์ง์—ญ: ์˜ค๋ž˜๋œ/๋‚ก์€

๋‰˜์•™์Šค: cache์™€ replica์˜ ๊ณ ์ • ๋Œ€๊ฐ€.

Caching buys speed but can serve stale data.

move:bruteforce

์ „์ˆ˜์กฐ์‚ฌ ๋จผ์ €

Start with brute force

Open deck
baseline
๊ฐœ์„  ์ „ ๋น„๊ต ๊ธฐ์ค€.
term

์ง์—ญ: ๊ธฐ์ค€์„ 

๋‰˜์•™์Šค: SOTA๋ณด๋‹ค baseline์„ ๋จผ์ € ๋งํ•˜๋ฉด ๋” ์—”์ง€๋‹ˆ์–ด๋‹ต๋‹ค.

I compare the new retriever against the baseline.

edge case
๋ณดํ†ต ํ๋ฆ„์ด ์•„๋‹Œ ๊ฒฝ๊ณ„/์˜ˆ์™ธ ์ƒํ™ฉ.
term

์ง์—ญ: ๊ฐ€์žฅ์ž๋ฆฌ ๊ฒฝ์šฐ

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ๋Š” happy path์™€ ๋Œ€๋น„ํ•ด์„œ ๋งํ•œ๋‹ค.

I would test the timeout edge case separately.

N+1
๋ถ€๋ชจ 1๋ฒˆ ์กฐํšŒ ํ›„ ์ž์‹ N๊ฐœ๋ฅผ ๋ฃจํ”„์—์„œ ๊ฐ๊ฐ ์กฐํšŒํ•˜๋Š” ๋น„ํšจ์œจ.
term

์ง์—ญ: N ๋”ํ•˜๊ธฐ 1

๋‰˜์•™์Šค: ORM/JPA ๋ฉด์ ‘ ๋‹จ๊ณจ.

The endpoint had an N+1 query problem.

sequential scan
ํ…Œ์ด๋ธ”์„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋๊นŒ์ง€ ์ฝ๋Š” ๋ฐฉ์‹.
term

์ง์—ญ: ์ˆœ์ฐจ ์Šค์บ”

๋‰˜์•™์Šค: ์ž‘์€ ํ…Œ์ด๋ธ”์—์„œ๋Š” ๊ดœ์ฐฎ์ง€๋งŒ ํฐ ํ…Œ์ด๋ธ”์—์„œ ์œ„ํ—˜.

EXPLAIN showed a sequential scan over ten million rows.

move:sort

์ •๋ ฌํ•˜๊ณ  ์‹œ์ž‘ํ•œ๋‹ค

Sort first

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

move:binary-search

๋ฐ˜์”ฉ ๋ฒ„๋ฆฐ๋‹ค

Discard half

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

move:divide

๋‚˜๋ˆ  ํ’€๊ณ  ํ•ฉ์นœ๋‹ค

Divide and combine

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

move:dp

ํ‘ผ ๊ฒƒ์€ ๊ธฐ์–ตํ•œ๋‹ค

Remember solved work

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

move:greedy

๋งค ์ˆœ๊ฐ„ ์ตœ์„ ๋งŒ

Make the local choice

Open deck
as long as
์กฐ๊ฑด์„ ๋ถ™์ด๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ~ํ•˜๋Š” ํ•œ

๋‰˜์•™์Šค: ๋ณด์žฅ/๊ฐ€์ • ๋งํ•  ๋•Œ ์œ ์šฉ.

This is safe as long as the key is stable.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

move:window

์ฐฝ๋ฌธ์„ ๋ฏผ๋‹ค

Slide the window

Open deck
fall out
context๋‚˜ cache ๋ฒ”์œ„์—์„œ ๋น ์ ธ์„œ ๋” ์ด์ƒ ๋ณด์ด์ง€ ์•Š๊ฒŒ ๋˜๋‹ค.
verb

์ง์—ญ: ๋ฐ–์œผ๋กœ ๋–จ์–ด์ง€๋‹ค

๋‰˜์•™์Šค: LLM history, cache, sliding window์—์„œ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์“ด๋‹ค.

Old messages fall out of the context window.

invariant
๋ฌด์Šจ ์ผ์ด ์žˆ์–ด๋„ ํ•ญ์ƒ ์ฐธ์ด์–ด์•ผ ํ•˜๋Š” ์กฐ๊ฑด.
term

์ง์—ญ: ๋ถˆ๋ณ€์‹

๋‰˜์•™์Šค: ๋™์‹œ์„ฑ, transaction, state machine์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋‹จ์–ด.

The invariant is that stock can never go below zero.

move:hash

ํ•ด์‹œ๋กœ O(1)์— ์ฐพ๋Š”๋‹ค

Use a hash lookup

Open deck
cache miss
์บ์‹œ์— ์—†์–ด ์›๋ณธ ์ €์žฅ์†Œ๋กœ ๊ฐ€์•ผ ํ•˜๋Š” ์ƒํ™ฉ.
term

์ง์—ญ: ์บ์‹œ ๋ฏธ์Šค

๋‰˜์•™์Šค: miss๊ฐ€ ๋ชฐ๋ฆฌ๋ฉด DB๊ฐ€ ํ„ฐ์ง„๋‹ค.

Cache misses spike after TTL expiry.

garbage collection
๋” ์ด์ƒ ์ฐธ์กฐ๋˜์ง€ ์•Š๋Š” ๊ฐ์ฒด ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํšŒ์ˆ˜ํ•˜๋Š” ๊ณผ์ •.
term

์ง์—ญ: ๊ฐ€๋น„์ง€ ์ปฌ๋ ‰์…˜

๋‰˜์•™์Šค: GC pause๋Š” p99 spike ์›์ธ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

GC pauses can show up as tail latency.

move:traverse

ํผ์ ธ๋‚˜๊ฐ€๋ฉฐ ํƒ์ƒ‰ํ•œ๋‹ค

Traverse the graph

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.

move:backtrack

์‹œ๋„ํ•˜๊ณ  ๋˜๋Œ๋ฆฐ๋‹ค

Try and undo

Open deck
failure mode
์‹œ์Šคํ…œ์ด ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ง๊ฐ€์ง€๋Š”์ง€.
term

์ง์—ญ: ์‹คํŒจ ๋ฐฉ์‹

๋‰˜์•™์Šค: ๊ทธ๋ƒฅ risk๋ณด๋‹ค ๋” ์—”์ง€๋‹ˆ์–ด๋ง์ ์ธ ํ‘œํ˜„.

The failure mode is duplicate side effects after a timeout.

in practice
์ด๋ก ๊ณผ ์‹ค์ œ ์šด์˜์˜ ์ฐจ์ด๋ฅผ ๋งํ•  ๋•Œ ์“ฐ๋Š” ํ‘œํ˜„.
phrase

์ง์—ญ: ์‹ค์ œ๋กœ๋Š”

๋‰˜์•™์Šค: ๋ฉด์ ‘ ๋‹ต๋ณ€์„ ํ˜„์‹ค์ ์œผ๋กœ ๋งŒ๋“ ๋‹ค.

In practice, I would start with Postgres FTS.

pin down
๋ชจํ˜ธํ•œ ๊ฒƒ์„ ์ •ํ™•ํžˆ ์ •ํ•˜๋‹ค.
verb

์ง์—ญ: ํ•€์œผ๋กœ ๊ณ ์ •ํ•˜๋‹ค

๋‰˜์•™์Šค: requirements, invariant, scope๋ฅผ ์ •ํ•  ๋•Œ ์ž์—ฐ์Šค๋Ÿฝ๋‹ค.

I want to pin down the invariant first.

trade-off
ํ•˜๋‚˜๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด ๋‹ค๋ฅธ ๊ฒƒ์„ ๋‚ด์ฃผ๋Š” ์„ ํƒ.
term

์ง์—ญ: ๊ตํ™˜/์ ˆ์ถฉ

๋‰˜์•™์Šค: ์žฅ๋‹จ์  ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๋ฌด์—‡์„ ํฌ๊ธฐํ–ˆ๋Š”์ง€ ๋งํ•ด์•ผ ํ•œ๋‹ค.

The trade-off is faster reads for stale data.

walk through
๋‹จ๊ณ„๋ณ„๋กœ ์„ค๋ช…ํ•˜๋‹ค.
verb

์ง์—ญ: ๊ฑธ์–ด์„œ ํ†ต๊ณผํ•˜๋‹ค

๋‰˜์•™์Šค: ๋ฉด์ ‘์—์„œ '์ œ๊ฐ€ ํ๋ฆ„์„ ์„ค๋ช…ํ•ด๋ณผ๊ฒŒ์š”' ๋А๋‚Œ.

Let me walk through the request path.