Skip to content

PostgreSQL + Dragonfly

Full-featured relational database. Handles:

  • Application data
  • User authentication
  • Complex queries with CTEs
  • JSONB for flexible schemas
  • Full-text search
Terminal window
DB_CONNECTION=pgsql
DB_HOST=postgres-xxxxx
DB_PORT=5432
DB_DATABASE=app
DB_USERNAME=postgres
DB_PASSWORD=generated
FeaturePostgreSQLMySQL
JSONB performanceNative indexingLimited
CTEs (WITH queries)Full supportBasic
Window functionsFull supportLimited
Full-text searchBuilt-inPlugin
UpsertsON CONFLICTREPLACE/INSERT IGNORE

Redis-compatible in-memory store. Drop-in replacement with better performance and lower memory usage.

Terminal window
REDIS_HOST=dragonfly-xxxxx
REDIS_PORT=6379
REDIS_PASSWORD=generated
CACHE_STORE=redis
SESSION_DRIVER=redis
QUEUE_CONNECTION=redis
MetricDragonflyRedis
Memory efficiency25% lessBaseline
Throughput25x higherBaseline
Multi-threadingNativeSingle-threaded
ProtocolRedis compatible-
// Cache
Cache::put('key', $value, 3600);
// Sessions (automatic)
// CSRF tokens, flash messages stored in Dragonfly
// Queues
dispatch(new ProcessOrder($order));
// Rate limiting
RateLimiter::for('api', function ($request) {
return Limit::perMinute(60)->by($request->ip());
});

Coolify handles automatic backups for PostgreSQL databases. Dragonfly data is ephemeral (cache/sessions) and doesn’t require backup.