docker in production: problems, fixes and beyond

13
Docker in production Docker in production problems, fixes and beyond problems, fixes and beyond Miguel A. Guillen & Ioannis Betas Miguel A. Guillen & Ioannis Betas

Upload: miguel-a-guillen-tarazaga

Post on 15-Aug-2015

218 views

Category:

Technology


2 download

TRANSCRIPT

Docker in productionDocker in production problems, fixes and beyond problems, fixes and beyond

Miguel A. Guillen & Ioannis BetasMiguel A. Guillen & Ioannis Betas

We love dockerWe love docker

And we use it in productionAnd we use it in production

And we use it in productionAnd we use it in production

And we had some problemsAnd we had some problems

But we still love dockerBut we still love docker

1.- Don't use links1.- Don't use links

Links are not cool:Links are not cool:● Remove containers with links Remove containers with links it's...it's...

● Not multi-host support (yet)Not multi-host support (yet)● Difficult to maintain (micro-Difficult to maintain (micro-services)services)

1.- Don't use links1.- Don't use links

Service discovery:Service discovery:● We use consul, dns interface is We use consul, dns interface is coolcool

● Etcd or zookeeperEtcd or zookeeper● Simplify your deploymentsSimplify your deployments● But we don't have isolationBut we don't have isolation

2.- avoid port redirection2.- avoid port redirection

Take not always works:Take not always works:● Memory leak in docker (yes..)Memory leak in docker (yes..)● Some services they are not going to Some services they are not going to work (scala)work (scala)

● Some services need to announce Some services need to announce their IPtheir IP

● Use --net=host“ ”Use --net=host“ ”

3.- driver storage3.- driver storage

By default is devicemapperBy default is devicemapper

● Not use default loopback optionNot use default loopback option● Create a partition with a thinpoolCreate a partition with a thinpool● Check other drivers like btrfs or Check other drivers like btrfs or unionfsunionfs

● Do not use aufsDo not use aufs

4.- avoid big images4.- avoid big images

Big images are badBig images are bad

● Slow deploymentsSlow deployments● Not really reusable imagesNot really reusable images● Try to use the same base imageTry to use the same base image● Automated deployments it's going to Automated deployments it's going to fill your disk partition fill your disk partition

5.- Do not use docker for databases5.- Do not use docker for databases

Or any kind of storage serviceOr any kind of storage service

● Persistence in docker is Persistence in docker is complicated complicated

● Data is saved in the copy on write Data is saved in the copy on write fsfs

● Use host for saving the data is an Use host for saving the data is an optionoption

● But not use persistence services in But not use persistence services in docker (yet)docker (yet)

QUESTIONS?

Thank you!!