Skip to content

Choosing Backends

Choosing the right backend for each subsystem depends on your scale, latency, operational budget, and feature needs. Config lives in application.yaml; extras install the driver. Swap backends without rewriting callers — they depend on protocols in quadkit-contracts.

Terminal window
uv add "quadkit-sql[postgres]"
uv add "quadkit-cache[redis]"
BackendBest forKey trade-off
memoryDev, single-process, low-trafficNo persistence, lost on restart, not shared across processes
redisProduction caching, rate limiting, pub/subRequires Redis; O(1) ops, TTL, persistence optional
memcachedSimple key-value, high throughputNo persistence, no replication, no data structures
BackendBest forKey trade-off
meilisearchTypo-tolerant search, quick setupSmaller ecosystem than Elasticsearch
elasticsearchComplex queries, large-scale analyticsHeavy ops overhead, resource hungry
typesenseLow-latency instant searchSmaller community, fewer integrations
sqlite/postgres ftsSimple full-text, no extra infraLimited relevance tuning
BackendBest forKey trade-off
localDev, single-server file storageNot distributed; no CDN, no durability guarantees
s3General object storage, high durabilityEgress costs, eventual consistency (some regions)
gcsGCP-native, strong consistencySlightly higher cost than S3 in some tiers
azureAzure-native, AD integrationTied to the Azure ecosystem
r2Zero egress fees, S3-compatibleNewer, smaller ecosystem
BackendBest forKey trade-off
memoryDev, testing, single-processNo durability, lost on restart
redisSimple queues, low-latencyNo delivery guarantees beyond “at most once” by default
rabbitmqReliable delivery, complex routingOps overhead, needs Erlang runtime
kafkaHigh-throughput, event streaming, replayHeavy ops complexity, higher latency per message
sqsManaged queues, AWS-nativeTied to AWS, polling cost at scale
BackendBest forKey trade-off
sqliteEmbedded, single-server, devNo concurrent writers, limited ALTER TABLE
postgresProduction — most applicationsHeavier resource footprint than SQLite
mysqlRead-heavy workloads, replicationWeaker JSON/array support than Postgres
BackendBest forKey trade-off
mongodbFlexible schemas, document storeNo joins, weaker consistency
dynamodbManaged, auto-scaling, AWS-nativeQuery patterns designed upfront; cost at scale
firestoreReal-time sync, GCP-nativeLimited query capabilities; tied to GCP
BackendBest forKey trade-off
memoryDev, small datasets (<10k vectors)No persistence, lost on restart
pgvectorPostgres-native, integrated with SQL dataLimited index types, slower at scale
qdrantHigh-performance vector search, filteringRequires a separate service
pineconeFully managed, serverlessVendor lock-in, egress costs