Grape city website, grape city for developers to provide professional development tools, solutions and services, enabling developers.

You may have been exposed to Docker more or less in your work. Do you know what Docker and the principle behind containerization is?

Container technology is all over the world, so why is only Docker known?

After Docker era, who is the king of cloud native era?

We believe this series of articles will help you answer these questions.

Physical servers that are “disliked”

In the pre-cloud era, developers who wanted to build an online site had to maintain their own physical servers. But as the business has grown, the number of large servers has increased, and with it the cost of hardware, space and maintenance. For c-oriented sites, network hot events are random, and the change of traffic is not controllable, so it is inevitable to encounter the situation of skyrocketing traffic in the site. Without a backup server at this point, a burst of traffic could overwhelm the entire site. But in the absence of an emergency, the cost of purchasing and maintaining a backup server is significant.

(Operation and maintenance of traditional arts: online worship ancestors, pictures from the network)

Where there is a problem, there is a business. Someone thought, if buy a batch of servers on the Internet, arrange a person to manage, and then according to the needs of users to lease out, not just to solve the problem?

Then, a cloud computing drama, staged formally.

The virtual machine is still overweight

The era of cloud computing has opened, and Danchang has taken the stage successively. Let’s do a brief review first.

  • Amazon started aws in 2006 as a cloud storage business.
  • In 2008, cloud computing was launched.
  • In 2009, Aliyun was founded. According to the latest IaaS market share survey in 2020, Aliyun ranks third in the world and first in Asia Pacific. The top two companies were Amazon and Microsoft, with 9.5 percent market share, surpassing Google’s 6.1 percent, Amazon’s 40.8 percent and Microsoft’s 17 percent. Domestic market share is 40 percent, followed by Huawei Cloud at 18 percent.
  • OpenStack was released by NASA in 2010. OpenStack is an IaaS architecture. You can use the IaaS architecture to build your own private cloud, enabling anyone to create and provide cloud computing services. In contrast, AWS and Aliyun are self-developed architectures, while OpenStack is open source. Therefore, companies can access OpenStack to build their own private clouds if necessary. (Of course, this requires core OpenStack development capabilities).
  • Between 2010 and 2013, the global share of cloud computing was split between AWS and OpenStack.

At this time, the essence of cloud computing technology is virtualization technology, hardware resources as infrastructure to provide users, referred to as IaaS. Simply understood, IaaS is to divide a large server into several small virtual servers through virtualization technology to provide services, similar to installing virtual machines on the local machine.

(Entry time of cloud computing main players, image from the Internet)

However, virtual machines in the IaaS era are still too cumbersome. Each VM consumes computing resources, such as CPU and memory, to support applications. Even the smallest application, the overhead of the system is a fixed cost. How to lose weight for IaaS and minimize the overhead on virtual machine systems?

Since 2013, cloud computing has officially entered the PaaS era. In the PaaS era, the units sold by cloud computing changed from virtual machines to application running platforms. As a result, cloud vendors offer more services and use more resources.

What is PaaS? Let’s use a popular example to explain. If we are now a pancake shop owner, adopting the IaaS model means that we need to use other people’s kitchen, boiler, gas, and make our own dough filling and pancakes. If it’s PaaS, the flour, the filling and the seasoning are provided by other people, so we just need to bake the cake.

How can a cloud vendor build a good set of PaaS services? Borrow force open source project, become each manufacturer consensus.

Cloud Foundry opens the PaaS open source era

The core of PaaS is the platform. Among the first PaaS open source projects to emerge on developers’ radar screens, vmware’s Cloud Foundry is one of the best known. Different from IaaS that provides Cloud VM services, Cloud computing based on Cloud Foundry can provide application hosting. With a simple command such as CF push “My app”, developers can zip their project into a package and upload it to the Cloud Foundry server. Cloud Foundry starts its own scheduler, finds a host (system version, performance, and number) that meets user requirements among a group of Cloud hosts, and then creates a container on the host using the container technology, downloads the compressed package in the container, decompress it and run it, and finally becomes an application that provides external services.

In addition, The Cloud Foundry platform provides distribution, disaster recovery, monitoring, restart and other services for these applications (which are the core services we provide to our customers). This hosted service frees up the productivity of developers, allowing them to focus on developing their own applications without worrying about the operation of their applications. That’s what PaaS is all about: platform as a service.

(A service provided by Cloud Foundry)

And then someone will say, what is a container? Container is used to solve the problem of conflict and isolation of multiple application resources. The Namespace mechanism on Linux and the cgroups command can be used for resource isolation and restriction, which are container technologies.

Container technology is not created by Docker. Before the rise of Docker, it has been commercially used by other companies. But why is Docker the first thing everyone thinks of when talking about containers? Which brings us to Cloud Foundry’s death.

From Cloud Foundry to Docker

It may seem like Cloud Foundry is already not that different from the Cloud features we use today, but the reality of 2021 is that Cloud Foundry is dead.

We’ve read a lot of articles on the Internet, combined with our experience developing the typeface public cloud, and we believe that the fatal flaw in this project lies in its packaging mechanism.

The core component of Cloud Foundry is the packaging and distribution mechanism for applications, and it’s the feature developers deal with the most. Cloud Foundry defines a package for each of the major languages, and there is no clarity between them. However, it is this packaging feature that has been a weakness in Cloud Foundry and has been criticized by users. Developers have to maintain a packaged package for every language, every framework, and even every version of the application, and there may be cases where it runs successfully on the machine and then fails to run after uploading the packaged package. At its worst, developers spend more time debugging cloud platform systems than they do developing new software.

For a technology that was created to empower developers, Cloud Foundry is so unfriendly to developers. When developer complaints build up to a point, it makes sense that Cloud Foundry, which was trying to gain a foothold in the middle of the PaaS wave, was “red-cardedout” by upstart Docker.

Originally, Docker was a container project developed by a company then called dotCloud (founded by Solomon Hex in 2010 and incubated by Y Combinator). While Cloud Foundry struggled with packaging issues, Docker was quietly building strength, and in just a few months after opening source, it quickly emerged as a PaaS solution that could not be ignored and caught the eye of Cloud developers.

Funnily enough, when Docker first opened source, Cloud Foundry lead product Manager James Bayer did a detailed comparison to the community, telling users that Docker, like Cloud Foundry, It’s just a sandbox that uses Namespace and Cgroups technology, nothing to be concerned about.

In fact, Docker does take this “traditional” approach, as he says, but Docker is a little more innovative than Cloud Foundry, reflecting The vision of Solomon Hex. He has been thinking about consistency and reusability in application packaging since 2010, and has come up with innovative solutions that have been devastating to Cloud Foundry. The solution is the Docker image.

(Docker, photo from official website)

Docker, which has just opened the source, quickly became popular. With its cute little whales, user-friendly documents, the slogan of deploying an Nginx cluster in three minutes, and the “trivial innovation” of Docker Image, Docker swept the entire PaaS field.

Docker’s winning formula: Mirroring

The key to Docker’s success is that Docker images almost perfectly address Cloud Foundry’s packaging weakness.

So-called mirror, actually is also a package, but compared with Cloud Foundry the executable + packaging result of startup scripts, mirror offers users a set of complete runtime environment, each mirror can specify the operating system version, internal can build the execution of a program file structure, and a mirror can be fully Shared use in more places.

In addition, Docker provides developers with a complete mirroring process, which is language – and framework-independent. The developer only needs to follow this process and customize the operating system environment that the corresponding program needs to run in.

In conclusion, Docker images perfectly solve two problems:

1. Differences between the local environment and the server environment 2. The same image can be reused by all machines

From this point on, the PaaS market was completely Docker’s.

summary

In this first installment of a series, we review the evolution of IaaS replacing physical servers and building PaaS on Top of IaaS. While building PaaS, we went through the decline of Cloud Foundry and saw the success of Docker.

But is it possible to build a complete PaaS service on Docker alone? Which technical solution did we choose for our typeface public Cloud? The story of cloud computing is not over yet, so stay tuned for the next installment.