Part 13 · Revision sheet
Advanced Specializations (Optional)
Key Terms
- Inverted index — maps a term to the list of documents containing it, turning "find every document with X" into a lookup instead of a scan (→ 209)
- Geohash / quadtree / H3 — cell schemes that preserve spatial locality, each trading a specific precision/density/boundary-artifact profile for turning "near me" into a handful of cell lookups (→ 210)
- Tenant isolation model — shared schema → schema-per-tenant → database-per-tenant, trading isolation for cost and operational complexity (→ 211)
- Cell (cell-based architecture) — a complete vertical slice (compute, data, queue, cache) serving a bounded subset of tenants, sharing nothing across cells but the router (→ 212)
- OLAP / data warehouse — column-oriented storage built for few large scans, the opposite workload shape from OLTP's many small row-touching transactions (→ 213)
- Lambda vs. kappa architecture — two pipelines (batch + speed) merged at serving time, versus one streaming pipeline replayed for "batch" results (→ 214)
- Erasure coding — k data fragments plus m parity fragments reconstruct the original from any k of the k+m, trading replication's simple copies for lower storage at the cost of reconstruction compute (→ 215)
- Device shadow/twin — a server-side record of a device's last-known and desired state, readable and writable while the device itself is offline (→ 217)
- Model registry — a versioned store of trained model artifacts, identifying which is live and enabling rollback to a known-good prior version (→ 219)
- KV-cache — per-token cached intermediate results in LLM serving whose memory grows with sequence length and the number of concurrent requests served (→ 220)
- Retrieval-augmented generation (RAG) — retrieving relevant corpus material and placing it in the prompt as grounding before generation (→ 221)
- Approximate nearest neighbor (ANN) — trading a small, tunable chance of missing the true closest vector for a large speedup over exact search (→ 222)
Decision Rules
- Reach for a dedicated search engine only once relevance ranking or faceted navigation outgrows database full-text search (→ 209)
- Pick a geospatial cell scheme by density pattern — quadtrees for uneven density, H3 to avoid the corner-vs-edge distance artifact a square grid has (→ 210)
- Move only the measured "whale" tenants to a more isolated tier; don't isolate every tenant uniformly at the most expensive level (→ 211)
- Use cell-based architecture when blast-radius containment matters more than the resource efficiency lost to running several complete stacks (→ 212)
- Prefer a warehouse/lake for analytical scans; avoid running them directly against production OLTP (→ 213)
- Use real-time analytics only when freshness genuinely needs to be seconds-to-minutes and a small approximation error is tolerable; otherwise a batch warehouse is simpler (→ 214)
- Build or operate a distributed file system only if you are the team building that storage layer; otherwise use managed object storage (→ 215)
- Use the full candidate-generation-then-ranking funnel only once a simpler heuristic (popularity, recency, same category) is measured and found wanting (→ 216)
- Push compute to the edge only for the specific function proven latency- or bandwidth-bound; keep anything needing strong state or consistency at core (→ 218)
- Ship an ML-powered feature only with a committed plan for drift monitoring and retraining — a model shipped once and never watched is a latent outage (→ 219)
- Route simple requests to a smaller, cheaper model; reserve the largest model for requests that actually need its capability (→ 220)
- Match the parallelism strategy (data, tensor, or pipeline) to the specific reason a model doesn't fit on one GPU, not by default (→ 223)
Numbers & Formulas
None — this part teaches no standalone numbers or formulas.
Traps
- Geohash's prefix matching can miss a genuine neighbor sitting just across a cell boundary (→ 210)
- A missing tenant_id filter in a shared schema is the worst-case isolation failure — a direct leak between tenants (→ 211)
- Cold start and training-serving feature-store skew silently degrade recommendation and model quality with no visible error (→ 216, 219)
- KV-cache memory, not raw compute, is typically what limits how many concurrent LLM requests one server can serve (→ 220)
- Chunking that splits a crucial fact across two RAG chunks means neither retrieval nor the model ever sees it whole (→ 221)
Self-Quiz
Mark the questions you can explain and choose which topics to revisit.
Answers are available for this page visit. Browser storage is unavailable.
-
Can you explain why postings-list intersection beats scanning documents, and compute a relevance score by hand? (no → revisit 209)
-
Can you pick a geospatial cell scheme for a given density pattern and name its specific failure mode? (no → revisit 210)
-
Can you pick a tenant isolation model for a given tenant profile and name its specific isolation gap? (no → revisit 211)
-
Can you fill the AI/ML lifecycle template for a real feature and name one measurable drift signal? (no → revisit 219)
-
Can you diagnose whether a bad RAG answer was a retrieval failure or a generation failure? (no → revisit 221)