Skip to content

Decision ADR-0007 · The Lighthouse

EC2 t4g.nano with standard CPU credits as a hard cost ceiling

Accepted ·

Context

Prices in ap-south-1:

OptionCost
t4g.nano$0.0028/h ≈ $2.04/month, plus $0.73 for 8 GB gp3
Lightsail nano IPv6$3.50, with only 512 GB of transfer in Mumbai

In unlimited mode, T-family instances bill surplus credits, so a runaway loop could cost about $55/month.

Decision

  • Use a t4g.nano (Graviton, 2 vCPU, 0.5 GB) running Amazon Linux 2023 arm64, with 1 GB of swap.
  • Set CreditSpecification: standard, so CPU is throttled instead of billed.
  • Durable state lives outside the box (ADR-0001), and auto-recovery is on.

Consequences

  • + The predictable bill fits the budget: about $3.40/month total at portfolio traffic.
  • − Sustained 1,000-user load for hours would drain credits. Mitigations:
    • load shedding (adaptive snapshot rate, a spectator queue);
      • Status (October 2026): the adaptive rate and the spectator queue are planned, not built. Snapshots go out at a fixed 10 Hz. Today each world layer holds 100 people, and a new layer opens when one fills.
    • switching to "unlimited" for 48 hours around launch;
    • upgrading to a t4g.micro (~$5.45 total) if needed.