पाठ 24 / 25
Compose in Production and When to Move On
Single host versus orchestration.
Know the limits
Compose works well for production on a single host: small internal tools, side projects, edge devices. Add restart policies, resource limits, log rotation, health checks, a reverse proxy with TLS, backups and monitoring. It does not provide multi-host scheduling, automatic failover across machines, rolling updates across replicas with zero downtime, or autoscaling. When you need those, move to an orchestrator (Kubernetes, managed container services); tools exist to translate Compose files as a starting point.
Compose or an orchestrator?
A rough guide.
need Compose on one host orchestrator
small app, one server, short downtime OK yes overkill
several servers, survive a machine failure no yes
autoscaling with traffic no yes
zero-downtime rolling deploys at scale limited yes
local development and CI integration tests yes heavyRotate logs
Configure the logging driver options (max-size, max-file) on servers, or container logs can fill the disk.
त्वरित जाँच: What does Compose NOT provide by itself?
- Named volumes
- Starting several containers
- Automatic failover across multiple hosts
- Health checks
Answer
Automatic failover across multiple hosts — Multi-host resilience needs an orchestrator.