Skip to main content

ADR-001: Deploy on AWS ECS Fargate

Accepted2024-08-01

Context​

We need a container orchestration platform for our microservices. The team is small (3 engineers), has existing AWS experience, and needs to ship fast without deep infrastructure expertise.

Decision​

We will use AWS ECS with Fargate (serverless containers) as our primary compute layer, managed via Terraform.

Rationale​

FactorECS FargateEKS (Kubernetes)Fly.io
Ops overheadLowHighVery low
AWS integrationNativeGoodLimited
Team familiarityHighLowNone
Cost at our scalePredictableHigherComparable
Vendor lock-inMediumLowMedium
ScalingGoodExcellentGood

ECS Fargate eliminates node management. At our current scale (< 20 services), Kubernetes' operational complexity is not justified.

Consequences​

Positive:

  • No EC2 node management or cluster upgrades
  • Native integration with ALB, ECR, CloudWatch, IAM
  • Faster onboarding for new engineers familiar with AWS

Negative:

  • Harder to migrate off AWS compared to Kubernetes
  • Less flexibility than K8s for advanced scheduling
  • We'll revisit if/when we exceed 50 services or need multi-cloud

Revisit trigger​

If we reach 50+ services or require multi-region active-active deployment, we will re-evaluate Kubernetes (EKS or self-managed).


Decided by @cto and @eng-lead in the 2024-08-01 architecture review.