The Trinity Beast Infrastructure — Resource Inventory

Complete inventory of all AWS resources, their purpose, specifications, and interconnections. Source of truth for all infrastructure documentation.

Account: 211998422884 Region: us-east-2 (Ohio) Updated: May 3, 2026 Version: v16

Table of Contents

  1. Infrastructure Summary
  2. Compute Layer — ECS Fargate
  3. Data Layer
  4. Network Layer
  5. Content Delivery & Storage
  6. Scheduled Tasks & Automation
  7. Secrets & Security
  8. CloudWatch Dashboards & Alarms
  9. Price Feed Architecture
  10. Performance Configuration
  11. Stress Test Resources
  12. Connection Map

1. Infrastructure Summary

ECS Containers
4
3 LPO/LRS + 1 Webhook
Total vCPU
32
8 per container
Total RAM
128 GB
32 GB per container
Aurora ACU
2–18
Serverless v2
ElastiCache
52.8 GB
cache.r7g.2xlarge
DB Connections
600
150 per container
Load Balancers
2
1 ALB + 1 NLB
Availability Zones
3
1 container per AZ

2. Compute Layer — ECS Fargate

Cluster: trinity-beast-fargate-cluster — 4 services run the same Docker image (trinity-beast-lpo-server:latest), differentiated by SERVER_TYPE environment variable. The first 3 run APP_REPORT_SERVER (LPO + LRS). The 4th runs WEBHOOK_SERVER (outbound price push delivery — no ALB target, no inbound ports). All tasks run on AWS Nitro System hosts — Nitro Cards offload networking and storage I/O to dedicated hardware, delivering bare-metal-equivalent performance and hardware-enforced security isolation.

Service Task Definition SERVER_TYPE vCPU RAM DB Conns Cache Conns Ports
trinity-beast-main-service lpo-task:23 APP_REPORT_SERVER 8 vCPU 32 GB 150 300 TCP 8080, 9090 / UDP 2679, 2680
trinity-beast-mirror-service lpo-task:23 APP_REPORT_SERVER 8 vCPU 32 GB 150 300 TCP 8080, 9090 / UDP 2679, 2680
trinity-beast-lrs-service lpo-task:23 APP_REPORT_SERVER 8 vCPU 32 GB 150 300 TCP 8080, 9090 / UDP 2679, 2680
trinity-beast-webhook-service webhook-task:1 WEBHOOK_SERVER 8 vCPU 32 GB 150 300 TCP 8083 (health only)

Key Features per Container: Independent WebSocket price feeds (6 exchanges), local sync.Map cache (zero-network hot path), Distributed Adaptive Connection Governor (6000 max concurrent), blocking UDP governor, micro-batch Aurora writes (300 rows / 100ms trickle), structured JSON error responses.

Webhook Service (BeastWebhook): Outbound-only container — no ALB target group, no inbound traffic. Reads active webhook_subscriptions from Aurora, resolves prices from local wsPriceCache (same 6 WebSocket feeds), and pushes to Associates via UDP fire-and-forget + HTTPS signed POST with 3 retries. Health check on TCP 8083. CLUSTER_NODE: BeastWebhook.

Peak Utilization (Run 15 Stress Test): Main: 96.3% CPU / 92.7% Memory | Mirror: 97.0% CPU / 96.9% Memory | LRS: 80.1% CPU / 73.2% Memory. All containers survived 21.4M requests across all 13 stress levels.

Lambda

Function Purpose Runtime Memory Timeout Architecture Connects To
trinity-beast-receipt Post-checkout receipt processing (subscription, donation, LRS addon). Reads tier config from rate_limit_template table. Captures preferred language from Stripe checkout locale and stores on users.preferred_lang and transactions.preferred_lang. provided.al2023 (Go) 256 MB 30s x86_64 Stripe API, Aurora, SES, api.cpmp-site.org/admin

Note: Lambda is NOT in the VPC — it uses public admin endpoints (/admin/invalidate-key) to avoid the $32/mo NAT gateway cost.

SQS — Usage Log Queue

Attribute Value
Queue Name trinity-beast-queued-usage-logs
Type Standard (not FIFO)
Message Retention 4 days
Visibility Timeout 60 seconds
Purpose Decouples usage log writes from the price hot path. LPO server sends fire-and-forget messages to SQS; the trinity-beast-queued-writer Lambda consumes batches and batch-inserts into Aurora.
Consumer trinity-beast-queued-writer Lambda (Go, provided.al2023, 256 MB)
Event Source Mapping Batch size 100, max batching window 5 seconds

Architecture: The SQS queue eliminates Aurora write pressure from the price hot path. The LPO server publishes usage log messages to SQS with fire-and-forget semantics. The trinity-beast-queued-writer Lambda polls the queue in batches of 100 (with a 5-second batching window) and performs efficient batch inserts into Aurora. At normal production traffic, SQS cost is ~$1.00/month ($0.40 per million messages).

3. Data Layer

Aurora Serverless v2 Available
AttributeValue
Clustertrinity-beast-aurora-cluster
EnginePostgreSQL 17.7
ACU Range2 – 18 (auto-scaling)
StorageOptimized I/O (aurora-iopt1)
Writertrinity-beast-aurora-writer (us-east-2c)
Readertrinity-beast-aurora-reader (us-east-2b)
Writer Endpointtrinity-beast-aurora-cluster.cluster-cvg4oeysemon.us-east-2.rds.amazonaws.com
Reader Endpointtrinity-beast-aurora-cluster.cluster-ro-cvg4oeysemon.us-east-2.rds.amazonaws.com
Total Connections600 (150 per container × 4)
Deletion ProtectionEnabled
Peak ACU (Run 15)16.5 of 18 max

Tables: api_keys, usage_logs, transactions, users, application_parameters, support_tickets, demo_leads, report_parameters, report_count, report_usage_logs, newsletter_subscribers

ElastiCache for Valkey Available
AttributeValue
Replication Grouptrinity-beast-cache
Node Typecache.r7g.2xlarge (Graviton3)
vCPU8
Memory52.8 GB
Network3.75 Gbps baseline / 15 Gbps burst
EngineValkey 7.2
Cluster ModeDisabled (standalone)
Nodes1 (single, no replica)
Auto-FailoverDisabled
Multi-AZDisabled
TLS (transit)Enabled
Encryption at RestEnabled
Endpointmaster.trinity-beast-cache.ptsbmm.use2.cache.amazonaws.com:6379

Key Patterns: apikey:{key} (API key hashes), price:{ASSET} (cached prices), usage_logs:index (sorted set), app:config (application parameters), {adaptive:lpo}:successes/total/throttle (governor counters), report_usage:{id} (report usage logs)

Migration Note: Replaced MemoryDB db.r7g.2xlarge (primary + replica) on April 22, 2026. Same Valkey protocol, same TLS, zero code changes. Savings: ~$1,755/month. Aurora is the source of truth — ElastiCache is a pure performance cache rebuilt by the sync job in ~16 seconds.

4. Network Layer

Application Load Balancer Active
AttributeValue
NameTrinity-Beast-TCP-ALB
TypeApplication (Layer 7)
SchemeInternet-facing
Idle Timeout300 seconds
Cross-ZoneEnabled
Availability Zonesus-east-2a, us-east-2b, us-east-2c
TLSACM certificate, TLS 1.2+
Target Group (LPO)trinity-beast-fargate-group → port 8080 (HTTP/1.1)
Target Group (LRS)trinity-beast-lrs-9090 → port 9090 (HTTP/1.1)
Deregistration Delay30 seconds
Peak Throughput (Run 15)31K req/s through ALB with TLS

Listeners: HTTPS:443 (default → LPO TG, rules: lrs.cpmp-site.org → LRS TG, /reports/* → LRS TG), HTTP:80, HTTP:8080, HTTP:9090

Network Load Balancer — UDP Active
AttributeValue
NameTrinity-Beast-UDP-NLB
TypeNetwork (Layer 4)
SchemeInternet-facing
ProtocolUDP
Target GroupsTrinity-Beast-UDP-2679-TG (LPO), Trinity-Beast-UDP-2680-TG (LRS)
Peak Throughput (Run 15)84.9K UDP req/s through NLB

Route: udp.cpmp-site.org → UDP 2679 (LPO) / 2680 (LRS)

DNS (Route 53)

RecordTargetPurpose
api.cpmp-site.orgALB (Trinity-Beast-TCP-ALB)TCP API — LPO price queries
lrs.cpmp-site.orgALB (Trinity-Beast-TCP-ALB)TCP API — LRS reports
udp.cpmp-site.orgNLB (Trinity-Beast-UDP-NLB)UDP API — LPO + LRS
cpmp-site.orgCloudFront (E110PRKEIYQVLL)Website
www.cpmp-site.orgCloudFront (E110PRKEIYQVLL)Website (www redirect)

VPC

AttributeValue
VPC IDvpc-03deaddb7083cd59c
CIDR10.0.0.0/16
SubnetsPublic (ALB/NLB) + Private (ECS, Aurora, ElastiCache)
Availability Zonesus-east-2a, us-east-2b, us-east-2c
ECS Subnet (current)Main: subnet-06781ce7266a4b870 (us-east-2a) · Mirror: subnet-0e7e032219e0a6956 (us-east-2b) · LRS: subnet-0d77afcde34842b5c (us-east-2c)

Security Groups

Security GroupIDPurpose
Trinity-ECS-SG-v3sg-050b617f93b2388f6ECS Fargate tasks — allows ALB/NLB + direct access
ElastiCache SGsg-08a14f22df269a909ElastiCache — allows ECS containers on port 6379
Stress Test SGsg-0bec9c9fa46fb3be1Stress test EC2 instances — allows SSM + container access

5. Content Delivery & Storage

CloudFront Distribution Deployed
AttributeValue
Distribution IDE110PRKEIYQVLL
Price ClassPriceClass_All (global edge locations)
OriginS3 (trinity-beast-website-east2)
Custom Domainscpmp-site.org, www.cpmp-site.org
S3 Bucket Active
AttributeValue
Buckettrinity-beast-website-east2
PurposeStatic website, documentation library, admin tools, stress test binaries
Key Paths/ (HTML), /css/, /js/, /images/, /icons/, /docs/, /admin/, /tools/, /includes/
ECR Repositories Active
RepositoryPurpose
trinity-beast-lpo-serverUnified server image (all 4 ECS services including webhook)
trinity-beast-sync-jobNightly sync job image

6. Scheduled Tasks & Automation

RuleScheduleTask DefinitionPurposeStatus
trinity-beast-nightly-sync cron(0 6 * * ? *) = 1 AM EST trinity-beast-sync-job:3 Nightly Aurora → ElastiCache sync (usage_logs, api_keys, app params, report_usage_logs) Enabled

Sync Performance: Full historical load of 249K logs completes in ~16 seconds. Incremental syncs (new records only) complete in under 200ms. The sync job uses redis.NewUniversalClient which works with both ElastiCache standalone and cluster mode configurations.

7. Secrets & Security

Secrets Manager — trinity-beast-secrets

Single consolidated secret containing all application credentials. Used by all 3 ECS services, Lambda, and the Sync Job. 16 keys total.

#KeyDescription
1DB_HOSTAurora writer endpoint
2DB_PORTAurora port (5432)
3DB_NAMEDatabase name
4DB_USERDatabase username
5DB_PASSWORDDatabase password
6STRIPE_SECRET_KEYStripe API secret key
7SES_SMTP_HOSTSES SMTP endpoint
8SES_SMTP_PORTSES SMTP port (587)
9SES_SMTP_USERSES SMTP IAM username
10SES_SMTP_PASSWORDSES SMTP IAM password
11SES_REGIONSES region (us-east-2)
12SES_FROM_NOREPLYNo-Reply sender address
13SES_FROM_SUPPORTSupport sender address
14SES_FROM_PARTNERSPartners sender address
15SES_FROM_CONTACTContact sender address
16SES_DOMAINVerified SES domain

⚠️ Security: Actual values are never stored in documentation or source code. All consumers read from Secrets Manager at runtime.

API Keys

KeyPurposeRate LimitStatus
demo-public-2026-03-01-abc123 Public demo (website + native demo binary) 3 QPS (demo) / 1,000 QPS (performance) Active
stress-test-unlimited-2026-04-20 Stress testing 100,000 QPS Active

Web Application Firewalls (WAF)

WAFScopeAttached ToRules
CreatedByCloudFront-449feaa5 CloudFront (Website) Distribution E110PRKEIYQVLL Anti-DDoS, IP Reputation, Common Rules, Known Bad Inputs
trinity-beast-api-waf Regional (API) ALB Trinity-Beast-TCP-ALB IP Reputation, Common Rules, Known Bad Inputs, SQL Injection, Rate Limit Global (2000/5min), Rate Limit Admin (100/5min), Rate Limit Analytics (300/5min)

Threat Detection & Monitoring

ServiceResourcePurposeStatus
GuardDuty Detector 18ceef6f8dddcf6082473cc7016ee458 Automated threat detection — VPC flow logs, CloudTrail, DNS analysis Active
Shield Standard CloudFront + ALB Automatic DDoS mitigation (Layer 3/4) Active
CloudTrail trinity-beast-events-trail Multi-region API audit trail Active
VPC Flow Logs fl-009c595743a159c57, fl-0549684b9986c6598 Network traffic logging on both VPCs Active

Security Alarms (CloudWatch)

AlarmTriggerThreshold
TrinityBeast-WAF-HighBlockRateWAF blocks spike>100 blocks in 10 minutes
TrinityBeast-API-5xx-SpikeServer errors>10 errors in 10 minutes
TrinityBeast-API-4xx-SpikeClient errors / scanning>200 errors in 15 minutes
TrinityBeast-GuardDuty-FindingThreat detectedAny finding

Security Dashboard

DashboardWidgetsRegion
Trinity-Beast-Security-Dashboard CloudFront WAF, API WAF, Blocks by Rule, ALB Errors, ALB Latency, Security Alarms, ElastiCache Health us-east-2

8. CloudWatch Dashboards & Alarm Notifications

Five CloudWatch dashboards provide real-time visibility into every layer of the infrastructure — application performance, security posture, cost tracking, and an executive overview. 17 alarms monitor for anomalies and trigger notifications when thresholds are breached.

Dashboards (5)

DashboardPurposeKey WidgetsRegion
Trinity-Beast-Application-Dashboard Core application metrics — LPO, LRS, Lambda, and container health CPU/Memory per service, request rates, latency p50/p99, cache hit ratios, Lambda invocations/errors/duration, container logs us-east-2
Trinity-Beast-Security-Dashboard Security & defense monitoring across all protection layers CloudFront WAF allowed/blocked, API WAF allowed/blocked, blocks by rule (stacked), ALB error codes, ALB latency, security alarms panel, ElastiCache CPU/memory/hit rate us-east-2
Trinity-Beast-Master-Dashboard Unified overview combining application and infrastructure metrics All ECS services, Aurora, ElastiCache, ALB/NLB, Lambda, CloudFront — single pane of glass us-east-2
Trinity-Beast-Cost-Executive-Dashboard High-level cost summary for executive review Monthly spend, savings plan coverage, cost by service, month-over-month trend us-east-2
Trinity-Beast-Cost-Detailed-Dashboard Granular cost breakdown by resource Per-service cost, data transfer, storage, compute hours, reserved vs on-demand us-east-2

Alarms (17)

AlarmMetricConditionCategory
Trinity-Beast-ECS-CPU-HighECS CPUUtilization (Main)CPU > thresholdCompute
Trinity-Beast-ECS-CPU-High-MirrorECS CPUUtilization (Mirror)CPU > thresholdCompute
Trinity-Beast-ECS-CPU-High-LRSECS CPUUtilization (LRS)CPU > thresholdCompute
Trinity-Beast-Main-Service-Count-LowECS RunningTaskCount (Main)Tasks < 1Availability
Trinity-Beast-Mirror-Service-Count-LowECS RunningTaskCount (Mirror)Tasks < 1Availability
Trinity-Beast-LRS-Service-Count-LowECS RunningTaskCount (LRS)Tasks < 1Availability
Trinity-Beast-ALB-UnhealthyTargetsALB UnHealthyHostCountUnhealthy > 0Availability
Trinity-Beast-NLB-UnhealthyTargetsNLB UnHealthyHostCountUnhealthy > 0Availability
Trinity-Beast-Aurora-CPU-HighRDS CPUUtilizationCPU > thresholdDatabase
Trinity-Beast-Aurora-Connections-HighRDS DatabaseConnectionsConnections > thresholdDatabase
Trinity-Beast-ElastiCache-CPU-HighElastiCache EngineCPUUtilizationCPU > thresholdCache
Trinity-Beast-ElastiCache-Memory-HighElastiCache DatabaseMemoryUsagePercentageMemory > thresholdCache
Trinity-Beast-S3-Size-Unusual-GrowthS3 BucketSizeBytesUnusual growthStorage
TrinityBeast-WAF-HighBlockRateWAFV2 BlockedRequests>100 blocks in 10 minSecurity
TrinityBeast-API-5xx-SpikeALB HTTPCode_Target_5XX_Count>10 errors in 10 minSecurity
TrinityBeast-API-4xx-SpikeALB HTTPCode_Target_4XX_Count>200 errors in 15 minSecurity
TrinityBeast-GuardDuty-FindingGuardDuty findingAny findingSecurity

Access: All dashboards are accessible from the AWS Console at us-east-2.console.aws.amazon.com/cloudwatch/home?region=us-east-2#dashboards. The KCC provides direct access via bash scripts/kcc.sh daily (infrastructure report) and bash scripts/kcc.sh security (security report).

9. Price Feed Architecture

The Trinity Beast maintains persistent WebSocket connections to 6 exchanges. Every trade pushes a price update in real-time (sub-second latency). 150 assets are prewarmed across all feeds — 25 per exchange. Each feed has its own independent asset list, configurable via application parameters without redeployment. Each of the 4 ECS containers maintains its own independent WebSocket connections for redundancy (24 total connections cluster-wide).

WebSocket Feeds — 6 Exchanges, 150 Prewarmed Assets

ExchangeProtocolEndpointPair SuffixSource Tag
Coinbase WebSocket wss://advanced-trade-ws.coinbase.com USD coinbase-ws
Gemini WebSocket wss://ws.gemini.com USD gemini-ws
Kraken WebSocket wss://ws.kraken.com/v2 USD kraken-ws
Gate.io WebSocket wss://api.gateio.ws/ws/v4/ USDT gateio-ws
Bybit WebSocket wss://stream.bybit.com/v5/public/spot USDT bybit-ws
OKX WebSocket wss://ws.okx.com:8443/ws/v5/public USDT okx-ws

Prewarmed Assets by Exchange (24 each, 150 total)

ExchangeAssets (24)Application Parameter
Coinbase BTC, ETH, SOL, DOGE, XRP, LINK, DOT, LTC, AVAX, UNI, PEPE, XLM, RNDR, JASMY, ICP, EOS, EGLD, ZEC, ENJ, ANKR, LRC, SKL, COTI, RLC coinbase_prewarm_assets
Gemini AAVE, ADA, MATIC, ATOM, NEAR, ARB, MKR, CRV, GRT, FIL, SHIB, BAT, MANA, SAND, AXS, CHZ, STORJ, AMP, REN, UMA, BOND, CTSI, RLY, RAD gemini_prewarm_assets
Kraken NANO, SC, LSK, KAVA, BICO, RARI, OCEAN, CFG, CQT, ALGO, FET, FLOW, MINA, GLMR, MOVR, KSM, ASTR, PHALA, NODL, PARA, KILT, ACA, TEER, LIT kraken_prewarm_assets
Gate.io BNB, TRX, APT, INJ, OP, SUI, VET, HBAR, FTM, CELR, DENT, HOT, ONE, REEF, WIN, TFUEL, STMX, TROY, VITE, OAX, PUNDIX, ACH, BEL, CHESS gateio_prewarm_assets (via exchange_asset_map)
Bybit TON, WLD, APE, BLUR, IMX, ENS, LDO, SNX, COMP, 1INCH, SUSHI, GALA, MAGIC, RDNT, HOOK, ID, EDU, CYBER, ARKM, NTRN, MAV, SEI, WOO, AGLD bybit_prewarm_assets (via exchange_asset_map)
OKX KAS, TIA, JUP, STRK, PYTH, W, ZRO, PENDLE, ONDO, RENDER, WIF, FLOKI, PEOPLE, MASK, LOOKS, HIGH, RSS3, PERP, BADGER, ALCX, FXS, TRIBE, ALPHA, DODO okx_prewarm_assets (via exchange_asset_map)

Feed Configuration Parameters

ParameterValuePurpose
coinbase_prewarm_assetsbtc,eth,sol,doge,xrp,link,dot,ltc,avax,uni,pepe,xlm,rndr,jasmy,icp,eos,egld,zec,enj,ankr,lrc,skl,coti,rlcCoinbase WebSocket subscription list (24 assets)
gemini_prewarm_assetsaave,ada,matic,atom,near,arb,mkr,crv,grt,fil,shib,bat,mana,sand,axs,chz,storj,amp,ren,uma,bond,ctsi,rly,radGemini WebSocket subscription list (24 assets)
kraken_prewarm_assetsnano,sc,lsk,kava,bico,rari,ocean,cfg,cqt,algo,fet,flow,mina,glmr,movr,ksm,astr,phala,nodl,para,kilt,aca,teer,litKraken WebSocket subscription list (24 assets)
gateio_prewarm_assetsbnb,trx,apt,inj,op,sui,vet,hbar,ftm,celr,dent,hot,one,reef,win,tfuel,stmx,troy,vite,oax,pundix,ach,bel,chessGate.io WebSocket subscription list (24 assets)
bybit_prewarm_assetston,wld,ape,blur,imx,ens,ldo,snx,comp,1inch,sushi,gala,magic,rdnt,hook,id,edu,cyber,arkm,ntrn,mav,sei,woo,agldBybit WebSocket subscription list (24 assets)
okx_prewarm_assetskas,tia,jup,strk,pyth,w,zro,pendle,ondo,render,wif,floki,people,mask,looks,high,rss3,perp,badger,alcx,fxs,tribe,alpha,dodoOKX WebSocket subscription list (24 assets)
kraken_prewarm_interval_minutes3Kraken REST batch poll interval (also used as general prewarm interval)
kraken_prewarm_offset_seconds15Stagger offset to avoid thundering herd across containers
prewarm_assets(combined Coinbase + Gemini list)Legacy combined prewarm list — Coinbase and Gemini assets
prewarm_interval3General prewarm cycle interval in minutes

Hot Path: (1) Local sync.Map → (2) ElastiCache → (3) REST fallback. WebSocket feeds write to Tier 1 on every trade. FlushToElastiCache() batch-writes all fresh local prices to Tier 2 every 30 seconds via Redis pipeline. 99.9% of requests served from Tier 1 (zero network hops). Each container maintains its own independent WebSocket connections for redundancy — 6 feeds × 4 containers = 24 persistent connections cluster-wide.

Asset Management: Coinbase, Gemini, and Kraken assets are controlled via application_parameters in Aurora. Gate.io, Bybit, and OKX assets are managed via the exchange_asset_map table. All are synced to ElastiCache and hot-reloadable without redeployment. Assets beyond the 150 prewarmed are fetched on-demand from the best available exchange.

10. Performance Configuration

All settings are configurable via application_parameters in Aurora, synced to ElastiCache, and hot-reloadable via /admin/reload-params. The /admin/system-mode?mode=performance endpoint applies the full performance profile.

ParameterValuePurpose
adaptive_max_concurrent6000TCP governor — max simultaneous connections across cluster
adaptive_success_threshold0.50Governor throttle trigger threshold
adaptive_throttle_delay_ms0No artificial delay when throttling
udp_max_concurrent_lpo3000UDP LPO blocking governor per container
udp_max_concurrent_lrs3000UDP LRS blocking governor per container
db_max_open_conns150Aurora connection pool per container
db_max_idle_conns75Idle Aurora connections kept warm
cache_pool_size300ElastiCache connection pool per container
cache_min_idle_conns60Idle ElastiCache connections kept warm
cache_dial_timeout_ms500Fast-fail connection timeout
cache_read_timeout_ms500Fast-fail read timeout
cache_write_timeout_ms500Fast-fail write timeout
sqs_batch_size10Messages per SQS SendMessageBatch call (1-10)
sqs_flush_ms100SQS producer flush interval in milliseconds
sqs_buffer_size50,000SQS producer channel buffer capacity
sqs_timeout_ms3,000Per-batch SQS API call timeout in milliseconds
http_idle_timeout_seconds300Keep-alive connections held open
http_read_timeout_seconds5Fast-fail on slow reads
http_write_timeout_seconds5Fast-fail on slow writes
cache_ttl_seconds9Local cache TTL before checking ElastiCache
log_levelerrorMinimal logging in performance mode

11. Stress Test Resources

ResourceTypePurpose
stress-test-ssm-roleIAM RoleSSM access for stress test EC2 instances
stress-test-ssm-profileIAM Instance ProfileAttached to stress test EC2 instances
sg-0bec9c9fa46fb3be1Security GroupStress test instance — reaches ECS containers directly
lt-06c1d77f884da6b43Launch Templatetrinity-beast-stress-run13 (us-east-2a, SSM profile)
stress-test-unlimited-2026-04-20API Key100K QPS rate limit for stress testing
s3://trinity-beast-website-east2/tools/trinity-stress-linuxS3 ObjectStress test binary (Go, Linux AMD64)

Test Client: m6in.4xlarge (16 vCPU, 64 GB, 50 Gbps networking), launched in us-east-2a (same AZ as containers). Supports TCP and UDP, round-robin distribution, per-container metrics, 13-level progressive load test.

12. Connection Map

Internet → The Trinity Beast (Inbound)
PathFlow
TCP APIClient → Route 53 (api.cpmp-site.org) → ALB (TLS termination) → ECS containers (port 8080)
LRS ReportsClient → Route 53 (lrs.cpmp-site.org) → ALB (TLS termination) → ECS containers (port 9090)
UDP APIClient → Route 53 (udp.cpmp-site.org) → NLB (Layer 4) → ECS containers (port 2679/2680)
WebsiteClient → Route 53 (cpmp-site.org) → CloudFront → S3
Stripe WebhooksStripe → API Gateway → Lambda (trinity-beast-receipt)
Stripe CheckoutClient → Stripe (with ?locale=XX&client_reference_id=XX from cpmp-lang) → Webhook → Lambda → Aurora (preferred_lang)
ECS Containers → Backend (Internal)
ConnectionPurposeProtocol
ECS → AuroraBatched writes (usage_logs), reads (api_keys, config, rate_limit_template, webhook_subscriptions)PostgreSQL (TCP 5432, 150 conns/container)
ECS → ElastiCacheCache reads/writes, governor counters, configValkey (TCP 6379, TLS, 300 conns/container)
ECS → Coinbase WSReal-time price feed (24 assets)WebSocket (outbound, persistent)
ECS → Gemini WSReal-time price feed (24 assets)WebSocket (outbound, persistent)
ECS → Kraken WSReal-time price feed (19 assets)WebSocket (outbound, persistent)
ECS → Gate.io WSReal-time price feed (24 assets)WebSocket (outbound, persistent)
ECS → Bybit WSReal-time price feed (24 assets)WebSocket (outbound, persistent)
ECS → OKX WSReal-time price feed (24 assets)WebSocket (outbound, persistent)
ECS → CloudWatchLogs and metricsHTTPS (outbound)
Webhook → AssociatesOutbound price push (UDP fire-and-forget + HTTPS signed POST)UDP + HTTPS (outbound only)
Lambda → External (Outbound)
ConnectionPurposeProtocol
Lambda → Stripe APIRead checkout sessions (including locale), manage subscriptions, create portal sessionsHTTPS
Lambda → AuroraInsert users, api_keys, transactions; read rate_limit_template; store preferred_langPostgreSQL (public endpoint)
Lambda → SESSend receipt emailsHTTPS (SES API)
Lambda → api.cpmp-site.orgCache invalidation (/admin/invalidate-key)HTTPS (public ALB)
Lambda → lrs.cpmp-site.orgCache invalidation (/admin/invalidate-key)HTTPS (public ALB)