Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of Paas platform cluster Container container management

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Today, the editor will take you to understand what is the method of Paas platform cluster Container container management. The knowledge points in this article are introduced in great detail. Friends who feel helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Let's follow the editor to learn more about "what is the method of Container container management in Paas platform cluster".

Recently, the development momentum of CloudFoundry and Docker is indeed very strong, and more and more companies use these two open source projects to build the Paas platform, but many companies have only built a set of experimental environment, or the scale of the production environment is still very small, and many problems have not been exposed. JD.com Cloud engine (JAE.JD.COM) is also built using the CloudFoundry framework to do secondary development on the basis of this framework. With the gradual expansion of the JAE project, the number of users is getting more and more day by day, and it has been a headache for us to manage tens of thousands of Container for a long time.

In fact, we all know that the management of Container is mainly focused on several aspects. The first is how the incoming traffic from Router can be quickly located to the specified Container, and the second is how to quickly discover and restore the health of Container containers.

In fact, anyone who has come into contact with CloudFoundry knows that. In CF architecture, both the rapid positioning of Container and the health check of Container strongly rely on NATS message middleware. The heartbeat of Container is reported regularly through DEA (including the host:port mapping of URL and Container). The front-end Router updates the information of the container by registering the router.register or router.unregister of NATS. HM compares whether the expected state of the user is consistent with the actual running state of the container by registering the heartbeat. In fact, this is originally a good component decoupling architecture, but when Container develops to a certain scale, the amount of messages in nats will be very large, and there will be a lot of data to be processed by router or hm. The main problem is that the data of Container does not change frequently, that is, 95% of the information transmitted is consistent. This causes Nats and Router to do a lot of repetitive work. Another disadvantage of this mode through regular reporting is that the accuracy of the data must be judged by setting the heartbeat timeout, which will lead to a certain degree of data delay.

Since the data of Container has an obvious feature of infrequent change, can it only change the data every time? if it is true, it can greatly reduce the pressure of data transmission and Router processing of NATS. One of the ways I can think of is to manage Container through zookeeper+NATS.

The specific idea is that each DEA registers a temporary node with zookeeper when it starts (all the Container information managed by dea is stored in the content of the node), publishes a message created by Container through nats when a container is created, changes the content of the dea temporary node, and publishes a container consumption message to Nats when Contaienr is destroyed (including artificial destruction or Container abnormal hang-up destruction). At the same time, change the contents of the dea temporary node. If the VM hangs or the DEA fails abnormally, because DEA registers a temporary node, zookeeper automatically deletes the non-viable dea node, registers the topic created or destroyed by dea published by dea in the router or hm module to handle the Container Bion situation, and router needs to obtain all dea temporary node information from zookeeper when it starts. Loop processing each node takes the Container out of the node and stores it in memory. When zookeeper discovers that a dea temporary node is deleted or created, it will notify the client (such as router) in the form of an event. In this case, router deletes all containers in the dea according to the type of event. If it is a new node, it will add all Container information in the node.

In this way, we can not only manage all Container well, but also reduce a lot of repetitive message delivery and processing, the most important one is that there is no need to set heartbeat timeout so that the container change is more real-time reflected in the management side. The specific logical diagram looks something like this.

Thank you for your reading, the above is the whole content of "what is the method of Paas platform cluster Container container management", learn friends to hurry up to operate it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report