بنقرة واحدة
container-orchestration
Docker, Kubernetes, ECS, Fly.io, Railway — when to use each
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Docker, Kubernetes, ECS, Fly.io, Railway — when to use each
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
MADR format, decision log best practices, superseding decisions
AWS service selection, well-architected lens, cost patterns
Managed vs self-hosted, multi-cloud, egress costs
Scalability patterns, CAP theorem, database selection, caching
You are a senior backend engineer operating production-grade services under strict architectural and reliability constraints. Use when routes, controllers, services, repositories, express middleware, or prisma database access.
Use when the user wants to design a mobile app, create screens, build UI, or interact with their Sleek projects. Covers high-level requests ("design an app that does X") and specific ones ("list my projects", "create a new project", "screenshot that screen").
| name | container-orchestration |
| description | Docker, Kubernetes, ECS, Fly.io, Railway — when to use each |
Do you need containers?
├── No → use serverless (Lambda, Cloud Run) or PaaS (Railway, Render, Fly.io)
└── Yes → Do you need Kubernetes specifically?
├── No → ECS Fargate (AWS) / Cloud Run (GCP) / Azure Container Apps
└── Yes → Do you have K8s expertise on the team?
├── No → Managed K8s (EKS/GKE/AKS) + consider hiring or training first
└── Yes → EKS / GKE / AKS, or self-hosted k3s for cost savings
| Platform | Best for | Pricing model |
|---|---|---|
| Railway | Small teams, fast deploys, monoliths | Per resource/hour |
| Render | Simple services, cron jobs, static sites | Per service/month |
| Fly.io | Edge-distributed, low-latency apps | Per VM/hour |
| Heroku | Legacy, easy but expensive at scale | Per dyno/month |
When to use: Team < 5 engineers, early product, no dedicated DevOps, speed is the priority.
Serverless containers — you define CPU/memory, AWS manages the hosts.
Use ECS Fargate when:
Don't use when:
Cost note: Fargate is ~20–30% more expensive than EC2-backed ECS for sustained workloads. EC2 Spot with ECS can be significantly cheaper for fault-tolerant workloads.
Use Kubernetes when:
Don't use when:
Managed K8s comparison:
| EKS (AWS) | GKE (GCP) | AKS (Azure) | |
|---|---|---|---|
| Control plane cost | $0.10/hr (~$73/mo) | Free (Autopilot: per pod) | Free |
| Maturity | High | Highest (K8s originated at Google) | High |
| Best ecosystem | AWS services integration | AI/ML, BigQuery | Microsoft/Azure services |
| Autopilot mode | Fargate profile | GKE Autopilot | Azure Container Apps |
Use when:
Don't use when:
k3s is the right default for self-hosted: lightweight, production-ready, single binary, great for Hetzner VMs.
node:20-alpine not node:latest--network host in production unless you have a specific reason| Need | Resource |
|---|---|
| Stateless service | Deployment |
| Stateful app (DB, Kafka) | StatefulSet |
| Background worker | Deployment (with 0 replicas if event-driven) |
| Scheduled job | CronJob |
| One-off task | Job |
| DaemonSet (per-node agent) | DaemonSet |
Always set both. Without them:
Rule of thumb: set requests to typical usage, limits to 2–3x requests. Avoid CPU limits if possible (causes throttling even when nodes have spare capacity).
| ArgoCD | Flux | |
|---|---|---|
| UI | Rich web UI | CLI-focused |
| Multi-tenancy | Strong | Strong |
| Complexity | Higher | Lower |
| Community | Larger | Growing |
Default to ArgoCD if you want a UI and multi-app management. Flux if you prefer pure GitOps with minimal overhead.