WO2011029253A1 - 一种Web负载均衡方法、网格服务器及*** - Google Patents

一种Web负载均衡方法、网格服务器及*** Download PDF

Info

Publication number
WO2011029253A1
WO2011029253A1 PCT/CN2009/075923 CN2009075923W WO2011029253A1 WO 2011029253 A1 WO2011029253 A1 WO 2011029253A1 CN 2009075923 W CN2009075923 W CN 2009075923W WO 2011029253 A1 WO2011029253 A1 WO 2011029253A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
grid
web
server
computing
Prior art date
Application number
PCT/CN2009/075923
Other languages
English (en)
French (fr)
Inventor
刘龙平
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2011029253A1 publication Critical patent/WO2011029253A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Definitions

  • the present invention relates to a Web system, and more particularly to a Web load balancing method, and a grid server and a corresponding Web load balancing system for implementing Web load balancing. Background technique
  • a plurality of Web servers installed on the network side constitute a Web server cluster.
  • the user logs in to the Web server cluster through the client's web browser and accesses various functions provided by the Web system.
  • Existing Web server clusters can load balance between Web servers in a cluster. As the number of users logging in to the Web system increases significantly, each Web server in the cluster may reach its maximum load. In this case, the Web server is generally used to share the load to improve the load capacity of the entire Web system. . This method of increasing the load capacity of the system by adding a Web server undoubtedly increases the operating cost of the entire system.
  • the invention provides a web load balancing method, a grid server and a system, which solve the problem that the prior art needs to increase the web server to achieve web load balancing and improve the system load capacity.
  • the technical solution of the present invention is implemented as follows:
  • the present invention provides a Web load balancing method, including:
  • the current computing task is sent by the web server cluster to the grid server set on the network side;
  • the grid server selects one or more grid resources as the current computing resource in the online grid resource registered to the local, and allocates the computing task to the current computing resource; After the resource successfully completes the allocated computing task, the computing result is returned to the grid server;
  • the grid server transmits the calculation result to the web server cluster.
  • the computing task is that the user submits the system function web page provided by the web server cluster through the web browser of the client;
  • the method further includes: the web server cluster returns the calculation result to the client, and the client displays the result to the user .
  • the grid server selects one or more grid resources as the current computing resource in the online grid resource that is registered to the local network, and specifically includes:
  • the grid server queries a locally stored resource table, wherein the resource table is selected as a computing resource and successfully completes the historical cumulative number of allocated computing tasks; the grid server sorts the current online grid The number of corresponding historical accumulations recorded by the resource in the resource table, one or more in descending order of the corresponding historical cumulative number of times Grid resources as this computing resource;
  • the historical cumulative number of corresponding computing resources in the resource table is updated.
  • the resource table further records a corresponding selection time of the computing task that the grid resource was last selected and successfully completed the allocation
  • the grid resource whose selection time is closest to the current time is preferentially selected as the current calculation resource.
  • the grid server selects one or more grid resources as the current computing resource in the online grid resource that is registered to the local network, and specifically includes:
  • the grid server selects several grid resources as initial population individuals of the genetic algorithm in the online grid resource registered to the local;
  • the grid server invokes the genetic algorithm, and uses the grid resource output by the algorithm as the current computing resource.
  • selecting a plurality of grid resources as the initial population individuals of the genetic algorithm includes:
  • the grid server queries the locally stored resource fast table, and the resource quick table records the scheduling information weight value corresponding to each grid resource, and the scheduling information weight value and each grid resource are selected and successfully completed.
  • the number of historical calculation tasks is positively correlated;
  • the grid server determines, according to the ratio of the product of the scheduling information weight value corresponding to each grid resource and the inherent attribute value to the sum of the products of each grid resource, determining that each grid resource is selected as the genetic algorithm.
  • the probability of the initial population individual is selected as the initial population of the genetic algorithm according to the order of the probability from the largest to the smallest.
  • the method further includes: sending the current computing task to the grid server disposed on the network side only when the web server cluster determines that its load exceeds a set threshold.
  • the invention also provides a grid server, comprising:
  • a grid resource management unit configured to receive a registration request of a grid resource, and record an online grid resource
  • a task receiving/feedback unit configured to receive a current computing task sent by the web server cluster; and receive a computing result returned after the computing resource successfully completes the allocated computing task, and send the result to the web server cluster;
  • a resource selection unit configured to select one or more online grid resources as the current computing resource
  • a task allocation unit configured to allocate the computing task received by the task receiving/feedback unit to the current computing resource selected by the resource selecting unit.
  • the Grid resource management unit stores a resource table, where the Grid resource is selected as a computing resource and successfully completes the historical accumulated number of the allocated computing tasks;
  • the resource selection unit is specifically configured to: sort the corresponding historical cumulative times recorded by the current online grid resource in the resource table, and select one or more grids according to a sequence of corresponding historical cumulative times from high to low.
  • the resource is used as the current computing resource; and when the task receiving/feedback unit receives the calculation result returned by the current computing resource, the historical cumulative number of corresponding computing resources in the resource table is updated.
  • a resource fast table is stored in the grid resource management unit, and a scheduling information weight value corresponding to each grid resource is recorded in the resource fast table, and the scheduling information weight value and each grid resource are selected. And the number of times of successful completion of the assigned computing task is positively correlated;
  • the resource selection unit is configured to determine, according to a ratio of a product of a scheduling information weight value corresponding to each grid resource and a value of the inherent attribute value, to a sum of the products of each grid resource, to determine that each grid resource is Selecting the probability of the initial population of the genetic algorithm, selecting several current network resources as the initial population of the genetic algorithm according to the order of the probability from large to small, and then The genetic algorithm is invoked, and the grid resource output by the algorithm is used as the current computing resource.
  • the invention also provides a web load balancing system, comprising: a web server cluster, a grid server and a grid resource;
  • the web server cluster is configured to send a current computing task to the grid server; and receive a calculation result transmitted by the grid server;
  • the grid server is configured to receive a registration request of a grid resource, record an online grid resource, and receive a computing task sent by the web server cluster, and select one or more grid resources in the registered online grid resource. As the current computing resource; and assigning the computing task to the current computing resource;
  • the grid resource is configured to be registered in the grid server, and after being selected as the current computing resource and successfully completing the allocated computing task, returning the calculation result to the grid server.
  • the system further includes a client, configured to submit the computing task by using a web browser to log in to a system function web page provided by the web server cluster; and receiving a calculation result returned by the web server cluster and displaying the result to the user.
  • each type of computer in the network is registered as a grid resource by registering with a grid server installed on the network side; the grid resource is managed by the grid server.
  • the grid server selects one or more grid resources as the current computing resource in the local online grid resource, and assigns the computing task to the current computing resource.
  • the computing resource completes the assigned computing task from the computing resource, and returns the calculated result to the grid server, and the grid server transmits the calculated result to the web server cluster.
  • FIG. 1 is a flowchart of a web load balancing method according to an embodiment of the present invention
  • 2 is a schematic structural diagram of a grid server according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a web load balancing system according to an embodiment of the present invention. detailed description
  • the core idea of the Web load balancing solution of the present invention is as follows: All types of computers logged into the network can be used as grid resources, and the remaining computing power of each computer can be fully utilized to assist the Web server cluster to complete a part of computing tasks, thereby not only implementing Web load balancing, Moreover, the load capacity of the entire Web system can be improved, and the problem of increasing the operating cost of the entire system by increasing the Web server to achieve Web load balancing and increasing the system load capacity in the prior art is solved.
  • the invention adds a grid server on the network side, and each type of computer logged into the network can choose to register to the grid server to become a grid resource.
  • the grid server mainly implements the online and offline management of the grid resources, and interacts with the web server cluster, receives the computing tasks sent by the web server cluster, allocates them to the online grid resources for calculation, and transmits the calculation of the grid resource returns. The result is to the web server cluster.
  • Other specific functions of the grid server are described in detail later.
  • Step S101 A current server task is sent by a web server cluster to a grid server configured on a network side;
  • Step S102 The grid server selects one or more grid resources as the current computing resource in the online grid resource registered to the local, and allocates the computing task to the selected current computing resource;
  • Step S103 After the computing resource successfully completes the allocated computing task, the computing result is returned to the grid server.
  • each grid resource managed by the grid server participates in the task sharing, which reduces the load of the web server cluster and realizes web load balancing.
  • the current computing task sent by the web server cluster to the grid server may be a computing task initiated by the grid side or a computing task submitted by the user.
  • the computing task is submitted by the user, the user can log in to the system function web page provided by the web server cluster through the client's web browser to submit the task; the web server cluster sends the task submitted by the user to the grid server, and receives the grid server.
  • the calculated result of the calculation is calculated by the selected grid resource, and returned to the client submitting the corresponding task, which is displayed to the user by the client.
  • a simple method is to: arbitrarily select the current online grid resource. As this computing resource.
  • the advantage of this method is that the process cartridge is selected, but the computing power of the selected grid resource itself may be weak, which may result in the failure to successfully complete the calculation task of the assignment, or the delay of completing the assigned calculation task. long.
  • the embodiment of the present invention provides the following preferred selection grid resources as the implementation method of the current computing resource, but the present invention is not limited to the following examples.
  • the cumulative number of historical tasks that were selected as compute resources and successfully completed the assigned compute tasks before the grid resources were recorded in the grid server storage resource table.
  • the resource table length (that is, the number of records in the resource table) can be set to a larger value in advance, for example, 200 records are stored, or the grid server can be based on the current or segment.
  • the number of online grid resources in the time adjusts the length of the resource table.
  • resource table length rounding (number of online grid resources * length coefficient), the range of length coefficients is, for example, [0.2, 0.5].
  • the grid resources with more historical accumulation times are preferentially stored in the resource table.
  • set 5 records in the resource table as For example, the grid resources and their historical accumulation times are shown in Table 1 below:
  • the grid server After receiving the current computing task sent by the web server cluster, the grid server queries the locally stored resource table, sorts the current online grid resources in the resource table according to the historical cumulative number of times, and selects historical accumulation. One or more grid resources with a higher number of times are used as the current computing resource. Assume that the current online grid resource is grid resource 2, grid resource 3, and grid resource 4. According to the sorting result, the historical accumulation number of the grid resource 4 is the highest. When a grid resource is selected as the current computing resource, Select grid resource 4; When selecting two grid resources as the current computing resource, select grid resource 4 and grid resource 2. Assuming that Grid Resource 4 and Grid Resource 2 are selected as the current computing resources, the Grid Server will assign the current computing task to Network Resource 4 and Grid Resource 2.
  • the specific allocation method may be to divide the current computing task into two parts, or the grid server may determine the computing power of the grid resources 4 and 2 according to the respective intrinsic attributes of the registered grid resource 4 and the grid resource 2; Size, assigns most computing tasks to grid resources with large computing power.
  • the resource table since the resource table records the historical cumulative number of calculation tasks in which each grid resource is selected and successfully completed, the resource table needs to be dynamically updated, and the grid resource 4 and the grid resource 2 are successfully completed. After the calculation task, the calculation result is returned to the grid server. After receiving the returned calculation result, the grid server updates the historical accumulation times of the grid resource 4 and the grid resource 2 in the resource table, and the updated historical cumulative number of times. They are 21 and 6, respectively.
  • the above method of selecting a grid resource by using a resource table is based on the number of times the grid resource successfully completes the assigned computing task. a grid that has successfully completed a lot of calculation tasks Resources, which are considered to be highly reliable, are more likely to successfully complete this computing task.
  • the above selection method example 1 is only an example, and in practice, optimization can also be performed.
  • the resource table can also record the corresponding selection time of the computing task whose grid resource was last selected and successfully completed the allocation; for multiple grids whose historical cumulative times are the same, or the historical cumulative number of differences is within the set range
  • the resource is preferentially selected as the current computing resource corresponding to the grid resource whose selection time is closest to the current time.
  • Example 2 the genetic algorithm in the prior art is used to select a better grid resource to participate in the calculation. Specifically:
  • the grid server selects several grid resources as the initial population of the genetic algorithm in the online grid resource registered to the local; and then invokes the genetic algorithm to use the grid resource output by the algorithm as the computing resource.
  • a simple method is to arbitrarily select the current online grid resource as the initial population of the genetic algorithm.
  • the advantage of this method is that the process cartridge is selected, but since the initial population is arbitrarily selected, it is possible that the final output grid resource is not the optimal grid resource.
  • the resource quick table is stored in the grid server, and the scheduling information weight value corresponding to each grid resource is recorded in the resource fast table; wherein the scheduling information weight value and each grid resource are selected and the history of the allocated computing task is successfully completed.
  • the number of times is positively correlated.
  • the scheduling information weight value can be determined in the following way:
  • r is used to represent the scheduling information weight value of the grid resource j, and the grid computing server assigns the initial value r, .( 0 ) to the scheduling information weight value of the grid resource j.
  • F in equation (1) MIPS (Million Instructions Per Second) for grid resource j, that is, the number of machine language instructions of millions of classes processed per second.
  • the grid server After receiving the current computing task sent by the web server cluster, the grid server queries the locally stored resource fast table, and obtains the scheduling information weight value corresponding to each stored grid resource, according to the scheduling information weight corresponding to each grid resource.
  • the ratio of the value, the product of its intrinsic property value to the sum of the corresponding products of each grid resource determines the probability that each grid resource is selected as the initial population of the genetic algorithm, and then selects the order according to the probability from large to small.
  • Corresponding several grid resources are used as the initial population of the genetic algorithm.
  • a specific implementation example is:
  • Q*m grid resources are selected as the initial population individuals according to the probability P] k from the largest to the smallest, and are divided into Q populations, each population containing m Individuals; then call the genetic algorithm to select the optimal grid resources. Since the specific calculation process of the genetic algorithm is prior art, it will not be described in detail herein.
  • the above example 2 can be further optimized.
  • the grid resources currently stored in the resource table (the grids) If the resource is selected and successfully completed, the calculated task has a large number of historical accumulations and is selected in a time period that is closer to the current time.
  • the corresponding probability may be appropriately increased to increase the corresponding grid resource selected as Possible examples of individuals in the initial population of genetic algorithms:
  • resource table resource coefficient if the grid resource j is in the resource table, for example, it can take 0.2, otherwise, ⁇ takes 0.
  • the above example 1 and the example 2 and the optimization method thereof disclose several methods for selecting the grid resource as the implementation method of the current computing resource by way of example. It is specifically stated that, in practical applications, other similar methods may be used to select network resources as the current computing resources.
  • the grid server allocates the current computing task sent by the web server cluster to the computing resource.
  • a specific distribution method is:
  • the grid server divides the current computing task into m based on the number m of computing resources.
  • the subtasks use the fitness function to sort the computing resources, and assign the subtasks with large tasks to the current computing resources with high fitness.
  • sub-tasks with large tasks are assigned to grid resources with high computing power and high task completion rate, which is beneficial to the completion of tasks.
  • S is the historical cumulative number of computation tasks that the grid resource j successfully completes
  • D is the total number of times the grid resource j is selected.
  • the web load balancing method disclosed in the above embodiment of the present invention can control a specific startup condition by a web server cluster. For example: When the web server cluster determines that its load exceeds the set threshold, the current computing task is sent to the grid server, and the grid resource server allocates the selected grid resource to the current computing task. In practical applications, even if the load of the Web server set does not exceed the set threshold, the Web load balancing method described above can be used for Web load balancing to reduce the computing workload of the Web server.
  • the grid server even if the grid server selects the current computing resource and allocates the current computing task, some of the computing resources may not successfully complete the allocated computing. Task, or refuse to accept the assigned computing task due to limited resources, in which case a rejection message can be returned to the grid server; the grid server transmits a rejection message to the web server cluster. After receiving the reject message, the web server cluster can determine which part of the computing task is not shared, and then each web server in the web server cluster undertakes the part of the computing task, and can also send the part of the computing task to the grid again. The server performs a task assignment again.
  • the embodiment of the present invention further provides a grid server having a corresponding function, and the structure diagram thereof is as shown in FIG. 2, including:
  • a grid resource management unit 21 configured to receive a registration request of a grid resource, and record an online network.
  • the task receiving/feeding unit 22 is configured to receive a current computing task sent by the web server cluster, and receive a computing result returned after the computing resource successfully completes the allocated computing task, and transmit the result to the web server cluster;
  • a resource selection unit 23 configured to select one or more online grid resources as the current computing resource
  • the task assignment unit 24 is configured to allocate the calculation task received by the task receiving/feedback unit 22 to the current computing resource selected by the resource selection unit 23.
  • the grid resource management unit 21 stores a resource table in which the history accumulated number of computing tasks that were previously selected as computing resources and successfully completed the allocation of the grid resources.
  • the resource selection unit 23 is specifically configured to: sort the corresponding historical cumulative times recorded by the current online grid resource in the resource table, and select one or more grid resources as the basis according to the corresponding historical cumulative number of times from high to low.
  • the second computing resource and when the task receiving/feedback unit 22 receives the calculation result returned by the current computing resource, updates the historical cumulative number of corresponding computing resources in the resource table.
  • the grid resource management unit 21 stores a resource fast table, and the resource fast table records the scheduling information weight value corresponding to each grid resource, and the scheduling information weight value and each grid resource are selected and successfully completed.
  • the number of history of assigned computing tasks is positively correlated.
  • the resource selecting unit 23 is specifically configured to: according to the ratio of the product of the scheduling information weight value corresponding to each grid resource and the inherent attribute value to the sum of the products of each grid resource, determine that each grid resource is selected as the genetic
  • the probability of the initial population of the algorithm is selected according to the probability from large to small as the initial population of the genetic algorithm, and then the genetic algorithm is called, and the grid resource output by the algorithm is used as the computing resource.
  • the embodiment of the present invention further provides a web load balancing system, and a schematic structural diagram thereof is shown in FIG. 3 .
  • the system includes: a web server cluster 31, a grid server 32, and a grid resource 33.
  • a web server cluster 31 configured to send a current computing task to the grid server 32; and receive a calculation result transmitted by the grid server 32;
  • the grid server 32 is configured to receive a registration request of the grid resource 33, record the online grid resource, and receive the computing task sent by the web server cluster 31, and select one or more grids in the registered online grid resource. Resources as the current computing resources; and assign computing tasks to the computing resources;
  • the grid resource 33 is used for registering into the grid server, and after being selected as the current computing resource and successfully completing the assigned computing task, returns the calculation result to the grid server 32.
  • the client 34 is further configured to: use a web browser to log in to the web server provided by the web server cluster 31 to submit a computing task; and receive the computing result returned by the web server cluster and display the result to the user.
  • each type of computer in the network is registered as a grid resource by registering to a grid server disposed on the network side; the current computing task is sent to the grid server by the web server cluster, and the grid server is registered to the local online In the grid resource, one or more grid resources are selected as the current computing resource, and the computing task is allocated to the computing resource, and the computing task is completed by the computing resource, and the calculation result is returned to the grid server.
  • the grid server then transmits the results of the calculation to the web server cluster.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种Web负载均衡方法,包括:由Web服务器集群将当前计算任务发送给设置于网络侧的网格服务器;网格服务器在注册到本地的在线网格资源中,选择一个或多个网格资源作为本次计算资源,并将计算任务分配给本次计算资源;本次计算资源成功完成分配的计算任务后返回计算结果给网格服务器;网格服务器传送计算结果给Web服务器集群。本发明还公开相应的网格服务器和一种Web负载均衡***。采用本发明,充分利用网络中的各类型计算机作为网格资源,参与分担计算任务,减轻Web服务器集群中各Web服务器的负荷,不需要增加Web服务器就实现了Web负载均衡并提高整个Web***的负荷能力。

Description

一种 Web负载均衡方法、 网格服务器及*** 技术领域
本发明涉及 Web***, 尤其涉及一种 Web负载均衡方法, 以及用于实 现 Web负载均衡的网格服务器及相应的 Web负载均衡***。 背景技术
随着因特网的高速发展, Web ***越来越得到广泛的应用。 为了满足 曰益增长的用户需求, 现有 Web***中, 由设置于网络侧的多台 Web服务 器组成 Web服务器集群。 用户通过客户端的 Web浏览器登录 Web服务器 集群, 访问 Web***提供的各种功能。 现有 Web服务器集群能在集群内的 各台 Web服务器之间实现负载均衡。 随着登录到 Web***的用户数量大幅 增长, 集群内的各 Web服务器有可能都达到其最大负荷, 在这种情况下, 一般采用不断增加 Web服务器来分担负荷,以提高整个 Web***的负荷能 力。 这种通过增加 Web服务器来提高***负荷能力的方法无疑增加了整个 ***的运营成本。
现有技术中, 已提出了网格资源的概念, 通过将地理上分布的各种计 算机的资源组织起来, 相当于将加入到同一***或网络的各种计算机可用 资源整合成一台巨大的超级计算机, 从而实现计算资源、 存储资源、 数据 资源、 信息资源以及专家资源等的共享。
实际应用中,登录到网络的各类型计算机(包括普通用户的 PC机以及 各种服务器等), 大部分都存在资源闲置现象, 如一般 PC机的主机***有 40%的时间空闲, 其中央处理单元( CPU, Central Processing Unit )运算能 力等并没有被充分利用。 因此, 如何将登录到网络的各类型计算机作为网 格资源, 有效地利用各计算机的计算能力来实现 Web***负荷分担, 是一 个有待解决的重要课题。 发明内容
本发明提供一种 Web负载均衡方法、 网格服务器及***, 解决现有技 术中需要通过增加 Web服务器来实现 Web负载均衡及提高***负荷能力的 问题。
本发明的技术方案是这样实现的: 本发明提供了一种 Web负载均衡方 法, 包括:
由 Web服务器集群将当前计算任务发送给设置于网络侧的网格服务 器;
所述网格服务器在注册到本地的在线网格资源中, 选择一个或多个网 格资源作为本次计算资源, 并将所述计算任务分配给所述本次计算资源; 所述本次计算资源成功完成分配的计算任务后返回计算结果给所述网 格服务器;
所述网格服务器传送所述计算结果给所述 Web服务器集群。
进一步地, 所述计算任务为用户通过客户端的 Web浏览器, 登录所述 Web服务器集群提供的***功能 Web页面提交;
所述 Web服务器集群接收到所述网格服务器传送的所述计算结果后, 该方法还包括: 所述 Web服务器集群将所述计算结果返回给所述客户端, 由所述客户端展示给用户。
进一步地, 所述网格服务器在注册到本地的在线网格资源中, 选择一 个或多个网格资源作为本次计算资源, 具体包括:
所述网格服务器查询本地存储的资源表, 所述资源表中记录网格资源 之前被选择作为计算资源并成功完成分配的计算任务的历史累积次数; 所述网格服务器排序当前在线的网格资源在所述资源表中记录的对应 的历史累积次数, 按对应的历史累积次数从高到低的顺序, 选择一个或多 个网格资源作为本次计算资源; 以及
接收到本次计算资源返回的计算结果后, 更新所述资源表中对应计算 资源的历史累积次数。
进一步地, 所述资源表中还记录网格资源最近一次被选择并成功完成 分配的计算任务的对应选择时间;
对于历史累积次数相同, 或历史累积次数的差值在设定范围内的网格 资源, 优先选择其对应选择时间距离当前时间最近的网格资源, 作为本次 计算资源。
进一步地, 所述网格服务器在注册到本地的在线网格资源中, 选择一 个或多个网格资源作为本次计算资源, 具体包括:
所述网格服务器在注册到本地的在线网格资源中, 选择若干个网格资 源作为遗传算法的初始种群个体;
所述网格服务器调用所述遗传算法, 将算法输出的网格资源作为本次 计算资源。
进一步地, 所述选择若干个网格资源作为遗传算法的初始种群个体, 具体包括:
所述网格服务器查询本地存储的资源快表, 所述资源快表中记录每个 网格资源对应的调度信息权重值, 所述调度信息权重值与每个网格资源被 选择并成功完成分配的计算任务的历史次数正相关;
所述网格服务器根据每个网格资源对应的调度信息权重值与其固有属 性值的乘积占每个网格资源的所述乘积之和的比率, 确定出每个网格资源 被选为遗传算法初始种群个体的概率, 按照所述概率从大到小的顺序选择 对应的若干个网格资源作为遗传算法初始种群个体。
该方法进一步包括: 仅当 Web服务器集群判断自身的负荷超过设定的 阈值时, 才将当前计算任务发送给设置于网络侧的网格服务器。 本发明还提供了一种网格服务器, 包括:
网格资源管理单元, 用于接收网格资源的注册请求, 记录在线的网格 资源;
任务接收 /反馈单元, 用于接收 Web服务器集群发送的当前计算任务; 以及接收本次计算资源成功完成分配的计算任务后返回的计算结果, 并传 送给所述 Web服务器集群;
资源选择单元, 用于选择一个或多个在线的网格资源作为本次计算资 源;
任务分配单元, 用于将所述任务接收 /反馈单元接收的所述计算任务分 配给所述资源选择单元选择出的所述本次计算资源。
进一步地, 所述网格资源管理单元中存储有资源表, 所述资源表中记 录网格资源之前被选择作为计算资源并成功完成分配的计算任务的历史累 积次数;
所述资源选择单元具体用于, 排序当前在线的网格资源在所述资源表 中记录的对应的历史累积次数, 按对应的历史累积次数从高到低的顺序, 选择一个或多个网格资源作为本次计算资源; 以及当所述任务接收 /反馈单 元接收到本次计算资源返回的计算结果后, 更新所述资源表中对应计算资 源对应的历史累积次数。
进一步地, 所述网格资源管理单元中存储有资源快表, 所述资源快表 中记录每个网格资源对应的调度信息权重值, 所述调度信息权重值与每个 网格资源被选择并成功完成分配的计算任务的历史次数正相关;
所述资源选择单元具体用于, 根据每个网格资源对应的调度信息权重 值与其固有属性值的乘积占每个网格资源的所述乘积之和的比率, 确定出 每个网格资源被选为遗传算法初始种群个体的概率, 按照所述概率从大到 小的顺序选择当前在线的若干个网络资源作为遗传算法初始种群个体, 再 调用所述遗传算法, 将算法输出的网格资源作为本次计算资源。 本发明还提供了一种 Web负载均衡***, 包括: Web服务器集群、 网 格服务器和网格资源;
所述 Web服务器集群, 用于将当前计算任务发送给所述网格服务器; 以及接收所述网格服务器传送的计算结果;
所述网格服务器, 用于接收网格资源的注册请求, 记录在线的网格资 源; 以及接收 Web服务器集群发送的计算任务,在注册的在线网格资源中, 选择一个或多个网格资源作为本次计算资源; 并将所述计算任务分配给所 述本次计算资源;
所述网格资源, 用于注册到所述网格服务器中, 当被选择作为本次计 算资源并成功完成分配的计算任务后, 向所述网格服务器返回计算结果。
该***还包括客户端, 用于通过 Web浏览器, 登录所述 Web服务器集 群提供的***功能 Web页面提交所述计算任务; 以及接收 Web服务器集群 返回的计算结果并展示给用户。
采用本发明, 网络中各类型计算机, 通过注册到设置于网络侧的网格 服务器, 成为网格资源; 由网格服务器对网格资源进行管理。 当 Web服务 器集群将当前计算任务发送给网格服务器后, 网格服务器在注册到本地的 在线网格资源中, 选择一个或多个网格资源作为本次计算资源, 将计算任 务分配给本次计算资源, 由本次计算资源完成分配的计算任务, 并将计算 结果返回给网格服务器, 再由网格服务器将计算结果传送给 Web服务器集 群。 这样, 通过充分利用网络中的各类型计算机作为网格资源参与分担计 算任务, 减轻 Web服务器集群中各 Web服务器的负荷, 不需要增加 Web 服务器就实现了 Web负载均衡并提高了整个 Web***的负荷能力。 附图说明
图 1为本发明实施例提供的 Web负载均衡方法流程图; 图 2为本发明实施例提供的网格服务器结构示意图;
图 3为本发明实施例提供的 Web负载均衡***结构示意图。 具体实施方式
本发明 Web负载均衡方案的核心思想是: 可以将登录到网络的各类型 计算机作为网格资源, 充分利用各计算机的剩余计算能力来协助 Web服务 器集群完成一部分计算任务, 不仅实现了 Web负载均衡, 而且可以提高整 个 Web***的负荷能力,解决了现有技术中需要通过增加 Web服务器来实 现 Web负载均衡及提高***负荷能力导致整个***的运营成本不断增加的 问题。
下面结合附图, 用具体实施例对本发明提供的方法及***进行详细阐 述。
本发明在网络侧增设一个网格服务器, 登录到网络中的各类型计算机 可以选择注册到网格服务器而成为网格资源。 网格服务器主要实现对网格 资源的上线及下线管理, 并与 Web服务器集***互, 接收 Web服务器集群 发送的计算任务, 分配给在线的网格资源进行计算, 并传送网格资源返回 的计算结果给 Web服务器集群。 网格服务器的其它具体功能在后文中详细 描述。
参见图 1 , 为本发明实施例提供的 Web负载均衡方法流程图, 包括: 步骤 S101、 由 Web服务器集群将当前计算任务发送给设置于网络侧的 网格服务器;
步骤 S102、 网格服务器在注册到本地的在线网格资源中, 选择一个或 多个网格资源作为本次计算资源, 并将计算任务分配给选择出的本次计算 资源;
步骤 S103、 本次计算资源成功完成分配的计算任务后返回计算结果给 网格服务器; 步骤 S104、 网格服务器传送计算结果给 Web服务器集群。
通过上述流程, 实现了由网格服务器管理的各网格资源参与计算任务 分担, 减轻了 Web服务器集群的负荷, 实现了 Web负载均衡。
Web服务器集群发送给网格服务器的当前计算任务, 可以是网格侧发 起的计算任务, 也可以是由用户提交的计算任务。 当由用户提交计算任务 时, 用户可以通过客户端的 Web浏览器, 登录 Web服务器集群提供的*** 功能 Web页面来提交任务; Web服务器集群将用户提交的任务发送到网格 服务器后, 接收网格服务器传送的由选择出的网格资源进行计算后的计算 结果, 并返回给提交相应任务的客户端, 由客户端展示给用户。
网格服务器在注册到本地的在线网格资源中, 选择一个或多个网格资 源作为本次计算资源的实现方法有很多, 一种较筒单的方法是: 任意选择 当前在线的网格资源作为本次计算资源。 该种方法的优点是选择过程筒单, 但有可能被选择出的网格资源本身的计算能力较弱, 导致不能成功地完成 本次分配的计算任务, 或者完成分配的计算任务的时延较长。
作为例子, 本发明实施例提供如下几种较佳的选择网格资源作为本次 计算资源的实现方法, 但本发明并不局限于下述例子。
实例 1 :
在网格服务器存储资源表中记录网格资源之前被选择作为计算资源并 成功完成分配的计算任务的历史累积次数。
下表 1 为资源表的一个具体例子, 资源表长度(即资源表中的记录数 量)可以预先设定一个较大的值, 例如设定存储 200条记录, 也可由网格 服务器根据当前或一段时间内的在线网格资源的数量调整资源表长度。 例 如: 资源表长度 =取整(在线网格资源个数 *长度系数), 长度系数的取值范 围例如为 【0.2 , 0.5】。 在资源表长度有限的前提下, 优先将历史累积次数 较多的网格资源存储到资源表中。 为描述筒便, 以资源表设置 5条记录为 例, 各网格资源及其历史累积次数如下表 1所示:
Figure imgf000010_0001
表 1
当网格服务器接收到 Web服务器集群发送的当前计算任务后, 查询本 地存储的资源表, 按照历史累积次数从高到低的顺序, 对资源表中当前在 线的网格资源进行排序, 选择历史累积次数较高的一个或多个网格资源作 为本次计算资源。假设当前在线的网格资源为网格资源 2、 网格资源 3和网 格资源 4, 根据排序结果, 网格资源 4的历史累积次数最高, 当选择一个网 格资源作为本次计算资源时, 选择网格资源 4; 当选择两个网格资源作为本 次计算资源时, 选择网格资源 4和网格资源 2。假设选择网格资源 4和网格 资源 2作为本次计算资源,网格服务器会将当前计算任务分配给网络资源 4 和网格资源 2。 具体分配方法可以是将当前计算任务均分成两部分, 也可以 由网格服务器根据注册的网格资源 4和网格资源 2的各自的固有属性, 确 定出网格资源 4和 2各自计算能力的大小, 将大部分计算任务分配给计算 能力大的网格资源。
另外, 由于资源表中记录的是各网格资源被选择并成功完成分配的计 算任务的历史累积次数, 因此, 该资源表是需要动态更新的, 当网格资源 4 和网格资源 2成功完成本次计算任务后, 将返回计算结果给网格服务器, 网格服务器接收到返回的计算结果后, 更新资源表中网格资源 4和网格资 源 2的历史累积次数, 更新后的历史累积次数分别为 21和 6。
上述采用资源表的方式来选择网格资源, 是基于网格资源成功完成分 配的计算任务的次数为选择依据。 曾经成功完成计算任务次数较多的网格 资源, 认为其可靠性较高, 能成功完成本次计算任务的可能性较大。
上述选择方法实例 1仅是一个例子, 实际中, 还可以进行优化。 例如: 资源表中还可以记录网格资源最近一次被选择并成功完成分配的计算任务 的对应选择时间; 对于历史累积次数相同, 或历史累积次数的差值在设定 范围内的多个网格资源, 优先选择其对应选择时间距离当前时间最近的网 格资源作为本次计算资源。
实例 2:
在实例 2 中, 采用现有技术中的遗传算法来选择较优的网格资源参与 计算。 具体为:
网格服务器在注册到本地的在线网格资源中, 选择若干个网格资源作 为遗传算法的初始种群个体; 再调用遗传算法, 将算法输出的网格资源作 为本次计算资源。
选择若干个网格资源作为遗传算法的初始种群个体的实现方法也可以 有很多种, 一种较筒单的方法是任意选择当前在线的网格资源作为遗传算 法的初始种群个体。 该种方法的优点是选择过程筒单, 但由于初始种群个 体是任意选择的, 有可能导致最终输出的网格资源不是最优网格资源。
为了选择出较优的初始种群个体, 仅作为例子 (本发明不局限于下述 例子), 本发明提供如下具体实现方法:
在网格服务器中存储资源快表, 资源快表中记录每个网格资源对应的 调度信息权重值; 其中, 调度信息权重值与每个网格资源被选择并成功完 成分配的计算任务的历史次数正相关。 例如: 调度信息权重值可以采用下 述方式确定:
假设用 r,表示网格资源 j的调度信息权重值,网格计算服务器为网格资 源 j的调度信息权重值赋初值 r,.( 0 ) , 式( 1 ) 中 F;为网格资源 j的 MIPS ( Million Instructions Per Second )、 即每秒处理的百万级的机器语言指令数。
如果网格计算服务器将计算任务分配给网格资源 j, 并且任务被成功完成, 网格资源 j的调度信息权重值会随之改变; 具体更新过程如下:
Ο +Δ^ (2) 当网格资源 j成功完成任务时, 式(2) 中,
Figure imgf000012_0001
, 0.2为奖励 系数(仅作为例子); 否则 Ar.=0。 从上式(2)可以看出, 网格资源的调 度信息权重值随该网格资源完成分配的计算任务的次数而增加。 相应地, 需要更新资源快表中存储的该网格资源对应的调度信息权重值。
网格服务器接收到 Web服务器集群发送的当前计算任务后, 查询本地 存储的资源快表, 能获得存储的每个网格资源对应的调度信息权重值, 根 据每个网格资源对应的调度信息权重值、 与其固有属性值的乘积占每个网 格资源的对应乘积之和的比率, 确定出每个网格资源被选为遗传算法初始 种群个体的概率, 再按照概率从大到小的顺序选择对应的若干个网格资源 作为遗传算法初始种群个体。 一个具体实现例子为:
Γ Ί a Γ 「
下: P;k = P; (3)
Άβ
Figure imgf000012_0002
式(3) 中, η为资源快表中存储的网格资源的个数; 若网格资源 j 当 前在线, 且网格资源 j上次任务成功完成, 为 1; 若网格 j不在线, 或者 上次任务没有成功完成, ^为 0; 表示网格资源的固有属性,即 ,. = τ( 0 ) , α表示网格资源调度信息权重值的重要性, β表示网格资源固有属性的重要 性, α和 β根据 Web***中网格资源的负载变化速度与网格资源固有属性 之间的关系进行取值, 例如, 网格资源的负载变化速度较快, 与网格资源 固有属性的作用差距不大时, α和 β都取 0.5。
计算得到各网格资源对应的概率 P]k后,按照概率 P]k从大到小的顺序选 取 Q*m个网格资源作为初始种群个体, 将其分成 Q个种群, 每个种群包含 m个个体; 再调用遗传算法选出最优网格资源。 由于遗传算法的具体计算 过程为现有技术, 在此不作详细描述。
上述实例 2也可以进一步优化, 例如, 可以结合上述实例 1 的方法, 在计算网格资源 j被选作初始种群个体的概率时,对于当前存储在资源表中 的网格资源 (该些网格资源被选择并成功完成分配的计算任务的历史累积 次数较多, 且在距离当前时间较近的时间段内被选择过), 可以适当增加其 对应的概率 , 以增加对应网格资源被选为遗传算法初始种群个体的可能 例 口:
Figure imgf000013_0001
为资源表资源系数, 若网格资源 j在资源表中, 例如可以取 0.2, 否则, ^取 0。
上述实例 1和实例 2及其优化方法, 用举例的方式公开了几种选择网 格资源作为本次计算资源的实现方法。 特别申明的是, 实际应用中, 还可 以根据需要采用其它的类似方法来选择网络资源作为本次计算资源。
本次计算资源选定后, 网格服务器将 Web服务器集群发送过来的当前 计算任务分配给本次计算资源。 一种具体分配方式为:
网格服务器根据本次计算资源的个数 m, 将当前计算任务分割为 m个 子任务, 利用适应度函数对本次计算资源进行排序, 将任务量大的子任务 分配给适应度高的本次计算资源。 使用这种方法, 任务量大的子任务分给 计算能力强且任务完成率高的网格资源, 有利于任务的完成。
网格资源的适应度函数的表达式为: ·) = /。)> ( 5 )
D
式(5 )中, S为网格资源 j成功完成分配的计算任务的历史累计次数; D为网格资源 j被选择的总次数。
本发明上述实施例公开的 Web负载均衡方法,可以由 Web服务器集群 来控制具体的启动条件。 例如: 当 Web服务器集群判断自身的负荷超过设 定的阈值时, 才将当前计算任务发送给网格服务器, 由网格资源服务器分 配给选择的网格资源分担当前计算任务。 实际应用中, 即使 Web服务器集 的负荷没有超过设定的阈值, 也可以采用上述 Web负载均衡方法进行 Web 负载均衡, 以减少 Web服务器的计算工作量。
本发明上述实施例公开的 Web负载均衡方法中, 即使网格服务器选择 出了本次计算资源, 并将当前计算任务进行了分配, 本次计算资源中也可 能有一部分不能成功地完成分配的计算任务, 或者由于自身资源有限拒绝 接受分配的计算任务, 在这种情况下, 可以向网格服务器返回拒绝消息; 网格服务器传送拒绝消息给 Web服务器集群。 Web服务器集群收到拒绝消 息后, 可以确定出是哪一部分计算任务没有被分担, 后续再由 Web服务器 集群内的各 Web服务器承担该部分计算任务, 也可以将该部分计算任务再 次发送到网格服务器进行再次任务分配。
基于同一发明构思,根据本发明上述实施例提供的 Web负载均衡方法, 本发明实施例还提供一种具备相应功能的网格服务器,其结构示意图如图 2 所示, 包括:
网格资源管理单元 21 , 用于接收网格资源的注册请求, 记录在线的网 格资源;
任务接收 /反馈单元 22, 用于接收 Web服务器集群发送的当前计算任 务; 以及接收本次计算资源成功完成分配的计算任务后返回的计算结果, 并传送给所述 Web服务器集群;
资源选择单元 23 , 用于选择一个或多个在线的网格资源作为本次计算 资源;
任务分配单元 24, 用于将任务接收 /反馈单元 22接收的计算任务分配 给资源选择单元 23选择出的本次计算资源。
一实施例中, 网格资源管理单元 21中存储有资源表, 资源表中记录网 格资源之前被选择作为计算资源并成功完成分配的计算任务的历史累积次 数。 资源选择单元 23具体用于, 排序当前在线的网格资源在资源表中记录 的对应的历史累积次数, 按对应的历史累积次数从高到低的顺序, 选择一 个或多个网格资源作为本次计算资源;以及当任务接收 /反馈单元 22接收到 本次计算资源返回的计算结果后, 更新资源表中对应计算资源的历史累积 次数。
一实施例中, 网格资源管理单元 21中存储有资源快表, 资源快表中记 录每个网格资源对应的调度信息权重值, 调度信息权重值与每个网格资源 被选择并成功完成分配的计算任务的历史次数正相关。 资源选择单元 23具 体用于, 根据每个网格资源对应的调度信息权重值与其固有属性值的乘积 占每个网格资源的乘积之和的比率, 确定出每个网格资源被选为遗传算法 初始种群个体的概率, 按照概率从大到小的顺序选择当前在线的若干个网 络资源作为遗传算法初始种群个体, 再调用遗传算法, 将算法输出的网格 资源作为本次计算资源。
基于同一发明构思,根据本发明上述实施例提供的 Web负载均衡方法, 本发明实施例还提供一种 Web负载均衡***, 其结构示意图如图 3所示, 包括: Web服务器集群 31、 网格服务器 32和网格资源 33。
Web服务器集群 31 , 用于将当前计算任务发送给网格服务器 32; 以及 接收网格服务器 32传送的计算结果;
网格服务器 32, 用于接收网格资源 33的注册请求, 记录在线的网格资 源; 以及接收 Web服务器集群 31发送的计算任务,在注册的在线网格资源 中, 选择一个或多个网格资源作为本次计算资源; 并将计算任务分配给本 次计算资源;
网格资源 33 , 用于注册到网格服务器中, 当被选择作为本次计算资源 并成功完成分配的计算任务后, 向网格服务器 32返回计算结果。
一实施例中, 还包括客户端 34; 用于通过 Web浏览器, 登录 Web服务 器集群 31提供的***功能 Web页面提交计算任务; 以及接收 Web服务器 集群返回的计算结果并展示给用户。
采用本发明, 网络中各类型计算机, 通过注册到设置于网络侧的网格 服务器, 成为网格资源; 由 Web服务器集群将当前计算任务发送给网格服 务器, 网格服务器在注册到本地的在线网格资源中, 选择一个或多个网格 资源作为本次计算资源, 将计算任务分配给本次计算资源, 由本次计算资 源完成分配的计算任务, 并将计算结果返回给网格服务器, 再由网格服务 器将计算结果传送给 Web服务器集群。 通过利用网络中的各类型计算机作 为网格资源参与分担计算任务, 在不需要增加 Web 服务器的情况下实现 Web负载均衡, 并有效提高整个 Web***的负荷能力。 本发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权 利要求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在 内。

Claims

权利要求书
1、 一种 Web负载均衡方法, 其特征在于, 包括:
由 Web服务器集群将当前计算任务发送给设置于网络侧的网格服务 器;
所述网格服务器在注册到本地的在线网格资源中, 选择一个或多个网 格资源作为本次计算资源, 并将所述计算任务分配给所述本次计算资源; 所述本次计算资源成功完成分配的计算任务后返回计算结果给所述网 格服务器;
所述网格服务器传送所述计算结果给所述 Web服务器集群。
2、 如权利要求 1所述的 Web负载均衡方法, 其特征在于, 所述计算任 务为用户通过客户端的 Web浏览器,登录所述 Web服务器集群提供的*** 功能 Web页面提交;
所述 Web服务器集群接收到所述网格服务器传送的所述计算结果后, 该方法还包括: 所述 Web服务器集群将所述计算结果返回给所述客户端, 由所述客户端展示给用户。
3、 如权利要求 1或 2所述的 Web负载均衡方法, 其特征在于, 所述网 格服务器在注册到本地的在线网格资源中, 选择一个或多个网格资源作为 本次计算资源, 具体包括:
所述网格服务器查询本地存储的资源表, 所述资源表中记录网格资源 之前被选择作为计算资源并成功完成分配的计算任务的历史累积次数; 所述网格服务器排序当前在线的网格资源在所述资源表中记录的对应 的历史累积次数, 按对应的历史累积次数从高到低的顺序, 选择一个或多 个网格资源作为本次计算资源; 以及
接收到本次计算资源返回的计算结果后, 更新所述资源表中对应计算 资源的历史累积次数。
4、 如权利要求 3所述的 Web负载均衡方法, 其特征在于, 所述资源表 中还记录网格资源最近一次被选择并成功完成分配的计算任务的对应选择 时间;
对于历史累积次数相同, 或历史累积次数的差值在设定范围内的网格 资源, 优先选择其对应选择时间距离当前时间最近的网格资源, 作为本次 计算资源。
5、 如权利要求 1或 2所述的 Web负载均衡方法, 其特征在于, 所述网 格服务器在注册到本地的在线网格资源中, 选择一个或多个网格资源作为 本次计算资源, 具体包括:
所述网格服务器在注册到本地的在线网格资源中, 选择若干个网格资 源作为遗传算法的初始种群个体;
所述网格服务器调用所述遗传算法, 将算法输出的网格资源作为本次 计算资源。
6、 如权利要求 5所述的 Web负载均衡方法, 其特征在于, 所述选择若 干个网格资源作为遗传算法的初始种群个体, 具体包括:
所述网格服务器查询本地存储的资源快表, 所述资源快表中记录每个 网格资源对应的调度信息权重值, 所述调度信息权重值与每个网格资源被 选择并成功完成分配的计算任务的历史次数正相关;
所述网格服务器根据每个网格资源对应的调度信息权重值与其固有属 性值的乘积占每个网格资源的所述乘积之和的比率, 确定出每个网格资源 被选为遗传算法初始种群个体的概率, 按照所述概率从大到小的顺序选择 对应的若干个网格资源作为遗传算法初始种群个体。
7、 如权利要求 1所述的 Web负载均衡方法, 其特征在于, 该方法进一 步包括: 仅当 Web服务器集群判断自身的负荷超过设定的阈值时, 才将当 前计算任务发送给设置于网络侧的网格服务器。
8、 一种网格服务器, 其特征在于, 包括:
网格资源管理单元, 用于接收网格资源的注册请求, 记录在线的网格 资源;
任务接收 /反馈单元, 用于接收 Web服务器集群发送的当前计算任务; 以及接收本次计算资源成功完成分配的计算任务后返回的计算结果, 并传 送给所述 Web服务器集群;
资源选择单元, 用于选择一个或多个在线的网格资源作为本次计算资 源;
任务分配单元, 用于将所述任务接收 /反馈单元接收的所述计算任务分 配给所述资源选择单元选择出的所述本次计算资源。
9、 如权利要求 8所述的网格服务器, 其特征在于, 所述网格资源管理 单元中存储有资源表, 所述资源表中记录网格资源之前被选择作为计算资 源并成功完成分配的计算任务的历史累积次数;
所述资源选择单元具体用于, 排序当前在线的网格资源在所述资源表 中记录的对应的历史累积次数, 按对应的历史累积次数从高到低的顺序, 选择一个或多个网格资源作为本次计算资源; 以及当所述任务接收 /反馈单 元接收到本次计算资源返回的计算结果后, 更新所述资源表中对应计算资 源对应的历史累积次数。
10、 如权利要求 8所述的网格服务器, 其特征在于, 所述网格资源管 理单元中存储有资源快表, 所述资源快表中记录每个网格资源对应的调度 信息权重值, 所述调度信息权重值与每个网格资源被选择并成功完成分配 的计算任务的历史次数正相关;
所述资源选择单元具体用于, 根据每个网格资源对应的调度信息权重 值与其固有属性值的乘积占每个网格资源的所述乘积之和的比率, 确定出 每个网格资源被选为遗传算法初始种群个体的概率, 按照所述概率从大到 小的顺序选择当前在线的若干个网络资源作为遗传算法初始种群个体, 再 调用所述遗传算法, 将算法输出的网格资源作为本次计算资源。
11、 一种 Web负载均衡***, 其特征在于, 包括: Web服务器集群、 网格服务器和网格资源;
所述 Web服务器集群, 用于将当前计算任务发送给所述网格服务器; 以及接收所述网格服务器传送的计算结果;
所述网格服务器, 用于接收网格资源的注册请求, 记录在线的网格资 源; 以及接收 Web服务器集群发送的计算任务,在注册的在线网格资源中, 选择一个或多个网格资源作为本次计算资源; 并将所述计算任务分配给所 述本次计算资源;
所述网格资源, 用于注册到所述网格服务器中, 当被选择作为本次计 算资源并成功完成分配的计算任务后, 向所述网格服务器返回计算结果。
12、 如权利要求 11所述的 Web负载均衡***, 其特征在于, 该***还 包括客户端, 用于通过 Web浏览器, 登录所述 Web服务器集群提供的*** 功能 Web页面提交所述计算任务; 以及接收 Web服务器集群返回的计算结 果并展示给用户。
PCT/CN2009/075923 2009-09-08 2009-12-24 一种Web负载均衡方法、网格服务器及*** WO2011029253A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910169534.6A CN102014042A (zh) 2009-09-08 2009-09-08 一种Web负载均衡方法、网格服务器及***
CN200910169534.6 2009-09-08

Publications (1)

Publication Number Publication Date
WO2011029253A1 true WO2011029253A1 (zh) 2011-03-17

Family

ID=43731934

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/075923 WO2011029253A1 (zh) 2009-09-08 2009-12-24 一种Web负载均衡方法、网格服务器及***

Country Status (2)

Country Link
CN (1) CN102014042A (zh)
WO (1) WO2011029253A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109842665A (zh) * 2017-11-29 2019-06-04 北京京东尚科信息技术有限公司 用于任务分配服务器的任务处理方法和装置
CN112187731A (zh) * 2020-09-09 2021-01-05 广州杰赛科技股份有限公司 一种工业互联网访问控制方法、装置、设备及存储介质
CN114374696A (zh) * 2021-12-15 2022-04-19 深圳前海微众银行股份有限公司 一种容器负载均衡方法、装置、设备及存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104426953A (zh) * 2013-08-28 2015-03-18 腾讯科技(深圳)有限公司 一种分配计算资源的方法及装置
CN103458041A (zh) * 2013-09-10 2013-12-18 李传双 一种集中控制分散式运算的云计算方法及***
CN103957280B (zh) * 2014-05-21 2017-05-24 中国科学院重庆绿色智能技术研究院 一种物联网中的传感网络连接分配和调度方法
CN104158855B (zh) * 2014-07-24 2018-01-02 浙江大学 基于遗传算法的移动服务组合计算卸载方法
CN105187488A (zh) * 2015-08-05 2015-12-23 江苏科技大学 一种基于遗传算法实现mas负载均衡的方法
CN105871750A (zh) * 2016-03-25 2016-08-17 乐视控股(北京)有限公司 一种资源调度方法及服务器
CN106681803B (zh) * 2016-08-04 2020-10-16 腾讯科技(深圳)有限公司 一种任务调度方法及服务器
CN106407460A (zh) * 2016-10-10 2017-02-15 武汉大学 一种分布式的电离层模型云服务***及方法
CN108076092A (zh) * 2016-11-14 2018-05-25 北大方正集团有限公司 Web服务器资源均衡方法及装置
CN109885401B (zh) * 2019-01-27 2020-11-24 中国人民解放军国防科技大学 基于lpt局部优化的结构化网格负载平衡方法
CN110933147B (zh) * 2019-11-15 2020-07-17 链睿信息服务(南通)有限公司 一种基于云计算的信息技术分析***

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1870526A (zh) * 2005-12-20 2006-11-29 华为技术有限公司 一种网格计算中节点间负载转移的方法
KR20080018013A (ko) * 2006-08-23 2008-02-27 인하대학교 산학협력단 그리드 자원 관리 시스템 및 방법
CN101453398A (zh) * 2007-12-06 2009-06-10 怀特威盛软件公司 一种新型分布式网格超级计算***及方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1870526A (zh) * 2005-12-20 2006-11-29 华为技术有限公司 一种网格计算中节点间负载转移的方法
KR20080018013A (ko) * 2006-08-23 2008-02-27 인하대학교 산학협력단 그리드 자원 관리 시스템 및 방법
CN101453398A (zh) * 2007-12-06 2009-06-10 怀特威盛软件公司 一种新型分布式网格超级计算***及方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109842665A (zh) * 2017-11-29 2019-06-04 北京京东尚科信息技术有限公司 用于任务分配服务器的任务处理方法和装置
CN109842665B (zh) * 2017-11-29 2022-02-22 北京京东尚科信息技术有限公司 用于任务分配服务器的任务处理方法和装置
CN112187731A (zh) * 2020-09-09 2021-01-05 广州杰赛科技股份有限公司 一种工业互联网访问控制方法、装置、设备及存储介质
CN114374696A (zh) * 2021-12-15 2022-04-19 深圳前海微众银行股份有限公司 一种容器负载均衡方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN102014042A (zh) 2011-04-13

Similar Documents

Publication Publication Date Title
WO2011029253A1 (zh) 一种Web负载均衡方法、网格服务器及***
CN107273185B (zh) 一种基于虚拟机的负载均衡控制方法
US10198292B2 (en) Scheduling database queries based on elapsed time of queries
WO2017167025A1 (zh) 一种实现任务调度的方法、装置及计算机存储介质
CN108845874B (zh) 资源的动态分配方法及服务器
Liu et al. Resource preprocessing and optimal task scheduling in cloud computing environments
CN107273211B (zh) 一种云计算环境下基于虚拟机的数据处理方法
CN108170530B (zh) 一种基于混合元启发式算法的Hadoop负载均衡任务调度方法
EP2255286B1 (en) Routing workloads and method thereof
CN110597639B (zh) Cpu分配控制方法、装置、服务器及存储介质
Mishra et al. Time efficient dynamic threshold-based load balancing technique for Cloud Computing
CN103491024B (zh) 一种面向流式数据的作业调度方法及装置
Silberstein et al. Gridbot: execution of bags of tasks in multiple grids
US7660897B2 (en) Method, system, and program for distributing application transactions among work servers
CN110347515B (zh) 一种适合边缘计算环境的资源优化分配方法
Selvi et al. Resource allocation issues and challenges in cloud computing
Soni et al. A bee colony based multi-objective load balancing technique for cloud computing environment
CN109032800A (zh) 一种负载均衡调度方法、负载均衡器、服务器及***
Delavar et al. A synthetic heuristic algorithm for independent task scheduling in cloud systems
CN107168805A (zh) 一种基于虚拟机的资源调度方法
Qaddoum et al. Elastic neural network method for load prediction in cloud computing grid.
Chatterjee et al. A new clustered load balancing approach for distributed systems
Sanjeevi et al. DTCF: deadline task consolidation first for energy minimisation in cloud data centres
US10691700B1 (en) Table replica allocation in a replicated storage system
Muchori et al. Machine learning load balancing techniques in cloud computing: A review

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09849129

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09849129

Country of ref document: EP

Kind code of ref document: A1