Return Sign in

Why is Docker suitable for start-up companies?

ReadFour thousand five hundred and sixty-six

Original text:Why, Docker, makes, sense, for, startups
Author:Carlos Vega
Translation: Vincent

Translator's note: container technology represented by Docker has been a topic for several years. Then, is it necessary for startups to adopt Docker at the beginning? The author gives some positive reasons in this paper. The following is the translation.

Docker is becoming a standard for developing and running container applications.

A long time ago, this technology might have practical implications only for system administrators and PaaS (platform as a service). But few companies have heard of using Docker, especially a company with a bright future.DatadogWhat headquarters recently didResearchAlso in line with these ideas:

This article should be better written in 2015

Perhaps you would say that it's worth it for startups, and then we'll go into the friendly container architecture for theseEntrepreneurial companyWhat kind of help does it provide?. If you haven't used Docker yet, we'll tell you why you need to choose Docker

Development experience

If you're in a small, haveTwo pizza principlesThe company's work, then everyone in the team is likely to know astronomy, know geography. Once the project on hand is finished or no longer needed, you will be beaten back into the abyss of development.

Let's imagine a simple scenario where a front end engineer needs to get a API from the backend engineer, but the API hasn't been on production yet. You can solve this problem by using analog data, or you can deploy a pre production environment. These programs are all very good. However, compared to the agility of the back-end code itself, they are much less expensive.

Tools like docker-compose create wonders for us. All the new people have to do is install somethingthing. What docker-compose needs to do is to pray that Docker has installed everything for the user, so you can skip all the steps in the middle and go directly to the coding section.

As to how each runtime component communicate with each other, these toolsDeclarative propertyAn overview will be provided. As a result, reasoning about top tier architectures is made easier.

Image: redis:alpine
- "6379.""
- Frontend
Image: postgres:9.4
- db-data:/var/lib/postgresql/data
- backend
Image: dockersamples/examplevotingapp_vote:before
- 5000:80
- Frontend
- redis
Image: dockersamples/examplevotingapp_result:before
- 5001:80
- backend
- DB
Image: dockersamples/examplevotingapp_worker
- Frontend
- backend


In addition to being useful in development, Docker also makes production code packaging easier. This is because it makes the development and production environment more symmetrical. This is 12factor's.Dev/prod peerOne of the important functions of.

There are some good language specific tools, such asRbenv(version Ruby Management) andNVM(node version manager). These tools do not make any impact even if there is a mismatch in the runtime version. If the code relies on some unknown local binary file or a specific file system structure, then the functionality might be even stronger.

This is the result of the container doing too well. A container allows you to combine your application with the environment you need.

This portability also plays a role in the setup of hybrid clouds. I don't need to dwell on this too much, just tell you that we're moving to hybrid clouds too.

We were very dissatisfied with the fact that hybrid cloud vendors were unable to provide stable reliability at that time and were not supported enough. We decided to switch to IaaS (infrastructure as a service)The most outstanding cloudAbove, that is, AWS (Amazon, Web, Services).

We can expect this migration to happen soon. Therefore, the application has been migrated to Docker for several months. When we said goodbye to the old cloud, the whole process took only a few days.

Such a wide range of migrations may be considered a very rare event. But I don't think there's any problem with the flexibility after the migration.

It should be noted that not all applications are migrated.Managed turnkey solutionsCrosscutting problems such as monitoring and logging may be solved. However, these can be usedMore easilySet up an open source solution instead of, and also let you avoidCloud blacklist.


If I ask you whetherNeedA layout system may not be appropriate. If you ask the system, do you want it to be self managed, or would you like to call someone to repair it at 3 a.m. for better manual management?.

This analogy requires a lot of moving parts. Software systems are only more complex and decentralized at run time. They face a lot of problems when faced with network partitions.

Now the container itself does not solve the problem - in fact, the opposite is true. Their short nature has made your system so dynamic. This makes it difficult to set dependencies on stones during deployment.

Expanding to a clustered infrastructure, the situation gets worse. It reaches the point where you are never sure where your process may eventually run. This makes localization and handling of them more difficult. But we need to accept this nature so that we can make way for a whole set of solutions.

We tried several cluster systems. These include Google's Kubernetes, Mesosphere's marathon, and Hashicorp's Nomad.

We're on Docker's ownDocker clusterMost deployments have been resolved, using the AWS cloud generationTemplateSimple Docker.

First, a declaration indicates the expected state of your system and the service that it should run. Then the bee will constantly monitor the actual condition of your container. It will re load the workload to other nodes in the case of node failure, so as to achieve the desired state. It can also be restored by reconfiguring the new server because the node cannot be restored.

Providing your own container cluster may run away from your needs. However, the newCaas(container - as-a-, service) platforms are emerging, and there is usually no additional cost to use than infrastructure.

Who needs a kitten when you have a cartoon whale?.

You will find service discovery, load balancing, software defined networks, persistent storage, task scheduling, and raft consensus. This guarantees a scary but fun journey through a cool sounding jargon.

Infrastructure costs are cut

You don't have to read them again{rand_language}}After that, how should we pass?{rand_amount}}"Cut the server costs," and so forth, because I'll come up with some different ways.

Nowadays, micro service is popular. We're already thereBeta LabsThe application is divided into several different services. This allows you to integrate and adapt different development languages and frameworks, and you can always work with the best tools at any time.

Please forgive me a little. Because I'll try using ten or fewer words to explain the micro service briefly.

After reading 12factor"A code library, multiple deploymentsAfter that, I think each service should be deployed in the PaaS terminology as its own application. This happens to be the size of most PaaS pricing models.

Let's make a simple calculation. Setting up a Ruby application on Heroku means that you need to run at least two web standardsDynos. If an application's memory is limited to 512MB, then you return to $50 every month.

Monthly front end services will require $50 GB. To simply add a running dyno to the background, then $25 per month.

There may also be some lightweight back-end services, such as middleware or agents with custom logic, which can use 1 instances. You can easily exceed $100 a month.

That's before we start talking about the add ons. An increase of $30 per month for basic Redis and PostgreSQL instances. Heroku's Logplex is just streaming media. Therefore, if you want to keep logs longer, you need to add a log service that can be shared across applications.

Let's see how we can do better.

A VM, each (single) service vs, each VM's multiple (micro) services. Data provider:Martin Fowler

Let's borrow the Martin Fowler pairMicro serviceDescription. Using containers with a cluster system provides a nice and appropriate platform for dynamic extension services.

Containers are placed with the most availableResourcesOn the node. All nodes share an internalSDN(software defined network). As a result, services can communicate with each other without leaving the cluster.

An example of running a 3 -node- strong Cluster - voting-app

Let's go back to the earlier example. Such a system is suitable for 3 nodes, t2. The Docker cluster based on micro technology has about $50 a month. You can have 3GB of memory. If you dare to be so bold, you can even have extra space to run your own containers.

Heroku's dynos is more talented in the CPU department and has 8 virtual cores. However, unless you use the native thread language to run, a multi process / dyno setting might make you find 512MB memory fast enough. In addition, if your workload is I / O intensive, there won't be much difference.

Don't get me wrong, it's like making DevOps a no problem, and it's not much better than Heroku. I'm not suggesting that you or anyone on your team act alone and spend a few evenings learning how to get high availability settings in PostgreSQL. We shall compare apples to oranges.

Still, I think it's important that you pay extra for all reliability and ease of use. With these, you can judge for yourself what is really worth and what you can do on your own.

Well, when we're here, don't forget that you can run your Docker container in Heroku.

Inherent safety

Such a discussion may not have much impact when comparing the Docker platform to the PaaS. However, you will find that some risk holes are greatly reduced if compared to Ubuntu running multiple applications.

Why is it different? The answer is the Linux container. This interesting concept was brought up by people who used to love Heroku very much when they were reading the guide, and now it's at the core of Docker. What follows is a widely known term for security features: isolation.

Just think about the worst case of executing code remotely in the server. Sounds too far fetched. Check it outImageTragick. The application tends to have a one to one relationship with the container. You should isolate those that can cause damage to the application domain, and retain other content that you choose to run on the host.

This is with VMvirtual machineFor a fairly long period of time, the characteristics provided are very similar. VM has a more rigid feature, requiring longer start-up and supply times, and running a complete operating system.

People can almost forgive and give them longer life cycles to treat themMore like pets than cows. This allows more applications to run, and may lead to more secret compromises.

In the operation of container applications at the same time, reduce the risk, this is not to say that you are on the developers be careless with improper behavior. For example, you do not want compromise accessDocker daemon for the host. But in a word, containerization environments do help to reduce attack surfaces.

Just stay careful,Don'tMake your photos public.

You may start to feel good about yourself

This may be entirely caused by our inner being as a geek. It is a kind of extreme encouragement, but...

As an engineer, if you feel that you can bring happiness to yourself, then it is possible to study new techniques and improve your skills. For the first stage of an entrepreneurial company, is that all the reason why it can attract others?

If you decide to adopt Docker,...In the next few yearsYou will surely find the benefits of it.


So Docker is a silk road to heaven, isn't it?.

Before Docker can solve the rough problem, can we solve it with more stable tools first?.

As a start-up company, if not using Docker, will certainly fail? Absolutely not.

Do I need to invest in containers? I'll tell you in a loud voice"Absolutely needed".

These views are far from unique to start-ups. I want to say that these are not related to the size of the company. Please rest assured that my thoughts will never harm Docker's reputation in the company.

We do not argue that Docker is the solution to these problemsOnlyMethod。 We haven't discussed its shortcomings yet.

For the time being, however, it is still one of the nearest solutions to all of the common problems we have mentioned above.

October 14, 2017,SDCC 2017 big data technology combat online SummitThe upcoming, inviting circle top preacher, technical experts and technology leader, then the big data platform construction, optimization, improve the performance of Spark big data platform deployment practice, practice, and implementation flow of the enterprise platform for big data applications to support business innovation and development of the core topic, and you meet seven Daniel Carnival details checkAll guests and topicsAs well asRegistered participantsShare and discount30 yuan.