Skip to content
GitHub

Choosing Backends

Choosing the right backend for each subsystem depends on your scale, latency requirements, operational budget, and feature needs. This guide compares options across every backend category in the Lexigram ecosystem.

BackendBest ForKey Trade-off
memoryDev, single-process, low-trafficNo persistence, lost on restart, not shared across processes
redisProduction caching, rate limiting, pub/subRequires Redis server; 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 setupLess mature than ES; smaller ecosystem
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, basic feature set
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 integrationLock-in to 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-nativeLock-in, 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 must be designed upfront, cost at scale
firestoreReal-time sync, GCP-nativeLimited query capabilities, vendor lock-in
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 separate service
pineconeFully managed, serverlessVendor lock-in, egress costs

See the Packages reference for installation and configuration details for each backend.