In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the Docker container application scenarios, the article is very detailed, has a certain reference value, interested friends must read it!
Docker Container Cloud is an one-stop container cloud service platform created by Docker technology, namely CaaS (Containers as a Service)-Container as a Service. You can simply think of it as an upgraded version of PaaS. CaaS platform using Docker container technology is more powerful, flexible to use, and more convenient to deploy.
Although Docker container has attracted much attention as a new concept, it is estimated that many people do not have a very clear idea about how to use Docker and how to really use container technology. The main purpose of writing this article is to describe what the Docker container can do according to the characteristics of the Docker container.
It can be considered that the container cloud is located between IaaS and PaaS. The more integrated the container choreography is, the more like PaaS, and vice versa, the more like IaaS. Here, the use of Docker containers is simply divided into two categories: hosts and services.
1. Use as a CVM
Compared with virtual machines, containers use a series of very lightweight virtualization technologies, which make them start, deploy and upgrade as quickly as the management process, and feel as flexible as virtual machines, so some people directly use images such as Docker's Ubuntu to create containers and use them as lightweight virtual machines.
Especially now, with more and more systems and software, the development and test environment is becoming more and more complex. the consequence of saving resources only by multi-user sharing is that the environment is completely uncontrollable. The emergence of the Docker container allows everyone to build a custom system image with just a few KB Dockerfile files, and then launch a complete system container so that everyone can become a DevOps.
Container CVM can also start, run stably, shut down and restart at will like ordinary hosts, so it is no problem to build blogs and small websites on it at will. In addition to the commonly used managed service business, you can customize any usage, including using any cloud service provider's cloud disk and cloud database to deploy all kinds of services you need.
Currently, Docker Container Management Server needs Toolbox tools to run under Windows. Although Microsoft plans to provide Windows Server container images at the end of 2014, it has not been released yet, so people who want to run Windows containers in Docker will have to wait in the hope that Microsoft can cut out a lightweight Windows basic image. After all, the container itself is a more lightweight system.
two。 Use as a service
If you only use Docker container as a lightweight fixed virtual machine, it can only be regarded as an alternative use. the most important value of Docker container is to provide a set of platform-independent standardization technologies to simplify the deployment, upgrade and maintenance of services. As long as the various services that need operation and maintenance are packed into standard containers, you can run in any environment that can run Docker and achieve the effect of being out of the box. This feature is the fundamental reason why Docker containers are so popular all over the world.
The following highlights several scenarios where services are deployed using Docker containers.
1. Web application service
Web application service is the most widely used kind of service, the typical architecture is a front-end Tomcat + Java service, back-end MySQl database.
The front-end Java Web server is the most suitable to use the Docker container. Font-family: "helvetica="background-color:=" / >
Because web applications are generally stateless, with the increase or decrease of business visits, you can easily scale by creating and destroying containers with the same image (DNS domain name or load balancer service is also required), as shown in the following figure.
Web service of Docker container
two。 Continuous integration and continuous deployment
Agile development is advocated in the Internet industry, and continuous integrated deployment of CI/CD is the most typical development model.
Using the Docker container cloud platform, you can automatically trigger the back-end CaaS platform to download, compile and build the code into a test Docker image after the code has been written and pushed to the git/svn, then replace the test environment container service, and automatically run the unit / integration test in Jenkins or Hudson. After the final test passes, the new version image can be automatically updated online to complete the service upgrade. The whole process is fully automated and done in one fell swoop, which simplifies the operation and maintenance costs to the greatest extent, and ensures that the online and offline environments are completely the same, and the online service version is unified with the git/svn release branch.
Continuous integration and continuous deployment process of Docker
3. Micro-service architecture uses
If the above two application scenarios are not enough to reflect the great advantages compared with the traditional PaaS platform, then the seamless support for the complex and flexible use scenario of micro-service architecture is absolutely revolutionary.
The micro-service architecture continues to split and decouple the traditional distributed services to form some smaller service modules, which are deployed and upgraded independently, which coincides with the lightweight and efficient deployment of the container.
As shown in the figure below, mirroring services in a completely different environment can be used in each container. An independent microservice host node (independent network IP) is generated when the container is started. Service discovery between upper and lower services can be solved flexibly through environment variable injection, configuration file mount and other ways. Moreover, a variety of cloud services provided by the cloud platform can be directly integrated with custom micro-services to form a powerful service cluster.
More importantly, it is very easy to migrate and replicate in a cluster environment with so many services. As long as you select the Docker service images corresponding to each service and configure the mutual access addresses, you can quickly build a new cluster that is exactly the same.
Example of Docker Container Building Micro-Service Architecture
4. Other application scenarios
Run an one-time / scheduled task
In some cases, users only need to perform one-time tasks, such as calculating a result. If the traditional service model is adopted, the server needs to run all the time, resulting in a great waste of resources. On the other hand, the rapid creation and destruction of containers can flexibly meet this completely on-demand scenario. As long as the Docker image of the one-time program is made, the container is created in real time to perform the task when it needs to be run, and the container automatically exits and releases resources when the program executes.
Of course, the container itself only contains a static image and a temporary read / write layer on the upper layer, and the running data will not be persisted, so task-related data can be read and written from cloud storage, cloud disk or cloud database.
Scientific computing service
In today's information era, in addition to the computer field, natural science and other fields also increasingly need to use some complex program software to do calculation and analysis, if they are also required to learn complicated service operation and maintenance deployment, it will be too troublesome. Abroad, there are examples of researchers using Docker to deploy IPython Notebook servers to carry out data scientific research.
Games and networking, etc.
Tencent has claimed that it has used the Docker container to use Docker on the game server because it doesn't know anything about the game and doesn't pay much attention to how to use it.
These are all the contents of the article "what are the Application scenarios of Docker Container". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.