CN108810071A - A method of the Apache Server cluster load balance based on process migration - Google Patents
A method of the Apache Server cluster load balance based on process migration Download PDFInfo
- Publication number
- CN108810071A CN108810071A CN201810275502.3A CN201810275502A CN108810071A CN 108810071 A CN108810071 A CN 108810071A CN 201810275502 A CN201810275502 A CN 201810275502A CN 108810071 A CN108810071 A CN 108810071A
- Authority
- CN
- China
- Prior art keywords
- server
- apache
- node
- migration
- proxy server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 143
- 238000013508 migration Methods 0.000 title claims abstract description 43
- 230000005012 migration Effects 0.000 title claims abstract description 43
- 239000000284 extract Substances 0.000 claims abstract description 4
- 238000012546 transfer Methods 0.000 claims abstract description 4
- 238000011112 process operation Methods 0.000 claims abstract description 3
- 238000012544 monitoring process Methods 0.000 claims description 3
- 230000008447 perception Effects 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 238000005303 weighing Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1029—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method of the Apache Server cluster load balance based on process migration, Apache Server carries out process migration in process operation, including proxy server and dispatch server, proxy server is used to monitor the load state of node and triggering process migration, proxy server can intercept the broadcast of the dispatch server upon actuation;Dispatch server is used to preserve the load information of each node, and the decision of load balancing is made according to global state, is communicated with proxy server;Process including process migration:Step A:Proxy server extracts process status in source node;Step B:Process status is transferred to destination node by dispatch server;Step C:The process is regenerated according to the process status of transfer on the target node, the process is made to continue to run with.The present invention is by the way that process to be transferred to from the node of heavier loads on the node of light load so that load balancing is balanced, which is transparent unaware for user, not will increase the delay of user's perception.
Description
Technical field
The present invention relates to computer realm more particularly to a kind of Apache Server cluster load based on process migration are equal
The method of weighing apparatus.
Background technology
With the fast development of internet, the problem of the information content and visit capacity of network growth at full speed, server overloads
Getting worse, web server Clustering thus provide a kind of cost-efficient high performance solution.Group system
Critical issue is how to efficiently use the resource in system scope.And the introducing of load-balancing technique makes load that can collect
Average dynamic as far as possible is distributed between each node of group, to complete the calculating of macrooperation amount, improves responding ability.
Load-balancing technique in the prior art has following several:Http redirections, the load balancing based on DNS and network
Address translation technique, but above several load-balancing techniques have disadvantage, all client can be allowed to have obviously during conversion
Perception, that is, increase user perception delay.
Invention content
It is an object of the invention to propose a kind of method of the Apache Server cluster load balance based on process migration,
By the way that process is transferred to from the node of heavier loads on the node of light load so that load balancing is balanced, the migration
Process is transparent unaware for user, not will increase the delay of user's perception.
For this purpose, the present invention uses following technical scheme:
A method of the Apache Server cluster load balance based on process migration, Apache Server are transported in process
Process migration, including proxy server and dispatch server are carried out in row, the proxy server is used to monitor the load of node
Situation and triggering process migration, the proxy server can intercept the broadcast of the dispatch server upon actuation;The scheduling
Server is used to preserve the load information of each node, the decision of load balancing is made according to global state, with the agency service
Device is communicated, and realizes the triggering of process migration;
Process including process migration:
Step A:The proxy server extracts process status in source node;
Step B:Process status is transferred to destination node by the dispatch server;
Step C:The process is regenerated according to the process status of transfer on the target node, the process is made to continue to run with.
Preferably, it realizes process migration by the way that a process migration module is arranged, also sets up and come more there are one scoreboard
New state of a process;
Process including extracting process status:
Step A1:The proxy server is communicated with the proxy server of source node, is sought by judging scoreboard
Look for most busy apache process;
Step A2:The proxy server sends interrupt signal to apache process, and triggers checkpointing mechanism, generates inspection
Make an inventory of file;
Preferably, including process status is transferred to the process of destination node by dispatch server:
Step B1:The check point file name being stored in distributed file system is sent to by the proxy server of source node
The dispatch server;
Step C1:Check point file name is sent to destination node by the dispatch server, and notifies the generation of destination node
It manages server and finds an idle apache process.
Preferably, after the proxy server of the destination node receives the notice of the dispatch server, one can be found
Idle apache process, and trigger process migration module and migrated.
Preferably, include how to judge the process of state of a process:
Step b1:Apache Server first establishes a parent process, and the parent process can be set up after being created and intercept 80
The socket of port, all subprocess inherit the socket;
Step b2:Then Apache Server can establish subprocess pond, and it is all that the process pool starts poll after being established
Intercept socket;
Step b3:When not having client's connection, the subprocess in the subprocess pond can all sleep outside critical zone;When having
When client connects, subprocess is competed using critical section code by semaphore to provide web services, and in the scoreboard
The state of upper record subprocess.
Description of the drawings
Fig. 1 is the process migration flow chart of the present invention;
Fig. 2 is the extraction process status flow chart of the present invention;
Fig. 3 is the flow chart that process status is transferred to destination node of the present invention;
Fig. 4 is the judgement process status flow chart of the present invention.
Specific implementation mode
Technical solution to further illustrate the present invention below with reference to the accompanying drawings and specific embodiments.
A kind of method of Apache Server cluster load balance based on process migration of the present embodiment, Apache services
Device carries out process migration, including proxy server and dispatch server in process operation, and the proxy server is for monitoring
The load state and triggering process migration, the proxy server of node can intercept the wide of the dispatch server upon actuation
It broadcasts;The dispatch server is used to preserve the load information of each node, the decision of load balancing is made according to global state, with institute
It states proxy server to be communicated, realizes the triggering of process migration;
As shown in Figure 1, including the process of process migration:
Step A:The proxy server extracts process status in source node;
Step B:Process status is transferred to destination node by the dispatch server;
Step C:The process is regenerated according to the process status of transfer on the target node, the process is made to continue to run with.
The load balancing of web cluster is realized by way of process migration, i.e., will load high process migration to load
It is run in low process.Basic thought is migrated in process implementation procedure so that the process moved is in new section
Continue to access required resource and normal operation on point, but without knowing where interrupted, the transition process is for user
For be transparent unaware, not only realized the load balancing of server cluster, but reduce user perception delay.
Preferably, it realizes process migration by the way that a process migration module is arranged, also sets up and come more there are one scoreboard
New state of a process;
As shown in Fig. 2, including the process of extraction process status:
Step A1:The proxy server is communicated with the proxy server of source node, is sought by judging scoreboard
Look for most busy apache process;
Step A2:The proxy server sends interrupt signal to apache process, and triggers checkpointing mechanism, generates inspection
Make an inventory of file.
In process migration, need first to judge which process needs is migrated, it is therefore desirable to find out it is most busy into
Journey, and find out most busy process and need to find by scoreboard, scoreboard records each state of a process;It finds most busy
After commonplace process, needs to retain the present state of process, after facilitating migration to go over, can continue since present state,
And reservation procedure present situation just needs to trigger checkpointing mechanism, and the present situation of process is retained and generates a check point file.
Preferably, as shown in figure 3, process status to be transferred to the process of destination node including dispatch server:
Step B1:The check point file name being stored in distributed file system is sent to by the proxy server of source node
The dispatch server;
Step C1:Check point file name is sent to destination node by the dispatch server, and notifies the generation of destination node
It manages server and finds an idle apache process.
It is most busy and after needing the process shifted finding, it next just needs for process to be transferred to idle target
On node, proxy server is then the load state for monitoring node triggers process migration for finding destination node;
Check point file name can be issued dispatch server by proxy server, and dispatch server makes load balancing according to global state
Decision notifies the proxy server of destination node to find an idle apache process.
Preferably, after the proxy server of the destination node receives the notice of the dispatch server, one can be found
Idle apache process, and trigger process migration module and migrated.
Preferably, as shown in figure 4, including how to judge the process of state of a process:
Step b1:Apache Server first establishes a parent process, and the parent process can be set up after being created and intercept 80
The socket of port, all subprocess inherit the socket;
Step b2:Then Apache Server can establish subprocess pond, and it is all that the process pool starts poll after being established
Intercept socket;
Step b3:When not having client's connection, the subprocess in the subprocess pond can all sleep outside critical zone;When having
When client connects, subprocess is competed using critical section code by semaphore to provide web services, and in the scoreboard
The state of upper record subprocess.
The technical principle of the present invention is described above in association with specific embodiment.These descriptions are intended merely to explain the present invention's
Principle, and it cannot be construed to limiting the scope of the invention in any way.Based on the explanation herein, the technology of this field
Personnel would not require any inventive effort the other specific implementation modes that can associate the present invention, these modes are fallen within
Within protection scope of the present invention.
Claims (5)
1. a kind of method of the Apache Server cluster load balance based on process migration, it is characterised in that:Apache is serviced
Device carries out process migration, including proxy server and dispatch server in process operation, and the proxy server is for monitoring
The load state and triggering process migration, the proxy server of node can intercept the wide of the dispatch server upon actuation
It broadcasts;The dispatch server is used to preserve the load information of each node, the decision of load balancing is made according to global state, with institute
It states proxy server to be communicated, realizes the triggering of process migration;
Process including process migration:
Step A:The proxy server extracts process status in source node;
Step B:Process status is transferred to destination node by the dispatch server;
Step C:The process is regenerated according to the process status of transfer on the target node, the process is made to continue to run with.
2. a kind of method of the Apache Server cluster load balance based on process migration according to claim 1, special
Sign is:Process migration is realized by the way that process migration module is arranged, and also sets up that there are one scoreboards to update process
State;
Process including extracting process status:
Step A1:The proxy server is communicated with the proxy server of source node, is found most by judging scoreboard
Busy apache process;
Step A2:The proxy server sends interrupt signal to apache process, and triggers checkpointing mechanism, generates checkpoint
File.
3. a kind of method of the Apache Server cluster load balance based on process migration according to claim 1, special
Sign is:
Process status is transferred to the process of destination node including dispatch server:
Step B1:The check point file name being stored in distributed file system is sent to described by the proxy server of source node
Dispatch server;
Step C1:Check point file name is sent to destination node by the dispatch server, and the agency of destination node is notified to take
Business device finds an idle apache process.
4. a kind of Apache Server cluster load balancing method based on process migration according to claim 1, feature
It is:
After the proxy server of the destination node receives the notice of the dispatch server, an idle Apache can be found
Process, and trigger process migration module and migrated.
5. a kind of method of the Apache Server cluster load balance based on process migration according to claim 2, special
Sign is:
Include how to judge the process of state of a process:
Step b1:Apache Server first establishes a parent process, and the parent process can be set up after being created and intercept 80 ports
Socket, all subprocess inherit the socket;
Step b2:Then Apache Server can establish subprocess pond, and the process pool starts that poll is all to be detectd after being established
Listen socket;
Step b3:When not having client's connection, the subprocess in the subprocess pond can all sleep outside critical zone;When there is client
When connection, subprocess is competed using critical section code by semaphore to provide web services, and is remembered on the scoreboard
Record the state of subprocess.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810275502.3A CN108810071A (en) | 2018-03-30 | 2018-03-30 | A method of the Apache Server cluster load balance based on process migration |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810275502.3A CN108810071A (en) | 2018-03-30 | 2018-03-30 | A method of the Apache Server cluster load balance based on process migration |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN108810071A true CN108810071A (en) | 2018-11-13 |
Family
ID=64095497
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810275502.3A Pending CN108810071A (en) | 2018-03-30 | 2018-03-30 | A method of the Apache Server cluster load balance based on process migration |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108810071A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111638940A (en) * | 2020-05-19 | 2020-09-08 | 无锡江南计算技术研究所 | Container heat transfer method for Shenwei platform |
| CN112363971A (en) * | 2020-11-10 | 2021-02-12 | 王志平 | Super computer architecture implementation method |
| CN112559125A (en) * | 2020-12-07 | 2021-03-26 | 上海连尚网络科技有限公司 | Container application migration method and device, electronic equipment and computer readable medium |
| CN114002488A (en) * | 2021-09-29 | 2022-02-01 | 苏州浪潮智能科技有限公司 | Automatic monitoring and adjusting method, device and system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102158513A (en) * | 2010-02-11 | 2011-08-17 | 联想(北京)有限公司 | Service cluster and energy-saving method and device thereof |
| CN103778031A (en) * | 2014-01-15 | 2014-05-07 | 华中科技大学 | Distributed system multilevel fault tolerance method under cloud environment |
| CN104679593A (en) * | 2015-03-13 | 2015-06-03 | 浪潮集团有限公司 | Task scheduling optimization method based on SMP system |
| CN107196865A (en) * | 2017-06-08 | 2017-09-22 | 中国民航大学 | A kind of adaptive threshold overload moving method of Load-aware |
| US20170359240A1 (en) * | 2012-10-15 | 2017-12-14 | Oracle International Corporation | System and method for supporting a selection service in a server environment |
-
2018
- 2018-03-30 CN CN201810275502.3A patent/CN108810071A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102158513A (en) * | 2010-02-11 | 2011-08-17 | 联想(北京)有限公司 | Service cluster and energy-saving method and device thereof |
| US20170359240A1 (en) * | 2012-10-15 | 2017-12-14 | Oracle International Corporation | System and method for supporting a selection service in a server environment |
| CN103778031A (en) * | 2014-01-15 | 2014-05-07 | 华中科技大学 | Distributed system multilevel fault tolerance method under cloud environment |
| CN104679593A (en) * | 2015-03-13 | 2015-06-03 | 浪潮集团有限公司 | Task scheduling optimization method based on SMP system |
| CN107196865A (en) * | 2017-06-08 | 2017-09-22 | 中国民航大学 | A kind of adaptive threshold overload moving method of Load-aware |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111638940A (en) * | 2020-05-19 | 2020-09-08 | 无锡江南计算技术研究所 | Container heat transfer method for Shenwei platform |
| CN112363971A (en) * | 2020-11-10 | 2021-02-12 | 王志平 | Super computer architecture implementation method |
| CN112559125A (en) * | 2020-12-07 | 2021-03-26 | 上海连尚网络科技有限公司 | Container application migration method and device, electronic equipment and computer readable medium |
| CN114002488A (en) * | 2021-09-29 | 2022-02-01 | 苏州浪潮智能科技有限公司 | Automatic monitoring and adjusting method, device and system |
| CN114002488B (en) * | 2021-09-29 | 2024-01-16 | 苏州浪潮智能科技有限公司 | An automated monitoring and adjustment method, device and system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108810071A (en) | A method of the Apache Server cluster load balance based on process migration | |
| US10334034B2 (en) | Virtual machine live migration method, virtual machine deployment method, server, and cluster system | |
| CN109743415B (en) | Public cloud network elastic IP implementation method and system | |
| US10334067B2 (en) | MQTT cluster shared subscription hub for fat-pipe cloud applications | |
| US11431827B2 (en) | Data center management system | |
| CN108282514B (en) | Distributed service establishing method and device | |
| US20130254325A1 (en) | Cache system and cache service providing method using network switch | |
| CN1431799A (en) | Network system, information management server and information management method | |
| CN101902395A (en) | The system and method for the resource on the management host | |
| CN114666335B (en) | Distributed system load balancing device based on data distribution service DDS | |
| WO2012155947A1 (en) | Allocation of virtual machines in datacenters | |
| CN103957280B (en) | Connection allocation and scheduling method of sensor network in Internet of things | |
| CN117492944A (en) | Task scheduling method and device, electronic equipment and readable storage medium | |
| US20170048352A1 (en) | Computer-readable recording medium, distributed processing method, and distributed processing device | |
| US9594596B2 (en) | Dynamically tuning server placement | |
| US8577984B2 (en) | State management in a distributed computing system | |
| US11848833B1 (en) | System and method for operational intelligence based on network traffic | |
| CN114915633A (en) | Method, device and medium for scheduling users to gateway cluster in public cloud network | |
| CN104035775A (en) | Comprehensive front-end system of bank | |
| CN112003900A (en) | Method and system for realizing high service availability under high-load scene in distributed system | |
| US11340969B2 (en) | Processing system for data distribution and program thereof | |
| Prathiba et al. | Architecture to minimize energy consumption in cloud datacenter | |
| CN116800686A (en) | Load balancing traffic distribution methods, systems, equipment and storage media | |
| CN113886091A (en) | Virtual machine migration method, system, equipment and storage medium | |
| CN109510877B (en) | Method and device for maintaining dynamic resource group and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181113 |