This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10789|Reply: 1

Eight real-world Docker use cases

[Copy link]
Posted on 8/24/2018 2:40:09 PM | | |
Flux 7 introduces 8 commonly used Docker use cases, namely simplified configuration, code pipeline management, improved development efficiency, isolated applications, consolidated servers, debugging capabilities, multi-tenant environments, and rapid development. We've been talking about Docker, how to use it, and on what occasions? Maybe this article can help you. If there is something to communicate, you can communicate with us through comments.

A few weeks ago, we attended DockerCon, the first Docker-centric tech conference. It is aimed at developers and practitioners interested in building, delivering, and running distributed applications on the Docker open platform, whether it runs on their own notebooks or virtual machines in the data center. We attended the conference, and Flux7 is a system integration partner for Docker foundations and a guest speaker.

Our CEO, Aater Suleman, spoke with one of our clients. While DockerCon was a lot of fun, I felt that the conference focused too much on the specifics of Docker and neglected the use cases of Docker. So, in this article, I want to introduce and share some practical use cases of Docker.

Before we discuss Docker's use cases, let's take a look at what makes Docker so special.

Docker offers lightweight virtualization with almost no extra overhead, which is pretty cool.

First, you don't have to worry about the additional overhead of Docker while enjoying the virtualization power it brings. Second, you can create a larger number of containers on the same machine than a virtual machine.

Another advantage of Docker is that containers can be started and stopped in seconds. Solomon Hykes, founder of Docker, once talked about what Docker has done on top of just LXC, and you can check it out.

Here are some of my Docker use cases, showing you how to leverage the benefits of Docker to create a consistent environment with low overhead.

1. Simplified configuration

This is the main use case for Docker advertised by Docker Company. The biggest benefit of virtual machines is the ability to run different platforms (software, systems) on your hardware facilities, and Docker provides the same functionality with less additional overhead. It allows you to put the runtime and configuration in code and then deploy it, and the configuration of the same Docker can be used in different environments, which reduces the coupling between hardware requirements and application environments.

2. Code pipeline management

The previous scenario is a great help in managing the pipeline of code. Code goes through a lot of intermediate environments from the developer's machine to the final deployment on the production environment. Each intermediate environment has its own small differences, and Docker provides an environment that is consistent from development to launch, making the code pipeline much easier.

3. Improve development efficiency

This brings some additional benefits: Docker makes developers more productive. If you want to see a more detailed example, you can refer to Aater's talk at DevOpsDays Austin 2014 or DockerCon.

In different development environments, we all want to do two things well. First, we want to make the development environment as close to the production environment as possible, and second, we want to quickly build the development environment.

Ideally, to achieve the first goal, we need to run each service in a separate virtual machine to monitor the health of the service in production. However, we don't want to need a network connection every time, and it's especially troublesome to connect remotely every time we recompile. This is what Docker does particularly well, the machines in the development environment usually have relatively small memory, and when using virtual, we often need to add memory to the machines in the development environment, but now Docker can easily let dozens of services run in Docker.

4. Isolate applications

There are many reasons why you might choose to run different applications on one machine, such as the scenarios mentioned earlier to improve development efficiency.

We often need to consider server consolidation to reduce costs, and splitting a monolithic application into a single loosely coupled service. If you want to understand why loosely coupled apps are so important, check out this paper by Steve Yege that compares Google and Amazon.

5. Consolidate servers

Just as multiple applications are integrated through virtual machines, Docker's ability to isolate applications allows Docker to consolidate multiple servers to reduce costs. With no memory footprint from multiple operating systems and the ability to share unused memory across multiple instances, Docker can provide a better server consolidation solution than virtual machines.

6. Debugging ability

Docker offers a lot of tools that aren't necessarily just for containers, but they work for containers. They offer a lot of functionality, including the ability to set checkpoints for containers, set versions, and see the differences between two containers, which can help debug bugs. You can find an example of this in the Docker Save the World article.

7. Multi-tenant environment

Another interesting use case for Docker is in multi-tenant applications, which can avoid rewriting critical applications. One particular example of this scenario is the development of a fast, easy-to-use multitenant environment for IoT applications. This multi-tenancy basic code is complex and difficult to handle, and replanning such an application is a waste of time and money.

With Docker, it is easy and inexpensive to create isolated environments for multiple instances of each tenant's application layer, thanks to the speed of Docker environments and their efficient diff commands.

You can learn more about this scenario here.

8. Deploy quickly

Before virtual machines, it takes several days to introduce new hardware resources. Docker's virtualization technology reduces this time to minutes, and Docker simply creates a container process without starting the operating system, which takes seconds. This is exactly what both Google and Facebook value.

You can create a destroy resource in your data center without worrying about the overhead of a restart. Typically data centers have only 30% resource utilization, and resource utilization can be improved by using Docker and efficient resource allocation.




Previous:Centos7 Docker installation and configuration in practice
Next:How PHP interacts with Ethereum
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com