N
N
Nikita Petrov2017-10-30 00:25:31
Docker
Nikita Petrov, 2017-10-30 00:25:31

Should you use Docker in production?

There is an application with a load of 5-25 requests per second (10-40 thousand people daily)
We really want to set up CI / CD in order to automate the deployment process, but for some reason stereotypes have formed in my head about using docker on a production server. On stage (test) servers we use it and very successfully (except that sometimes it runs out of memory)
What advantages can you highlight in Docker in production?
Is it worth using?
Your experience.
Thank you for your attention!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Kudryavtsev, 2017-10-30
@petrovnr

If you have one or three servers, you probably don't need Docker. In this case, it's better to use ansible to manage the configuration .
The need for Docker arises either when you need to share one environment on many machines, for example, my colleagues and I now have a development environment (php + apache + mysql + redis) running on containers. The second example is to set up dynamic horizontal scaling. You should only consider this option if you are using AWS or something similar.
In general, docker / ansible / chef / puppet etc. You only need it if you need to share one environment on different machines, and often, with confidence that it is the same everywhere. I can't think of any other use case.

D
de1m, 2017-10-30
@de1m

We have five servers in hetzner and several large ones on the internal network, they all run containers for different things (mysql, mssql, bind, openvpn, etc). We started with all this, about three years ago. There were problems, but small ones and they have already been fixed, I don’t remember anything for the last 10 months or so.
If you want CI / CD, then look towards kubernetes. Its main advantage is that you can manage everything through the API. We also came up with this idea, and just a week ago I finished installing kubernetes on three servers at hetzner and started transferring our services there.
I see two main advantages of docker:
1. Very clear separation between data and system. You display the necessary data on volumes and make backups from them. If the server burned down, upload images for docker and roll the data and you're done.
2. Repeatability of the environment.

Y
yiicoder, 2017-10-30
@yiicoder

We are gamedev, we have docker + hetzner servers. We set up CI \ CD in such a way that we test exactly the very image that will go to production, and this saved us from an endless headache.
At one time I was inspired by articles from Alfa.Laboratories - I don’t give a link, just like they and your article - now it’s all hopelessly outdated. Our experience is already about 1.5 years, the flight is normal - the problems were more from misunderstanding. The orchestration is still self-written on ansible, we look towards kubernetes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question