Mentoring Docker: Week 4
Welcome to 4th and last blog post on mentoring docker. This week is all about understanding the need for orchestration framework on top of Docker.
Focus points for the week 4
1. What are the challenges with Docker when we have hundreds of applications each with multiple instances running?
- What happens when application crashes?
The expectation is to restart the application automatically. We can do it ourselves by writing a small utility over
docker-compose events/docker events. But orchestration frameworks support it by monitoring application health (Kubernetesliveliness-probe). - What happens when application crashes and started on another host with another port?
Orchestration frameworks provide
service discoveryframeworks to support this. - How to distribute the load when you have multiple copies?
Load balancer is used to distribute the load.
Ingressis one such example of a load balancer. - How to keep x instances of the application running all the time?
Orchestration frameworks provide inbuilt support to maintain the instance count by managing replicas (
replicaSetin Kubernetes terms). - How to run one copy of something per host?
There are use cases to run a copy of the application on all available hosts. For e.g. log collector, health monitor, host monitor, etc. Kubernetes provide a way to configure such applications as
daemonSet. - Where to store app configurations?
Kubernetes
configMapsprovide a way to store non-confidential data as key-value pairs which can be consumed as env variables, command-line arguments, or as configuration files in a volume. - How to manage application release process systematically?
With Kubernetes we can specify
rollout strategyto rollout a feature in a rolling update fashion. - How to scale?
Kubernetes allows defining
autoscalingpolicies to automatically scale application up/down. - How to monitor health of a container?
Kubernetes
livelinessandreadinessprobes are used to monitor health of the application.
Exercises for the week 4
There are no exercises for week 4 as orchestration is not covered as part of the program. Feel free to go through following references to understand more about orchestration frameworks.
References
comments powered by Disqus