Docker's resource management

Source: Ghostcloud Original ( http://www.ghostcloud.cn/ )

Flux 7 in this article describes the commonly used 8 Docker real use of the scene, respectively, simplified configuration, code pipeline management, improve development efficiency, isolation applications, integration of servers, debugging capabilities, multi-tenant environment, rapid development.

The following is the original:

A few weeks ago Flux 7 participated in DockerCon, DockerCon was the first Docker-centric technology conference. It is for developers and practitioners interested in building, delivering and running distributed applications on the Docker Open Platform, whether they are running on a private notebook or a data center virtual machine. Fluc 7 CEO Aater Suleman and a client delivered a speech. Although the DockerCon conference is very interesting, but I think the General Assembly is too concerned about the details of Docker, while ignoring the use of Docker scenes. The following is the author to share some of the practical application of Docker case.

Simplified configuration <br /> This is Docker's Docker's main use of the scene. The biggest benefit of a virtual machine is the ability to run a variety of different platforms (software, systems) on your hardware, and Docker provides the same functionality as reducing overhead. It allows you to put the operating environment and configuration in the code and then deployed, with a Docker configuration can be used in different environments, thus reducing the hardware requirements and the coupling between the application environment.

Code Pipeline Management <br /> Previous scenario has been a great help for managing code pipelines. Code from the developer's machine to the final deployment in the production environment, need to go through a lot of intermediate environment. And each intermediate environment has its own small differences, Docker to provide a application from the development to the line are consistent with the environment, so that the code line has become a lot easier.

Improve development efficiency <br /> This brings some additional benefits: Docker can improve the developer's development efficiency. If you want to see a detailed example, you can refer to Aater's presentation at DevOpsDays Austin 2014 or DockerCon ( http://www.slideshare.net/Flux … may-5 ).

Different development environment, we all want to do two things. First, we want to make the development environment as close to the production environment, and second, we want to quickly build a development environment.

In the ideal state, to achieve the first goal, we need to run every service in a separate virtual machine in order to monitor the production environment in the service running state. However, we do not want to have a network connection every time, each time to re-compile the remote connection up particularly troublesome. This is the Docker to do a particularly good place, the development environment of the machine usually memory is relatively small, before the use of virtual time, we often need to develop environment for the machine plus memory, and now Docker can easily make dozens of services in the Docker start running.

Isolation applications <br /> There are many reasons why you can choose to run different applications on a machine, such as those mentioned earlier to improve the efficiency of the development of the scene.

We often need to consider two points, one is to reduce costs for server consolidation, and the other is to split a monolithic application into a loosely coupled single service (translator note: micro service architecture). If you want to understand why loose coupling applications are so important, please refer to Steve Yege's paper ( https://plus.google.com/%2BRip … svaVX ), which compares Google and Amazon.

Consolidate servers <br /> As with virtual machines to consolidate multiple applications, Docker's ability to isolate applications allows Docker to consolidate multiple servers to reduce costs. Docker provides a better server consolidation solution than a virtual machine because there is no memory footprint for multiple operating systems and no unused memory can be shared among multiple instances.

Ability to debug
Docker provides a lot of tools, these tools are not necessarily just for the container, but it is applicable to the container. They provide a lot of features, including the ability to set checkpoints for containers, set the version and view the difference between the two containers, these features can help debug Bug. You can find this example in the article "Docker Save the World" ( http://flux7.com/blogs/docker/ … lux7 / ).

Multi-tenant environment <br /> Another Docker interesting use scenario is in multi-tenant applications where it can avoid rewriting of critical applications. One of our special examples of this scenario is the development of a fast and easy-to-use multi-tenant environment for IoT applications. The basic code of this multi-tenant is very complex and difficult to deal with. Re-planning such an application not only consumes time but also wastes money.

Using Docker, you can create a quarantine environment for multiple instances of the application layer of each tenant, which is not only simple and inexpensive, but of course thanks to the speed of the Docker environment and its efficient diff commands. More details ( http://flux7.com/blogs/docker/ … ancy / ).

Rapid development <br /> Before the virtual machine, the introduction of new hardware resources need to consume a few days time. Docker's virtualization technology takes this time down for a few minutes, and Docker only creates a container process without having to start the operating system. This process only takes seconds. This is what Google and Facebook value.

You can create a destruction resource in the data center without worrying about the overhead of restarting. Usually data center resource utilization is only 30%, through the use of Docker and effective resource allocation can improve the utilization of resources.

Heads up! This alert needs your attention, but it's not super important.