EKS with Spot Instances & Karpenter

NFTrade: EKS with Spot Instances & Karpenter

How Dcode.tech empowered NFTrade to achieve unprecedented scalability and cost efficiency.

Overview

NFTrade is a cross-chain NFT marketplace that experienced explosive growth during the Web3 boom. Traffic patterns on an NFT marketplace are inherently unpredictable: collection drops and high-profile launches send concurrent users up 5x within minutes. Their existing infrastructure could not scale fast enough, leading to outages during critical moments. They needed an architecture built for spiky traffic that could scale instantly and cost-efficiently.

500%Traffic Spike Absorbed
60%Cost Reduction (Spot)
95%Deploy Time Reduction
10 minDeploy (was 2 hours)

The Challenge

NFT drops are unpredictable by nature. A single collection launch could flood the platform with thousands of concurrent users in seconds. The existing architecture used manually managed EC2 instances and could not scale fast enough. Users were hitting timeouts, transactions were failing, and every botched drop damaged the platform's reputation. Deployments took 2 hours of manual work, and the PostgreSQL database was hitting connection limits under load.

⚠️
The Breaking Point

During a major NFT drop, NFTrade experienced a full platform outage from a 5x traffic surge. Failed transactions and frustrated users made it clear that the infrastructure needed a fundamental redesign; more servers would not solve the architectural limitations.

Our Solution

Dcode migrated NFTrade to Amazon EKS with a focus on rapid elasticity and cost efficiency. We deployed Karpenter for intelligent node provisioning with Spot Instances as the primary compute layer, achieving massive cost savings while maintaining capacity. External-dns with Route53 automated DNS management for services, and the entire infrastructure was codified using Terraform with Dcode's in-house reusable modules.

The CI/CD pipeline was rebuilt using GitLab CI/CD with Helm Charts for standardized service packaging, cutting deployment time from 2 hours to 10 minutes. We migrated the database to Amazon RDS PostgreSQL for managed high availability with read replicas and connection pooling to handle load spikes. HPA with custom metrics ensures pods scale based on actual request latency and queue depth, not just CPU utilization.

💡
AWS Spot Instances for Web3 Workloads

NFT marketplace workloads are ideal for Spot Instances: stateless API services can tolerate interruption with graceful shutdown, and Karpenter automatically diversifies across instance types and availability zones. This achieves up to 60% cost savings compared to On-Demand pricing while maintaining availability through intelligent capacity spreading.

Results

  • Absorbed a 500% traffic spike during a major NFT drop with zero degradation or failed transactions
  • 60% infrastructure cost reduction through Spot Instances managed by Karpenter with automatic failover
  • 95% deployment time reduction, from 2 hours of manual work to 10-minute automated Helm releases via GitLab CI/CD
  • PostgreSQL migrated to Amazon RDS with read replicas and connection pooling for load spike resilience
  • Fully codified infrastructure with Terraform and automated DNS via External-dns + Route53