docker (1) the road to container development

1. The development path of containers

1. Old times

Businesses are based on applications, and most applications run on servers. In the old days, only a single application could be run on each server, and neither Windows nor Linux operating systems had responsive technical means to ensure stable and safe simultaneous running of multiple applications on one server.

In that era, such a scene often appeared: every time the business department wanted to add a new application, the IT department needed to purchase a new server. In most cases, no one can know exactly what the specifications of the server required for the new application are, so when colleagues in the IT department make purchases, they mostly guess the model and specification of the purchased service based on personal experience.

Therefore, colleagues in the IT department have to buy servers whose performance indicators are much better than business needs when purchasing. After all, neither the IT department nor the business department wants to see business failures that should be caused by server performance. In this environment, most of the time the server runs under low load for a long time.

The above reasons will cause a great waste of the company's assets and resources!

2. New World

Only development and innovation are the keys to solving problems.

In order to solve various problems of application deployment in the old age, VM (virtual machine) came out. VM is a complete computer system virtual machine technology simulated by software with complete hardware system functions and running in a completely isolated environment. Almost overnight, the door to a new world opened, so far people have a technology that allows multiple applications to run stably and securely on a server at the same time.

Virtual machine is a technology with cross-age significance! Whenever the business department needs to deploy a new application, it is not the first time to repurchase the server, but try to deploy the new application on a server with idle resources that meets the planned performance.

The results are obvious, this technology can give the existing assets a greater value, thus saving a lot of money for the company.

3. The Great Route

3.1. Insufficiency of virtual machines

As powerful as virtual machine technology, it also has its shortcomings. For example, the startup time of virtual machines is usually relatively long, and the cost of migrating applications between different virtual machine managers or between cloud platforms is unimaginable. Our cloud service is a living example. But the biggest disadvantage is the resource occupation: the virtual machine needs to rely on its dedicated operating system, and the OS requires additional CPU, memory, storage, etc. These resources can be used to use more business services.

3.2. The emergence of containers

Major manufacturers use container technology to solve the shortcomings of the virtual machine model. The models of the two are basically similar. The biggest difference is that the container does not have an exclusive operating system, and all containers share the host's operating system. This saves a lot of system resources, as well as the overhead of OS patches and license certification. Of course, the operation and maintenance cost is also doubled.

The problems of application migration and service startup mentioned by colleagues have also been improved qualitatively.

3.3. The basis of container technology

Modern container technology originated from Linux, including the most popular container technology on the market, Docker, which is based on Linux technology. Technologies that have a greater impact on containers include Kernel Namespace, Control Group , and Union File System . Of course, the above technologies are relatively complicated, knowing that the emergence of Docker technology has made container technology accepted by the public.

3.4. Container Status

As mentioned earlier, most container technologies are based on Linux. Are there no containers on other operating systems? There is really an operating system without a container, that is MAC. Some students are wondering, why can I use Docker on the MAC system? This is achieved by launching a lightweight Linux VM on the Mac, and then seamlessly running Linux containers in it. But Windows has containers. The core of implementing containers is the Windows kernel technology, which is called Windows containers. Here is another question: all containers share the kernel of the host, so can't Linux containers be easily migrated to Windows hosts? The answer is relatively yes, there is no way to do this before Docker releases products designed for Windows 10, but switching between the two container modes in future container products must be commonplace.

Two, walk into Docker

1. Why does Docker appear?

When understanding why Docker appeared, let's take a look at some common problems in our development work. The first is our development environment, which includes at least three development environments: local, pre-release, and online. Each development environment requires system and application configuration. In our usual work, there is a stalk that is tired of playing: this service can be started locally, but why it can’t work in the test environment! It can be seen that the configuration of different environments is very troublesome, and each machine must deploy the environment (cluster Redis, ES, Hadoop...)! It takes a lot of time and effort. Secondly, sometimes the development environment is Windows, and finally released to Linux! For all the problems encountered above, Docker has proposed a perfect solution!

Guess you like

Origin blog.csdn.net/lly576403061/article/details/129505037