Rules of thumb, back-of-the-envelope estimation formulas, database selection matrices, and architectural trade-off comparisons.
| Use Case Requirement | Recommended Storage Engine | Example Systems |
|---|---|---|
| Complex Relational Join + ACID | B+ Tree Relational RDBMS | PostgreSQL, MySQL |
| Ultra-High Write Ingestion & Time-Series | LSM-Tree Append Log | Cassandra, ScyllaDB, RocksDB |
| Sub-millisecond Read Caching | In-Memory Key-Value Store | Redis, Memcached |
| Unstructured JSON Document Flexibility | Document Store | MongoDB, Couchbase |
| Highly Connected Social Graphs | Graph Database | Neo4j, AWS Neptune |
| Vector Similarity Search / LLM Embeddings | HNSW / IVF Index Vector DB | pgvector, Pinecone, Milvus |
• Push (WebSockets / Server-Sent Events): Low latency, real-time, but risk of overwhelming slow consumers if backpressure is missing.
• Pull (Kafka / Polling): Consumers control batch size & processing rate (natural backpressure), but introduces slight polling latency.
• Cache-Aside: App reads cache; on miss, reads DB and populates cache. Resilient to cache failure, but risk of dirty data.
• Write-Through: App writes to cache, cache writes synchronously to DB. Ensures consistency, but increases write latency.