$20K Before (GKE) → $2K After (Dedicated)
This is the story of how we did it—and why managed infrastructure isn't always the answer.
Dripshop started on Google Kubernetes Engine—the standard choice for modern containerized applications. But as traffic grew, so did the bill.
Monthly GKE infrastructure spend including compute, managed databases, and egress costs for global users.
During NFT drops, we scaled to 20 instances (16 vCPU, 32GB RAM each). Total: 320 vCPUs, 640GB RAM.
PgBouncer connection pooling became a bottleneck, adding significant latency to database operations.
Node pools required overprovisioning to handle traffic spikes, meaning we paid for resources we rarely used.
GCP's AlloyDB promised a fully managed PostgreSQL experience, but reality was different. We still had to manually tune work_mem, shared_buffers, and other parameters. It only supported PgBouncer for connection pooling—no Odyssey option. Managed in name, DIY in practice.
The Real Problem: We were paying premium prices for "managed" services while still doing the optimization work ourselves—and hitting the limits of single-threaded tools.
It's "easier to operate." It "scales automatically." It's "the modern way." But we asked ourselves: what are we actually paying for?
Auto-scaling → We could handle this ourselves with PM2 cluster mode
Managed control planes → We didn't need them for a stable workload
Premium pricing → We were paying cloud tax on commodity compute
Three dedicated servers from ServerBasket—bare metal machines with serious specifications:
GCP Kubernetes $20K → Dedicated Servers $2K
We split responsibilities cleanly across three dedicated servers, each with 256 cores and 768GB RAM.
256 cores • 768GB RAM
256 cores • 768GB RAM
256 cores • 768GB RAM
Backend: Pure compute—no contention with I/O services. Cache: Memory-bound DragonflyDB + heavier OpenSearch queries isolated. Database: Full resources for PostgreSQL with massive shared_buffers allocation.
We leverage 19 PostgreSQL extensions to optimize performance, enable advanced queries, and add specialized functionality.
pg_stat_statements for query analysispg_buffercache for buffer inspectionpg_prewarm for cache warmingpg_visibility for visibility mapspg_trgm for fuzzy text searchfuzzystrmatch for string matchingbloom for bloom filter indexesbtree_gin / btree_gist for composite indexespostgis for spatial datapostgis_raster for raster datapostgis_topology for topological modelspostgis_tiger_geocoder for US geocodinguuid-ossp for UUID generationpgcrypto for encryptionhstore for key-value storagecitext / intarray / tablefuncThese extensions let us handle fuzzy search, geospatial queries, advanced indexing, and performance monitoring inside PostgreSQL—eliminating the need for external services and reducing network round-trips.
Instead of just migrating our existing stack, we re-evaluated every component with modern multi-core hardware in mind.
PgBouncer is single-threaded—on a 256-core machine, that's a bottleneck. Odyssey from Yandex is multi-threaded, using 64 worker threads to handle connections.
20x Faster
vs PgBouncer (2,650 → 51,807 TPS)
Redis is single-threaded by design. DragonflyDB is a drop-in replacement that's multi-threaded from the ground up. Same API, dramatically better throughput on multi-core machines.
25x Faster
vs Redis on 256-core machine
Zero Code Changes Required: We exported Redis data as an RDB file and imported it directly into DragonflyDB. All existing Redis clients work without any modification—true drop-in replacement.
We ran comprehensive benchmarks with 200 clients and 100 threads over 60 seconds. The results speak for themselves.
Odyssey with 64 worker threads nearly matches direct PostgreSQL performance while still providing connection pooling, transaction management, and 10,000+ client connection support.
After completing the migration from GKE + AlloyDB to dedicated servers, here's where we landed:
Database transactions per second—impossible to achieve with AlloyDB + PgBouncer limitations.
Concurrent users handled comfortably with room to spare.
API response time at the 95th percentile—down from 150ms.
Monthly infrastructure cost reduced from $20,000 to $2,000.
15-25%
CPU Average
30-35%
Memory Usage
3-4x
Growth Headroom
With dedicated servers, we have full control over PostgreSQL tuning—work_mem, shared_buffers, connection pooling—and achieved 52K TPS. The "managed" AlloyDB couldn't come close, yet cost 10x more.
Dripshop Infrastructure Case Study