In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "what is Container". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1.1 Why Container?
The following will explain the advantages and disadvantages of application deployment and operation and maintenance in different periods.
Operating system (OS)
deploys applications directly on physical machines, so it is impossible to achieve resource isolation and rational use between applications.
Resources are not isolated. An app with high memory usage may consume all memory resources, causing other app to fail to provide services properly.
All app share a physical machine runtime environment (kernel+app). It is not possible to customize the runtime environment by app or the specific kernel requirements of app.
If you deploy multiple app on different physical machines. a. Need to buy a large number of physical machines, more expensive. b. Different app requires different hardware requirements and requires special customization. c. It takes a lot of time for operation and maintenance.
At present, the development speed of hardware such as cpu and memory is much faster than that of software. Many old systems need a small amount of cpu or memory, but they monopolize a machine, resulting in a waste of resources.
Virtual machine (VM)
The emergence of virtual machine makes up for the above shortcomings. The virtual machine abstracts the physical machine resources into units and allocates them according to needs. A resource-isolated, independent kernel between different instances. However, with the rapid development of the Internet, app is required to rapidly expand resources and instances. Current virtual machine machines obviously cannot meet this need. It mainly has the following points.
The mirror image is bloated. Each image is at least a few hundred megabytes, normally in several GB sizes.
It takes a lot of time to create and start, which is not conducive to rapid reorganization. (unable to meet the requirements of Internet elastic computing)
High performance loss
The extra resources are expensive.
Container technology (Container)
has had the concept of containerization for a long time. In recent years, with the blowout development of the Internet, container machines have a good opportunity to be exposed to the public.
The mirror image is small. It only includes the application and the environment it depends on, and has no kernel.
Create and start quickly. There is no need to start GuestOS. The startup cost of the application is basically the time spent on the startup of the application itself.
No GuestOS, no hypervisor, no extra resource overhead, smaller granularity of resource control, and high deployment density
Real physical resources are used, so there is no performance loss
Lightweight
Containers also have their drawbacks.
The isolation is weaker than that of virtual machines. Because the kernel is shared with the host, it brings great security risks and is easy to escape.
If some applications require specific kernel features, the host kernel has to be replaced when using containers.
Development of container technology
Linux chroot- > google cgroup- > lxc (linux container)-> docker (libContainer) hyperHyper = Hypervisor + Docker image
Hyper is a Docker engine based on virtualization technology (hypervisor). Officials believe that although Hyper also runs Docker applications through VM, there is no GuestOS in HyperVM. On the contrary, there is only a minimalist HyperKernel and a running Docker image inside a HyperVM. This "solid-state" combination of Kernel+Image enables HyperVM to achieve the same ImmutableInfrastructure effect as Docker containers. With the natural isolation of VM, Hyper can completely avoid the security risks of LXC sharing kernel.
1.2 Why Docker?
The Docker project was originally built by a platform-as-a-service vendor called dotCloud, which has since changed its name to Docker. Like Warden, Docker also uses LXC in its infancy and then replaces it with its own libcontainer library. Unlike other container platforms, Docker introduces a complete set of ecosystems related to container management. These include an efficient hierarchical container mirroring model, a global and local container registry, a simplified REST API, a command line interface, and so on. In the later stage of development, Docker also built a container cluster management solution called Docker Swarm.
Rapid construction of container-based distributed applications
Has all the advantages of a container
Provide native resource monitoring
Comparison of Docker and virtual machine principles:
Since container technology has existed for a long time, the core innovation of Docker lies in its image management, so some people say:
Docker = container + Docker image
The innovation of Docker image lies in the use of a similar level of file system AUFS. To put it simply, an image is superimposed by multiple images layer upon layer. From a base image, a new layer image is formed by adding some software, and the final image is formed in turn, as shown in the figure.
That's all for "what Container is". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.