Low Level Design: Peer-to-Peer Network
P2P Architecture Types Two main architectures: unstructured (Gnutella) uses flood queries to locate content; structured (Kademlia DHT) provides O(log N) […]
P2P Architecture Types Two main architectures: unstructured (Gnutella) uses flood queries to locate content; structured (Kademlia DHT) provides O(log N) […]
Column Storage Basics In a column store, each column is stored separately on disk. This enables: Reading only the columns
CRDT: Conflict-Free Replicated Data Types CRDTs are data structures that guarantee strong eventual consistency: any two replicas that have received
Vector Clock Service Vector clocks track causality in distributed systems without requiring synchronized physical clocks. Each node maintains a vector
Consensus Protocol Service: Raft Raft is a consensus algorithm designed to be understandable. It decomposes consensus into relatively independent subproblems:
Data Model CheckJob Table CheckJob ( id, target_domain, status: queued/running/completed, started_at, completed_at, total_links, broken_count ) LinkResult Table LinkResult ( id,
Sitemap XML Format urlset with url entries: loc, lastmod, changefreq, priority. Sitemap Index For sites with >50K URLs, generate multiple
URL Frontier Priority queue of URLs to crawl, prioritized by PageRank estimate + freshness. CrawlJob Table CrawlJob ( id, url,
Query Syntax A full-featured query parser supports: AND/OR/NOT boolean operators, phrase queries (exact ordered match), field-specific search (title:python), wildcards (*
Invoice Service: Overview An invoice service manages the full lifecycle of invoices: creation, line items, tax, PDF generation, payment collection,
Overview A payout service disburses funds to recipients via multiple rails: ACH (batch, 1-2 day settlement), wire (same-day, high fee),
Double-Entry Accounting Primer Every financial event produces at least two journal lines: one debit and one credit. The sum of
ML Model Serving Service: Low Level Design An ML model serving service provides versioned, low-latency online inference alongside batch prediction,
Experimentation Platform: Low Level Design An experimentation platform enables A/B and multivariate tests with rigorous statistical guarantees. This design covers
Feature Flag Targeting Service: Low Level Design A feature flag targeting service lets teams release features safely by controlling visibility