Technical overview of architecture, components, data flows, and AWS infrastructure
Trinity Beast is a high-performance cryptocurrency price API infrastructure built on AWS, delivering real-time prices with sub-10ms cached responses and 10,000+ QPS capacity — all for approximately $215/month.
The system consists of three independently deployed services behind an Application Load Balancer, backed by Aurora Serverless v2 and MemoryDB (Redis-compatible).
Internet
│
▼
Application Load Balancer (ALB)
│
├──▶ LPO Server (ECS Fargate) ──▶ MemoryDB (Redis) ──▶ Coinbase/Kraken/Gemini
│
├──▶ LRS Server (ECS Fargate) ──▶ MemoryDB (Redis)
│
└──▶ Sync Job (ECS Fargate) ──▶ Aurora PostgreSQL ──▶ MemoryDB (Redis)
│
Aurora Serverless v2
The LPO is the primary price-serving component. It checks MemoryDB first (cache hit = <10ms), then falls back to live exchange APIs.
GOMAXPROCS(NumCPU()), GCPercent(200)The LRS reads usage logs from MemoryDB and generates reports. Supports filtering, pagination, and multiple output formats.
json — Default, structured API responsecsv — Comma-separated, Excel/Sheets compatibletsv — Tab-delimited, database/ETL friendlytext — Human-readable plain textPeriodically flushes usage logs from MemoryDB to Aurora PostgreSQL for long-term storage and reporting. Also handles cache prewarming.
GET /price?asset=BTC with Bearer token to ALBprice:BTC)GET /reports/usage?format=csv with Bearer token| Service | CPU | Memory | Tasks | Monthly Cost |
|---|---|---|---|---|
| LPO Server | 2 vCPU | 4 GB | 1 | ~$60 |
| LRS Server | 4 vCPU | 8 GB | 1 | ~$95 |
| Sync Job | 0.5 vCPU | 1 GB | 1 | ~$10 |
Each component runs as an independent ECS service. Allows independent scaling and zero-downtime deployments.
LPO and LRS run in a single container using APP_REPORT_SERVER mode. Reduces cost for dev/staging environments.
LPO scales horizontally (multiple tasks) while LRS remains single-task. Use when LPO traffic increases but reporting load stays low.
| Traffic Level | LPO Tasks | LRS Tasks | Monthly Cost |
|---|---|---|---|
| Current (Low) | 1 | 1 | ~$215 |
| Medium (5K QPS) | 2 | 1 | ~$335 |
| High (10K QPS) | 3 | 2 | ~$485 |
100% of revenue funds freedom from brick kiln debt bondage in Pakistan through Cross Power Ministries of Pakistan.
The Trinity Beast Infrastructure is named in honor of the Father, Son, and Holy Spirit — built to serve both developers and the least of these.