Recommendation updated for HTMX + server (Hono / Django / Rails / Phoenix) on Cloudflare.
Per-kingdom recommendation
Where the books must balance. Put the data that has to be correct — accounts, invoices, permissions, orders — behind a relational engine with real ACID guarantees. Postgres is the default for a reason: schemas, constraints, indexes, JSONB, and pgvector in one engine. Why it matters: if this kingdom fails, everything downstream is telling polite lies.
-
Cloudflare D1
Primary pick
SQLite at the edge, replicated per region, ideal for per-tenant read-heavy workloads that don't need cross-shard joins.
-
Neon (serverless Postgres)
Primary pick
Serverless Postgres with branching — production branches, dev branches, and auto-suspend for cheap preview environments.
-
Supabase (managed Postgres)
Solid alternative
Managed Postgres plus auth, row-level security, and edge functions — fastest way from SQL to shipped product.
02
Relational Writes at Global Scale
Only claim this kingdom when you truly need multi-region writes — most teams don't. Distributed SQL pays the latency tax of consensus for the privilege of ACID across continents. Reach here when a single-region Postgres plus read replicas no longer survives your traffic shape.
-
CockroachDB Cloud
Primary pick
Postgres-compatible distributed SQL; pairs well with any cloud, including Cloudflare via HTTP driver.
03
Flexible Application Objects
Hierarchical, schema-light data that maps directly to an application object — user profiles, CMS entries, product catalogs with varying attributes. Choose a document store when the cost of a rigid schema is friction you can measure. Otherwise Postgres with JSONB columns is usually the honest answer.
-
MongoDB Atlas
Primary pick
The document database most teams actually use — excellent tooling, cross-cloud.
-
Durable Objects (per-tenant state)
Solid alternative
Per-tenant single-writer state at the edge — perfect for chat rooms, game sessions, and collaborative documents.
-
Postgres JSONB (pragmatic escape hatch)
Pragmatic escape hatch
The honest truth: most document workloads fit beautifully in Postgres JSONB with GIN indexes.
04
Massive Write Distribution
Telemetry, IoT, time-series, event streams at scale. Wide-column stores trade query flexibility for ingestion throughput — every table is designed against a fixed query pattern. Only enter this kingdom when your writes outpace a sharded Postgres, not before.
-
Skip unless write-heavy + multi-region
Pragmatic escape hatch
Honestly, you probably don't need this kingdom yet — a well-tuned Postgres goes a long way.
05
Explicit Relationships
When the edges between entities are the product — social graphs, fraud rings, knowledge graphs, permission inheritance — a native graph engine makes traversal ergonomic and fast. Postgres recursive CTEs can carry you surprisingly far; graduate to Neo4j when traversals dominate your query plan.
-
Neo4j AuraDB
Primary pick
Managed Neo4j across all three hyperscalers — the most ergonomic Cypher experience.
-
Apache AGE (Postgres graph extension)
Solid alternative
Postgres extension that brings openCypher queries inside your existing relational engine.
-
Recursive CTEs on Postgres (skip a dedicated graph store for now)
Pragmatic escape hatch
For most apps, recursive CTEs on Postgres carry the graph load — add a native store when traversals dominate.
Embeddings for RAG, recommendation, and semantic search. The honest default in 2026 is pgvector on your existing Postgres — one engine, one backup, one security perimeter. Reach for a dedicated vector platform only when index size or QPS breaks the co-located model.
-
pgvector on your Postgres
Primary pick
EU
pgvector sits inside your existing Postgres — one engine, one backup, one security perimeter, zero integration work.
-
Cloudflare Vectorize
Primary pick
Cloudflare's native vector store — fast, edge-colocated, priced for small-to-medium indexes.
-
Qdrant Cloud
Solid alternative
Managed Qdrant — arguably the best developer experience in dedicated vector databases.
07
Lexical + Full-Text Search
Tokenized, stemmed, ranked text search. Postgres full-text gets you impressively far for small to mid catalogs; Elasticsearch, OpenSearch, or Meilisearch become worth the operational cost once you need advanced analyzers, facet-heavy UX, or billion-document corpuses.
-
Elastic Cloud
Primary pick
Elastic's own managed service — the richest query DSL, the steepest learning curve.
-
Meilisearch (managed or self-host)
Solid alternative
EU
Fast, typo-tolerant, and easy to operate — a realistic Elasticsearch alternative for most apps.
-
Algolia (hosted search)
Solid alternative
Search as a product — drop-in UX, high cost per query, excellent for marketplaces and e-commerce.
-
Postgres full-text search (tsvector/GIN)
Pragmatic escape hatch
EU
tsvector + GIN gets you much further than people expect; start here and only upgrade when you must.
OLAP workloads — aggregations over billions of rows, cohort analysis, BI dashboards. Columnar stores (ClickHouse, BigQuery, Redshift) separate analytics from your transactional engine so long-running queries never starve user-facing writes. Start small with DuckDB; upgrade when analysts are waiting.
-
ClickHouse Cloud
Primary pick
ClickHouse Cloud — one of the fastest columnar engines, now operationally boring.
-
MotherDuck (DuckDB cloud)
Solid alternative
DuckDB in the cloud — serverless analytics without reinventing your data stack.
-
DuckDB embedded / Parquet on object storage
Pragmatic escape hatch
EU
DuckDB inside your process reading Parquet on object storage — a zero-server analytics layer.
Sessions, rate limits, feature flags, hot computation results. A cache isn't a database — it's the layer that absorbs the pressure your database shouldn't feel. Redis-compatible everywhere: ElastiCache, Memorystore, Upstash, Cloudflare KV — pick the one your platform already speaks.
-
Cloudflare KV + Cache API
Primary pick
Cloudflare KV and the Cache API — colocated with your Worker, globally replicated, eventually consistent.
-
Upstash Redis (serverless)
Primary pick
Serverless Redis priced per request — ideal for edge workloads with bursty traffic.
10
Bytes That Do Not Belong in a Row
Images, video, audio, PDFs, backups, Parquet snapshots. Object storage is the foundation every other kingdom quietly depends on. R2 for zero-egress at the edge; S3 / GCS / Blob for hyperscaler ecosystems; MinIO or Ceph when sovereignty matters.
-
Cloudflare R2 (zero egress)
Primary pick
Cloudflare R2 — S3-compatible API, zero egress fees — a quiet cost revolution for media-heavy apps.