TWI746506B - Method and device for network load balancing, control and network interaction - Google Patents

Method and device for network load balancing, control and network interaction Download PDF

Info

Publication number
TWI746506B
TWI746506B TW106103973A TW106103973A TWI746506B TW I746506 B TWI746506 B TW I746506B TW 106103973 A TW106103973 A TW 106103973A TW 106103973 A TW106103973 A TW 106103973A TW I746506 B TWI746506 B TW I746506B
Authority
TW
Taiwan
Prior art keywords
network
end server
client
type
information
Prior art date
Application number
TW106103973A
Other languages
Chinese (zh)
Other versions
TW201737667A (en
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 TW201737667A publication Critical patent/TW201737667A/en
Application granted granted Critical
Publication of TWI746506B publication Critical patent/TWI746506B/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/13Flow control; Congestion control in a LAN segment, e.g. ring or bus

Abstract

本發明提供了一種網路的負載均衡、控制及網路交互方法和裝置。所述方法包括:接收控制設備發送的預設流量調度規則以及後端伺服器在第二類網路的唯一路徑指示資訊;從客戶端發送的後端伺服器訪問請求中獲取客戶端在第一類網路的唯一路徑指示資訊;將後端伺服器訪問請求發送到按照預設流量調度規則選擇出的後端伺服器;接收後端伺服器返回的請求響應資訊,並按照客戶端的唯一路徑指示資訊將請求響應資訊返回至客戶端,唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,第一類網路和第二類網路中至少一個為虛擬私有網路VPC,採用本發明的方案可以不需要網關對客戶端和後端伺服器的地址轉換處理。 The invention provides a method and device for network load balancing, control and network interaction. The method includes: receiving preset traffic scheduling rules sent by the control device and the unique path indication information of the back-end server in the second type of network; Information about the unique path instruction of the similar network; send the back-end server access request to the back-end server selected according to the preset traffic scheduling rules; receive the request response information returned by the back-end server, and follow the client's unique path instruction The information returns the request response information to the client. The unique path indicates that the information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located. The first type of network and the second type of network At least one of the similar networks is a virtual private network VPC, and the solution of the present invention can eliminate the need for the gateway to perform address translation processing on the client and the back-end server.

Description

用於網路的負載均衡、控制及網路交互的方法和裝置 Method and device for network load balancing, control and network interaction

本發明涉及互聯網技術領域,特別是涉及一種網路的負載均衡方法和一種網路的負載均衡裝置,以及,一種網路的負載均衡控制方法和一種網路的負載均衡控制裝置,以及一種網路交互方法和一種網路交互裝置。 The present invention relates to the field of Internet technology, in particular to a network load balancing method and a network load balancing device, as well as a network load balancing control method and a network load balancing control device, and a network An interactive method and a network interactive device.

隨著互聯網技術的發展,伺服器所承擔的來自客戶端的訪問流量越來越龐大和頻繁,伺服器的擴展性越發重要。為了便於客戶端的訪問,通常會將擴展的多台後端伺服器虛擬為一個虛擬伺服器,以統一對外提供服務的介面。在客戶端和後端伺服器之間,通常由負載均衡器(Load Balancer,LB)根據一定的算法,將訪問流量調度到實際提供服務的後端伺服器上(Real Server,RS),以平衡多個後端伺服器的訪問流量。 With the development of Internet technology, the access traffic from the client to the server is becoming larger and more frequent, and the scalability of the server is becoming more and more important. In order to facilitate client access, multiple extended back-end servers are usually virtualized as a virtual server to unify the interface for providing services to the outside world. Between the client and the back-end server, the Load Balancer (LB) usually dispatches the access traffic to the back-end server (Real Server, RS) that actually provides the service according to a certain algorithm to balance Access traffic from multiple back-end servers.

對於一些基於VXLAN(Virtual eXtensible Local Area Network,虛擬可擴展局域網)建立的VPC(Virtual Private Cloud,虛擬私有雲)域內的客戶端,其地址僅僅在其域內唯一,無法直接訪問域外的設備,因此需要經過 網關的地址轉換處理。在訪問域外的設備時,需要經過網關將其地址轉換為一個非VPC地址,才得以順利經過負載均衡器的調度訪問後端伺服器。 For some clients in the VPC (Virtual Private Cloud) domain established based on VXLAN (Virtual eXtensible Local Area Network), their address is only unique within the domain and cannot directly access devices outside the domain. So need to go through Address translation processing of the gateway. When accessing a device outside the domain, the address needs to be converted to a non-VPC address through the gateway, so that the back-end server can be accessed smoothly through the scheduling of the load balancer.

此外,在負載均衡器對VPC域內的後端伺服器進行訪問流量調度時,因為其地址僅僅在其域內唯一,導致負載均衡器無法直接進行流量調度處理,也需要經過網關對伺服器的地址進行非VPC地址的轉換,才能實現調度處理。 In addition, when the load balancer schedules access traffic to the back-end server in the VPC domain, because its address is only unique in its domain, the load balancer cannot directly perform traffic scheduling processing, and it also needs to pass the gateway to the server. Only when the address is converted from a non-VPC address can the scheduling process be realized.

由於在客戶端對後端伺服器訪問的過程中,客戶端和伺服器原有的VPC地址都需要經過網關的轉換處理,處理過程增加了整個訪問的時延,從而造成了對後端伺服器訪問效率較低的問題。另外,經過網關轉換處理後負載均衡器無法得知客戶端真實的網路地址,就無法精確訪問控制客戶端。進一步地,地址轉換還會消耗傳統的IP地址。 In the process of the client's access to the back-end server, the original VPC addresses of the client and the server need to be converted by the gateway. The problem of low access efficiency. In addition, after the gateway conversion process, the load balancer cannot know the real network address of the client, and cannot precisely access and control the client. Furthermore, address translation will consume traditional IP addresses.

鑒於上述問題,提出了本發明實施例以便提供一種克服上述問題或者至少部分地解決上述問題的一種網路的負載均衡方法和相應的一種網路的負載均衡裝置,以及,一種網路的負載均衡控制方法和相應的一種網路的負載均衡控制裝置,以及一種網路交互方法和一種網路交互裝置。 In view of the above problems, embodiments of the present invention are proposed to provide a network load balancing method and a corresponding network load balancing device that overcome the above problems or at least partially solve the above problems, and a network load balance A control method and a corresponding network load balancing control device, as well as a network interaction method and a network interaction device.

為了解決上述問題,本發明公開了一種網路的負載均衡方法,包括: 接收控制設備發送的預設流量調度規則,以及後端伺服器在第二類網路的唯一路徑指示資訊;從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊;根據所述後端伺服器的唯一路徑指示資訊,將所述後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器;接收所述後端伺服器返回的請求響應資訊,並按照所述客戶端的唯一路徑指示資訊,將所述請求響應資訊返回至所述客戶端,其中,所述唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC。 In order to solve the above problems, the present invention discloses a network load balancing method, including: Receive the preset traffic scheduling rules sent by the control device and the unique path indication information of the back-end server in the second type of network; from the back-end server access request sent by the client, obtain that the client is in the first type The unique path indication information of the network; according to the unique path indication information of the back-end server, the back-end server access request is sent to at least one back-end server selected according to the preset traffic scheduling rule ; Receive the request response information returned by the back-end server, and return the request response information to the client according to the unique path indication information of the client, where the unique path indication information is in the client The first type of network where the end is located and the second type of network where each back-end server is located, and at least one of the first type of network and the second type of network is a virtual private network VPC .

可選地,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 Optionally, the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC.

可選地,還包括:按照多個後端應用伺服器的唯一路徑指示資訊,相應訪問多個後端伺服器;對訪問的後端伺服器進行運行狀態檢查,針對狀態異常的後端伺服器,在對應的唯一路徑指示資訊上標記異常標識;所述異常標識用於指示暫停發送所述後端伺服器訪問請求至後端伺服器。 Optionally, it also includes: correspondingly accessing multiple back-end servers according to the unique path indication information of multiple back-end application servers; checking the running status of the accessed back-end servers, and targeting the back-end servers with abnormal status , Marking an abnormality identifier on the corresponding unique path indication information; the abnormality identifier is used to instruct to suspend sending the back-end server access request to the back-end server.

可選地,在所述從客戶端發送的後端伺服器訪問請求 中,獲取所述客戶端在第一類網路的唯一路徑指示資訊的步驟之前,所述方法還包括:識別所述客戶端所處的第一類網路的網路類型。 Optionally, in the back-end server access request sent from the client In the step of obtaining the unique path indication information of the client in the first type of network, the method further includes: identifying the network type of the first type of network where the client is located.

可選地,所述從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊的步驟包括:針對所述第一類網路的網路類型,從所述後端伺服器訪問請求中解封出所述第一類網路的網路標識資訊和所述客戶端的地址標識資訊,並產生所述客戶端的唯一路徑指示資訊。 Optionally, in the back-end server access request sent from the client, the step of obtaining the unique path indication information of the client in the first type of network includes: a network for the first type of network Type, unblock the network identification information of the first type of network and the address identification information of the client from the back-end server access request, and generate unique path indication information of the client.

可選地,所述將所述請求響應資訊返回至所述客戶端的步驟包括:針對所述第一類網路的網路類型,封裝所述請求響應資訊並發送至所述客戶端。 Optionally, the step of returning the request response information to the client includes: encapsulating the request response information for the network type of the first type of network and sending it to the client.

可選地,在所述從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊的步驟之前,所述方法還包括:接收並保存多個客戶端向所述控制設備註冊時提交的所述客戶端所處的第一類網路的網路標識資訊;在所述從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端的唯一路徑指示資訊的步驟之後,所述方法還包括:判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊 的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 Optionally, in the back-end server access request sent from the client, before the step of obtaining the unique path indication information of the client in the first type of network, the method further includes: receiving and saving multiple The network identification information of the first type of network in which the client is located is submitted when a client registers with the control device; in the back-end server access request sent from the client, the client is acquired After the step of indicating information for the unique path of the terminal, the method further includes: determining whether the network identification information of the first type of network obtained from the back-end server access request is in the stored network of the first type of network Logo Information If not, return access denied information to the client.

為了解決上述問題,本發明還公開了一種網路的負載均衡控制方法,包括:從各後端伺服器獲取所述後端伺服器在第二類網路的唯一路徑指示資訊;將預設流量調度規則和所述後端伺服器的唯一路徑指示資訊發送至負載均衡設備,以供所述負載均衡設備根據所述後端伺服器的唯一路徑指示資訊,將所述客戶端的後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器,以及按照所述客戶端在第一類網路的唯一路徑指示資訊,將所述後端伺服器返回的請求響應資訊返回至所述客戶端,其中,所述唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC。 In order to solve the above problem, the present invention also discloses a network load balancing control method, which includes: obtaining the unique path indication information of the back-end server in the second type of network from each back-end server; The scheduling rules and the unique path indication information of the back-end server are sent to the load balancing device, so that the load balancing device can access the back-end server of the client according to the unique path indication information of the back-end server The request is sent to at least one back-end server selected in accordance with the preset traffic scheduling rule, and the request returned by the back-end server according to the unique path indication information of the client in the first type of network The response information is returned to the client, where the unique path indication information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located, the first type At least one of the network and the second type of network is a virtual private network VPC.

可選地,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 Optionally, the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC.

可選地,還包括:指示所述負載均衡設備將所述負載均衡設備的唯一路徑指示資訊發送至所述後端伺服器,以供所述後端伺服器按照所述負載均衡設備的唯一路徑指示資訊,返回請求響應資訊至所述負載均衡設備。 Optionally, the method further includes: instructing the load balancing device to send the unique path indication information of the load balancing device to the back-end server, so that the back-end server can follow the unique path of the load balancing device Indicating information, returning request response information to the load balancing device.

可選地,還包括: 接收所述客戶端在註冊時提交的所述客戶端所在的第一類網路的網路標識資訊;將所述第一類網路的網路標識資訊發送至所述負載均衡設備,以供所述負載均衡設備保存並在接收到所述客戶端的後端伺服器訪問請求時,判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 Optionally, it also includes: Receiving the network identification information of the first type of network where the client is located, submitted by the client during registration; sending the network identification information of the first type of network to the load balancing device for The load balancing device saves and, when receiving the back-end server access request of the client, determines whether the network identification information of the first type of network obtained from the back-end server access request is in the saved first Within the range of the network identification information of a type of network, if not, return the access denied information to the client.

為了解決上述問題,本發明還公開了一種網路交互方法,包括:根據後端伺服器在第二類網路的唯一路徑指示資訊,將客戶端對後端伺服器的訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器,所述第二類網路為虛擬私有網路VPC;和/或,按照所述客戶端在第一類網路的唯一路徑指示資訊,將後端伺服器針對客戶端的訪問請求返回的請求響應資訊返回至所述客戶端,所述第一類網路為虛擬私有網路VPC;其中,所述唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在。 In order to solve the above problems, the present invention also discloses a network interaction method, which includes: according to the unique path indication information of the back-end server in the second type of network, sending the client's access request to the back-end server to the At least one back-end server selected by the preset traffic scheduling rule, the second type of network is a virtual private network VPC; and/or, according to the unique path instruction of the client in the first type of network Information, the request response information returned by the back-end server for the client's access request is returned to the client. The first type of network is a virtual private network VPC; wherein the unique path indication information is in the client The only existence in the first type of network where the end is located and the second type of network where each back-end server is located.

為了解決上述問題,本發明還公開了一種網路的負載均衡裝置,包括:預設流量調度規則接收模組,用於接收控制設備發送的預設流量調度規則,以及後端伺服器在第二類網路的唯 一路徑指示資訊;資訊獲取模組,用於從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊;後端伺服器訪問請求發送模組,用於根據所述後端伺服器的唯一路徑指示資訊,將所述後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器;請求響應資訊返回模組,用於接收所述後端伺服器返回的請求響應資訊,並按照所述客戶端的唯一路徑指示資訊,將所述請求響應資訊返回至所述客戶端,其中,所述唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC。 In order to solve the above problems, the present invention also discloses a network load balancing device, including: a preset flow scheduling rule receiving module, configured to receive the preset flow scheduling rule sent by the control device, and the back-end server in the second Network-like A path indication information; an information acquisition module for obtaining the unique path indication information of the client in the first type of network from the back-end server access request sent by the client; the back-end server access request sending module Group, used to send the back-end server access request to at least one back-end server selected according to the preset traffic scheduling rule according to the unique path indication information of the back-end server; request response information The return module is used to receive the request response information returned by the back-end server, and return the request response information to the client according to the unique path indication information of the client, wherein the unique path indication Information only exists in the first type of network where the client is located and the second type of network where each back-end server is located, and at least one of the first type of network and the second type of network is virtual private Network VPC.

可選地,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 Optionally, the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC.

可選地,還包括:後端伺服器訪問模組,用於按照多個後端應用伺服器的唯一路徑指示資訊,相應訪問多個後端伺服器。 Optionally, it further includes: a back-end server access module for correspondingly accessing multiple back-end servers according to the unique path indication information of the multiple back-end application servers.

運行狀態檢查模組,用於對訪問的後端伺服器進行運行狀態檢查,針對狀態異常的後端伺服器,在對應的唯一路徑指示資訊上標記異常標識;所述異常標識用於指示暫停發送所述後端伺服器訪問請求至後端伺服器。 The running status check module is used to check the running status of the accessed back-end server. For the back-end server with abnormal status, mark the abnormal identifier on the corresponding unique path indication information; the abnormal identifier is used to indicate the suspension of sending The back-end server access request to the back-end server.

可選地,還包括:網路類型識別模組,用於識別所述客戶端所處的第一類網路的網路類型。 Optionally, it further includes: a network type identification module for identifying the network type of the first type of network where the client is located.

可選地,所述資訊獲取模組包括:後端伺服器訪問請求解封子模組,用於針對所述第一類網路的網路類型,從所述後端伺服器訪問請求中解封出所述第一類網路的網路標識資訊和所述客戶端的地址標識資訊,並產生所述客戶端的唯一路徑指示資訊。 Optionally, the information acquisition module includes: a back-end server access request unblocking sub-module for unblocking the back-end server access request for the network type of the first type of network The network identification information of the first type of network and the address identification information of the client are sealed, and unique path indication information of the client is generated.

可選地,所述請求響應資訊返回模組包括:請求響應資訊封裝子模組,用於針對所述第一類網路的網路類型,封裝所述請求響應資訊並發送至所述客戶端。 Optionally, the request response information return module includes: a request response information encapsulation sub-module for encapsulating the request response information for the network type of the first type of network and sending it to the client .

可選地,還包括:網路標識資訊接收模組,用於接收並保存多個客戶端向所述控制設備註冊時提交的所述客戶端所處的第一類網路的網路標識資訊;所述裝置還包括:網路標識資訊判斷模組,用於判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 Optionally, it further includes: a network identification information receiving module, configured to receive and save the network identification information of the first type of network where the client is located, submitted when multiple clients register with the control device The device also includes: a network identification information determination module, used to determine whether the network identification information of the first type of network obtained from the back-end server access request is in the stored first type of network Within the range of the network identification information, if not, return the access denied information to the client.

為了解決上述問題,本發明還公開了一種網路的負載均衡控制裝置,包括:後端伺服器唯一路徑指示資訊獲取模組,用於從各後 端伺服器獲取所述後端伺服器在第二類網路的唯一路徑指示資訊;預設流量調度規則發送模組,用於將預設流量調度規則和所述後端伺服器的唯一路徑指示資訊發送至負載均衡設備,以供所述負載均衡設備根據所述後端伺服器的唯一路徑指示資訊,將所述客戶端的後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器,以及按照所述客戶端在第一類網路的唯一路徑指示資訊,將所述後端伺服器返回的請求響應資訊返回至所述客戶端,其中,所述唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC。 In order to solve the above-mentioned problems, the present invention also discloses a network load balancing control device, including: a back-end server unique path indication information acquisition module, which is used to obtain information from each back-end server The end server obtains the unique path indication information of the back-end server in the second type of network; the preset traffic scheduling rule sending module is used to indicate the preset traffic scheduling rule and the unique path of the back-end server The information is sent to the load balancing device, so that the load balancing device sends the back-end server access request of the client to the selection according to the preset traffic scheduling rule according to the unique path indication information of the back-end server And return the request response information returned by the back-end server to the client according to the unique path indication information of the client in the first type of network. The unique path indication information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located, at least one of the first type of network and the second type of network It is a virtual private network VPC.

可選地,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 Optionally, the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC.

可選地,還包括:發送指示模組,用於指示所述負載均衡設備將所述負載均衡設備的唯一路徑指示資訊發送至所述後端伺服器,以供所述後端伺服器按照所述負載均衡設備的唯一路徑指示資訊,返回請求響應資訊至所述負載均衡設備。 Optionally, it further includes: a sending instruction module for instructing the load balancing device to send the unique path instruction information of the load balancing device to the back-end server, so that the back-end server can follow The unique path indication information of the load balancing device returns request response information to the load balancing device.

可選地,還包括:網路標識資訊接收模組,用於接收所述客戶端在註冊時提交的所述客戶端所在的第一類網路的網路標識資訊; 網路標識資訊發送模組,用於將所述第一類網路的網路標識資訊發送至所述負載均衡設備,以供所述負載均衡設備保存並在接收到所述客戶端的後端伺服器訪問請求時,判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 Optionally, it further includes: a network identification information receiving module, configured to receive the network identification information of the first type of network where the client is located, submitted by the client during registration; The network identification information sending module is used to send the network identification information of the first type of network to the load balancing device for the load balancing device to save and receive the back-end server of the client In the case of a server access request, it is determined whether the network identification information of the first type of network obtained from the back-end server access request is within the range of the saved network identification information of the first type of network, if not, then Return the access denied information to the client.

為了解決上述問題,本發明還公開了一種網路交互裝置,包括:訪問請求發送模組,用於根據後端伺服器在第二類網路的唯一路徑指示資訊,將客戶端對後端伺服器的訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器,所述第二類網路為虛擬私有網路VPC;和/或,請求響應資訊返回模組,用於按照所述客戶端在第一類網路的唯一路徑指示資訊,將後端伺服器針對客戶端的訪問請求返回的請求響應資訊返回至所述客戶端,所述第一類網路為虛擬私有網路VPC;其中,所述唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在。 In order to solve the above-mentioned problems, the present invention also discloses a network interaction device, including: an access request sending module, which is used to connect the client to the back-end server according to the unique path indication information of the back-end server in the second type of network The access request of the server is sent to at least one back-end server selected according to the preset traffic scheduling rule, the second type of network is a virtual private network VPC; and/or the request response information return module, It is used to return the request response information returned by the back-end server for the client's access request to the client according to the unique path indication information of the client in the first type of network, and the first type of network is a virtual Private network VPC; wherein the unique path indication information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located.

根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊,將訪問請求發送至後端伺服器,負載均衡器通過利用客戶端發送的後端伺服器訪問請求獲取客戶端的唯一路徑指示資訊,將後端伺服器返回請求響應資訊轉發至客戶端。由於客戶端和後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及 各後端伺服器所處的第二類網路中唯一存在,因此,在第一類網路和第二類網路中至少一個為虛擬私有網路VPC時,可以不需要網關對客戶端和後端伺服器的地址轉換處理,從而避免了網關進行地址轉換處理造成的訪問時延,提升了客戶端對後端伺服器的訪問效率和後端伺服器的請求響應資訊的返回效率,同時也節省了網關的處理資源。而且,因為無需對客戶端和後端伺服器的地址進行轉換處理,節省了客戶端和後端伺服器對非VPC的IP地址的消耗。 According to the embodiment of the present invention, the load balancer sends the access request to the back-end server by using the unique path indication information of the back-end server issued by the control device, and the load balancer accesses the back-end server by using the back-end server sent by the client. Request to obtain the unique path indication information of the client, and forward the request response information returned by the back-end server to the client. Since the unique path between the client and the back-end server indicates that the information is in the first type of network where the client is located and Each back-end server only exists in the second type of network. Therefore, when at least one of the first type of network and the second type of network is a virtual private network VPC, there is no need for a gateway to connect the client and The address translation processing of the back-end server avoids the access delay caused by the gateway's address translation processing, and improves the client's access efficiency to the back-end server and the return efficiency of the back-end server's request response information. Save the processing resources of the gateway. Moreover, since there is no need to convert the addresses of the client and the back-end server, the consumption of non-VPC IP addresses by the client and the back-end server is saved.

另外,本發明實施例不需要經過網關進行轉換處理,負載均衡器可以獲取到客戶端真實的網路地址,從而可以精確地對客戶端進行訪問控制。 In addition, the embodiment of the present invention does not need to go through the gateway for conversion processing, and the load balancer can obtain the real network address of the client, so that the client can be accurately controlled.

501‧‧‧預設流量調度規則接收模組 501‧‧‧Receiving module for preset traffic scheduling rules

502‧‧‧資訊獲取模組 502‧‧‧Information Acquisition Module

503‧‧‧後端伺服器訪問請求發送模組 503‧‧‧Back-end server access request sending module

504‧‧‧請求響應資訊返回模組 504‧‧‧Request response information return module

601‧‧‧網路標識資訊接收模組 601‧‧‧Network identification information receiving module

602‧‧‧預設流量調度規則接收模組 602‧‧‧Receiving module for preset traffic scheduling rules

603‧‧‧後端伺服器訪問模組 603‧‧‧Back-end server access module

604‧‧‧運行狀態檢查模組 604‧‧‧Operation status check module

605‧‧‧網路類型識別模組 605‧‧‧Network Type Identification Module

606‧‧‧資訊獲取模組 606‧‧‧Information Acquisition Module

607‧‧‧網路標識資訊判斷模組 607‧‧‧Network Identification Information Judgment Module

608‧‧‧後端伺服器訪問請求發送模組 608‧‧‧Back-end server access request sending module

609‧‧‧請求響應資訊返回模組 609‧‧‧Request response information return module

701‧‧‧後端伺服器唯一路徑指示資訊獲取模組 701‧‧‧Back-end server unique path indication information acquisition module

702‧‧‧預設流量調度規則發送模組 702‧‧‧Pre-set flow scheduling rule sending module

801‧‧‧訪問請求發送模組 801‧‧‧Access request sending module

802‧‧‧請求響應資訊返回模組 802‧‧‧Request response information return module

Client‧‧‧客戶端 Client‧‧‧Client

LB‧‧‧負載均衡器 LB‧‧‧Load Balancer

RS1‧‧‧後端伺服器 RS1‧‧‧Backend server

RS2‧‧‧後端伺服器 RS2‧‧‧Back-end server

RS3‧‧‧後端伺服器 RS3‧‧‧Back-end server

RS4‧‧‧後端伺服器 RS4‧‧‧Back-end server

圖1是本發明的一種網路的負載均衡方法實施例1的步驟流程圖;圖2是本發明的一種網路的負載均衡方法實施例2的步驟流程圖;圖3是本發明的一種網路的負載均衡控制方法實施例的步驟流程圖;圖4是本發明的一種網路交互方法實施例的步驟流程圖;圖5是本發明的一種網路的負載均衡裝置實施例1的結構框圖; 圖6是本發明的一種網路的負載均衡裝置實施例2的結構框圖;圖7是本發明的一種網路的負載均衡控制裝置實施例的結構框圖;圖8是本發明的一種網路交互裝置實施例的結構框圖;圖9是目前的一種負載均衡器的工作原理示意圖;圖10是目前的一種利用網關進行負載均衡的工作原理示意圖;圖11是本發明的一種負載均衡方法的應用場景一的示意圖;圖12是本發明的一種負載均衡方法的應用場景二的示意圖;圖13是本發明的一種負載均衡方法的應用場景三的示意圖;圖14是本發明實施例的負載均衡處理流程圖;圖15是本發明實施例的負載均衡系統結構圖;圖16是本發明實施例的利用VSOCK模組輔助健康檢查的流程示意圖; Figure 1 is a flow chart of the steps of Embodiment 1 of a network load balancing method of the present invention; Figure 2 is a flow chart of the steps of Embodiment 2 of a network load balancing method of the present invention; Figure 3 is a network of the present invention Fig. 4 is a step flowchart of an embodiment of a network interaction method of the present invention; Fig. 5 is a structural frame of embodiment 1 of a network load balancing device of the present invention picture; Fig. 6 is a structural block diagram of Embodiment 2 of a network load balancing device of the present invention; Fig. 7 is a structural block diagram of an embodiment of a network load balancing control device of the present invention; Fig. 8 is a network of the present invention Fig. 9 is a schematic diagram of the working principle of a current load balancer; Fig. 10 is a schematic diagram of a current working principle of load balancing using a gateway; Fig. 11 is a load balancing method of the present invention Figure 12 is a schematic diagram of application scenario two of a load balancing method of the present invention; Figure 13 is a schematic diagram of application scenario three of a load balancing method of the present invention; Figure 14 is a schematic diagram of application scenario three of a load balancing method of the present invention; Balance processing flow chart; FIG. 15 is a structural diagram of a load balancing system according to an embodiment of the present invention; FIG. 16 is a schematic diagram of a process of assisting a health check by using a VSOCK module according to an embodiment of the present invention;

為使本發明的上述目的、特徵和優點能夠更加明顯易懂,下面結合附圖和具體實施方式對本發明作進一步詳細的說明。 In order to make the above objectives, features and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

參照圖1,示出了本發明的一種網路的負載均衡方法實施例1的步驟流程圖,具體可以包括如下步驟: Referring to Fig. 1, there is shown a step flow chart of Embodiment 1 of a network load balancing method of the present invention, which may specifically include the following steps:

步驟101,接收控制設備發送的預設流量調度規則,以及後端伺服器在第二類網路的唯一路徑指示資訊。 Step 101: Receive preset traffic scheduling rules sent by the control device and unique path indication information of the back-end server in the second type of network.

需要說明的是,網路可以有多種類型,如常見的IP網路的廣域網和虛擬私有網路VPC。IP網路是利用IP(Internet Protocol)通訊協議互連多個計算機終端、客戶端、服務端的網路,可以理解為一個公共網路。其中,每個在IP網路中的終端都具有專有的IP地址,基於IP地址識別和區分不同的終端,以便於資訊的準確傳遞。相對於公共的IP網路,虛擬私有網路VPC使用加密協議、隧道協議和其他安全程序,在公共的IP網路中形成出一個私有和獨立的虛擬網路環境,VPC用戶可以在虛擬私有網路VPC中自定義其中的各個終端的IP地址範圍。 It should be noted that there can be many types of networks, such as common IP network wide area network and virtual private network VPC. IP network is a network that uses IP (Internet Protocol) communication protocol to interconnect multiple computer terminals, clients, and servers. It can be understood as a public network. Among them, each terminal in the IP network has a dedicated IP address, and different terminals are identified and distinguished based on the IP address to facilitate the accurate transmission of information. Compared with the public IP network, the virtual private network VPC uses encryption protocols, tunneling protocols and other security procedures to form a private and independent virtual network environment in the public IP network. VPC users can access the virtual private network. Customize the IP address range of each terminal in the VPC.

本發明實施例中,上述的第二類網路可以為廣域網,也可以為虛擬私有網路VPC。即後端伺服器可能處於廣域網中,也可能處於虛擬私有網路VPC中。 In the embodiment of the present invention, the above-mentioned second type of network may be a wide area network or a virtual private network VPC. That is, the back-end server may be in a wide area network, or it may be in a virtual private network VPC.

上述的後端伺服器的唯一路徑指示資訊可以唯一對應於某一後端伺服器,按照唯一路徑指示資訊可以與其對應的後端伺服器進行通訊。 The above-mentioned unique path indication information of the back-end server can uniquely correspond to a certain back-end server, and communication with the corresponding back-end server can be carried out according to the unique path indication information.

在具體的實現中,可以由控制設備可以向負載均衡器發送預設流量調度規則和多個後端伺服器的唯一路徑指示資訊。負載均衡器接收預設流量調度規則和後端伺服器的唯一路徑指示資訊,以便於後續的流量調度處理。此外, 控制設備也可以向客戶端發送負載均衡器的唯一路徑指示資訊。 In a specific implementation, the control device can send preset traffic scheduling rules and unique path indication information of multiple back-end servers to the load balancer. The load balancer receives preset traffic scheduling rules and unique path indication information of the back-end server to facilitate subsequent traffic scheduling processing. also, The control device can also send the unique path indication information of the load balancer to the client.

流量調度規則可以有多種,例如WRR(Weighted Round Robin,加權循環調度算法)、RR(Round-Robin,輪詢調度算法)、WLC(Weighted Least-Connection Scheduling,加權最小連接調度算法)等,本領域技術人員可以根據需要採用各種流量調度規則,本發明實施例對此不作限制。 There are multiple traffic scheduling rules, such as WRR (Weighted Round Robin), RR (Round-Robin, round-robin scheduling algorithm), WLC (Weighted Least-Connection Scheduling, weighted least connection scheduling algorithm), etc. Technical personnel can adopt various traffic scheduling rules as needed, which is not limited in the embodiment of the present invention.

步驟102,從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊。 Step 102: Obtain the unique path indication information of the client in the first type of network from the back-end server access request sent by the client.

本發明實施例中,上述的第一類網路可以為廣域網,也可以為虛擬私有網路VPC。即客戶端可能處於廣域網中,也可能處於虛擬私有網路VPC中。上述的客戶端的唯一路徑指示資訊可以唯一對應於某一客戶端,按照唯一路徑指示資訊可以與其對應的客戶端進行通訊。 In the embodiment of the present invention, the above-mentioned first type of network may be a wide area network or a virtual private network VPC. That is, the client may be in the wide area network or in the virtual private network VPC. The above-mentioned unique path indication information of the client can uniquely correspond to a certain client, and it can communicate with the corresponding client according to the unique path indication information.

在具體的實現中,客戶端可以通過向後端伺服器發送後端伺服器訪問請求,以獲取相應的服務。在將後端伺服器訪問請求發送至實際處理的後端伺服器之前,可以由負載均衡器接收該訪問請求,以便進一步將該訪問請求調度至適合的後端伺服器。從客戶端發送的後端伺服器訪問請求中,可以獲取客戶端的唯一路徑指示資訊,並記錄學習該唯一路徑指示資訊,用於在將請求響應資訊返回至客戶端時指示客戶端的地址。 In a specific implementation, the client can obtain the corresponding service by sending a back-end server access request to the back-end server. Before sending the back-end server access request to the actual processed back-end server, the load balancer may receive the access request, so as to further dispatch the access request to a suitable back-end server. From the back-end server access request sent by the client, the unique path indication information of the client can be obtained, and the unique path indication information can be recorded and learned to indicate the address of the client when the request response information is returned to the client.

需要說明的是,所述步驟102也可以在所述步驟101 之前執行。即,可以先從後端伺服器訪問請求中獲取客戶端的唯一路徑指示資訊,再接收預設流量調度規則以及多個後端伺服器的唯一路徑指示資訊。在實際的應用中,當負載均衡器接收客戶端發送的後端伺服器訪問請求時,表明已經與客戶端初始建立連接,此時可以將客戶端的唯一路徑指示資訊記錄並學習,以便在接收到後端伺服器相應返回的請求響應資訊後,使用該唯一路徑指示資訊,將請求響應資訊原路返回至客戶端。 It should be noted that the step 102 can also be performed in the step 101 Executed before. That is, the unique path indication information of the client can be obtained from the back-end server access request first, and then the preset traffic scheduling rules and the unique path indication information of multiple back-end servers can be received. In actual applications, when the load balancer receives the back-end server access request sent by the client, it indicates that it has initially established a connection with the client. At this time, the client's unique path indication information can be recorded and learned so that it can be received After the request response information is returned by the back-end server, the unique path indication information is used to return the request response information to the client.

步驟103,根據所述後端伺服器的唯一路徑指示資訊,將所述後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器。 Step 103: According to the unique path indication information of the back-end server, send the back-end server access request to at least one back-end server selected according to the preset traffic scheduling rule.

可以利用預設流量調度規則計算各個後端伺服器的負載情況,並相應選擇出可供調度的後端伺服器,根據選擇出的後端伺服器的唯一路徑指示資訊,相應地將後端伺服器訪問請求轉發至該後端伺服器,由後端伺服器處理並響應來自客戶端的訪問請求,並相應返回請求響應資訊至負載均衡器。 The preset traffic scheduling rules can be used to calculate the load conditions of each back-end server, and the back-end servers available for scheduling can be selected accordingly. According to the unique path indication information of the selected back-end servers, the back-end servers can be selected accordingly. The server access request is forwarded to the back-end server, and the back-end server processes and responds to the access request from the client, and returns the request response information to the load balancer accordingly.

步驟104,接收所述後端伺服器返回的請求響應資訊,並按照所述客戶端的唯一路徑指示資訊,將所述請求響應資訊返回至所述客戶端,其中,所述唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC。 Step 104: Receive the request response information returned by the back-end server, and return the request response information to the client according to the unique path indication information of the client, where the unique path indication information is in the client The first type of network where the end is located and the second type of network where each back-end server is located, and at least one of the first type of network and the second type of network is a virtual private network VPC .

當接收到後端伺服器響應於訪問請求的請求響應資 訊,可以將該請求響應資訊按照此前記錄的客戶端的唯一路徑指示資訊,相應返回至客戶端。 When receiving the request response data from the back-end server in response to the access request Information, the request response information can be returned to the client according to the previously recorded unique path indication information of the client.

由於唯一路徑指示資訊在第一類網路以及第二類網路中唯一存在,在步驟103中,根據後端伺服器的唯一路徑指示資訊的指示,可以將請求響應資訊發送到唯一對應的後端伺服器,在步驟104中,可以根據客戶端的唯一路徑指示資訊的指示,可以將請求響應資訊發送到唯一對應的客戶端。 Since the unique path indication information only exists in the first type of network and the second type of network, in step 103, according to the indication of the unique path indication information of the back-end server, the request response information can be sent to the only corresponding post The end server, in step 104, can send the request response information to the only corresponding client according to the instructions of the client's unique path indication information.

因此,在第一類網路和第二類網路中至少一個為虛擬私有網路VPC時,可以不需要網關對客戶端和後端伺服器的地址轉換處理,從而避免了網關進行地址轉換處理造成的訪問時延,提升了客戶端對後端伺服器的訪問效率和後端伺服器的請求響應資訊的返回效率,同時也節省了網關的處理資源。而且,因為無需對客戶端和後端伺服器的地址進行轉換處理,節省了客戶端和後端伺服器對非VPC的IP地址的消耗。 Therefore, when at least one of the first type of network and the second type of network is a virtual private network VPC, there is no need for the gateway to perform address translation processing on the client and back-end server, thereby avoiding the gateway from performing address translation processing The resulting access delay improves the client's access efficiency to the back-end server and the return efficiency of the back-end server's request and response information, and at the same time saves the processing resources of the gateway. Moreover, since there is no need to convert the addresses of the client and the back-end server, the consumption of non-VPC IP addresses by the client and the back-end server is saved.

另外,本發明實施例不需要經過網關進行轉換處理,負載均衡器可以獲取到客戶端真實的網路地址,從而可以精確地對客戶端進行訪問控制。 In addition, the embodiment of the present invention does not need to go through the gateway for conversion processing, and the load balancer can obtain the real network address of the client, so that the client can be accurately controlled.

本發明實施例可以適用於客戶端所處的第一類網路和後端伺服器所處的第二類網路中,至少一個網路為虛擬私有網路VPC的應用場景,具體而言,可以有如下幾種情況: The embodiment of the present invention can be applied to the application scenario where at least one network is a virtual private network VPC in the first type of network where the client is located and the second type of network where the back-end server is located. Specifically, There can be the following situations:

當客戶端所處的第一類網路為廣域網時,若調度的後 端伺服器僅有一個,該後端伺服器所處的第二類網路為虛擬私有網路VPC。若調度的後端伺服器有多個,則多個後端伺服器可以是全部處於虛擬私有網路VPC,或是至少一個後端伺服器處於虛擬私有網路VPC而其餘後端伺服器處於廣域網。針對多個後端伺服器處於虛擬私有網路VPC的情況,可以是均處於相同的虛擬私有網路VPC,或是全部處於不同的虛擬私有網路VPC,或是部分處於相同的虛擬私有網路VPC。 When the first type of network where the client is located is a wide area network, if the There is only one end server, and the second type of network where the back-end server is located is a virtual private network VPC. If there are multiple back-end servers scheduled, the multiple back-end servers can be all in a virtual private network VPC, or at least one back-end server is in a virtual private network VPC and the rest of the back-end servers are in a WAN . For multiple back-end servers in a virtual private network VPC, they can all be in the same virtual private network VPC, or all are in different virtual private network VPCs, or some of them are in the same virtual private network VPC.

當客戶端所處的第一類網路為虛擬私有網路VPC時,若調度的後端伺服器僅有一個,該後端伺服器所處的第二類網路為虛擬私有網路VPC或廣域網。若調度的後端伺服器有多個,則多個後端伺服器可以是全部處於虛擬私有網路VPC,或是全部處於廣域網,或是部分處於廣域網,部分處於虛擬私有網路VPC。針對多個後端伺服器處於虛擬私有網路VPC的情況,可以是均處於相同的虛擬私有網路VPC,或是全部處於不同的虛擬私有網路VPC,或是部分處於相同的虛擬私有網路VPC。 When the first type of network where the client is located is a virtual private network VPC, if only one back-end server is scheduled, the second type of network where the back-end server is located is a virtual private network VPC or Wan. If there are multiple back-end servers scheduled, the multiple back-end servers can be all in a virtual private network VPC, or all in a wide area network, or part in a wide area network, and part in a virtual private network VPC. For multiple back-end servers in a virtual private network VPC, they can all be in the same virtual private network VPC, or all are in different virtual private network VPCs, or some of them are in the same virtual private network VPC.

從上述可見,本發明實施例所適用的應用場景中,第一類網路為虛擬私有網路VPC時,第二類網路可以為廣域網,也可以為虛擬私有網路VPC,即第一類網路與第二類網路可以為同構也可以為異構;當第一類網路為廣域網時,第二類網路可以為虛擬私有網路VPC,即第一類網路與第二類網路為異構。 It can be seen from the above that in the application scenario to which the embodiments of the present invention are applicable, when the first type of network is a virtual private network VPC, the second type of network can be a wide area network or a virtual private network VPC, that is, the first type The network and the second type of network can be homogeneous or heterogeneous; when the first type of network is a wide area network, the second type of network can be a virtual private network VPC, that is, the first type of network and the second type of network The class network is heterogeneous.

作為本發明實施例的較佳示例,所述唯一路徑指示資 訊可以由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 As a preferred example of the embodiment of the present invention, the unique path indication resource The information can be generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC.

具體的實現中,可以從後端伺服器訪問請求中獲取客戶端所處的第一類網路的網路標識資訊,以及客戶端在所處的第一類網路中的地址標識資訊,相應產生客戶端的唯一路徑指示資訊。 In a specific implementation, the network identification information of the first type of network where the client is located, and the address identification information of the client in the first type of network where the client is located can be obtained from the back-end server access request. Generate unique path indication information for the client.

實際應用中,針對基於VXLAN構建的虛擬私有網路VPC中的客戶端,其發送的訪問請求可以為封裝了的VXLAN報文,在接收到VXLAN報文後,可以對該VXLAN報文進行解封處理,從中獲取客戶端所在的虛擬私有網路VPC的網路標識資訊VNI,以及客戶端在該虛擬私有網路VPC中的作為VTEP目的地地址的IP地址資訊,以此產生客戶端的唯一路徑指示資訊。 In actual application, for the client in the VPC based on the VXLAN virtual private network, the access request sent can be an encapsulated VXLAN message. After receiving the VXLAN message, the VXLAN message can be decapsulated Process, obtain the network identification information VNI of the virtual private network VPC where the client is located, and the IP address information of the client as the VTEP destination address in the virtual private network VPC, thereby generating a unique path indication for the client Information.

需要說明的是,VXLAN是一種常用的構建虛擬私有網路VPC的技術,其使用MAC in UDP的方法,通過VXLAN報文訪問伺服器,並利用VTEP(VXLAN Tunnel End Point,VXLAN隧道終端節點)封裝和解封VXLAN報文。VXLAN報文中包含有VNI(VXLAN Network Identifier,VXLAN網路標識)資訊,該虛擬私有網路VPC中的作為VTEP目的地址的IP地址資訊和報文內層資訊。VNI資訊為客戶端所在的虛擬私有網路VPC的網路標識資訊,報文內層資訊包含有客戶端在所在的虛擬私有網路VPC中的IP地址,以及端口資訊。因此,在發送的後端伺服器訪問請求中,可以包含有客戶端所在的網路 的網路標識資訊,以及在第一類網路中的地址標識資訊,負載均衡器可以獲取該網路標識資訊和地址標識資訊,並產生一個客戶端的唯一路徑指示資訊。例如,利用VXLAN報文產生的後端伺服器訪問請求中,包含有客戶端所在的虛擬私有網路VPC的網路標識資訊VNI79,以及在該虛擬私有網路VPC的地址標識資訊192.168.0.1,可以相應產生客戶端的唯一路徑指示資訊VNI79/192.168.0.1。 It should be noted that VXLAN is a commonly used technology to construct a virtual private network VPC. It uses the MAC in UDP method to access the server through VXLAN packets and uses VTEP (VXLAN Tunnel End Point, VXLAN tunnel terminal node) encapsulation Reconcile and unseal the VXLAN packet. The VXLAN message contains VNI (VXLAN Network Identifier, VXLAN network identifier) information, the IP address information used as the VTEP destination address in the virtual private network VPC, and the inner layer information of the message. The VNI information is the network identification information of the virtual private network VPC where the client is located. The inner layer information of the message includes the IP address and port information of the client in the virtual private network VPC where the client is located. Therefore, in the back-end server access request sent, the network where the client is located can be included The network identification information and the address identification information in the first type of network, the load balancer can obtain the network identification information and address identification information, and generate a unique path indication information for the client. For example, the back-end server access request generated by the VXLAN message contains the network identification information VNI79 of the virtual private network VPC where the client is located, and the address identification information 192.168.0.1 of the virtual private network VPC. The unique path indication information VNI79/192.168.0.1 of the client can be generated accordingly.

需要進一步說明的是,除了VXLAN構建虛擬私有網路VPC,還可以將本發明實施例的技術方案,應用於基於GRE(Generic Routing Encapsulation,通用路由封裝協議)構建的虛擬私有網路VPC。GRE採用了Tunnel(隧道)技術,可以對某些網路層協議的資料報進行封裝,使這些被封裝的資料報能夠在IPv4網路中傳輸。 It should be further explained that, in addition to VXLAN constructing a virtual private network VPC, the technical solution of the embodiment of the present invention can also be applied to a virtual private network VPC constructed based on GRE (Generic Routing Encapsulation, Generic Routing Encapsulation). GRE uses the Tunnel (tunnel) technology, which can encapsulate the datagrams of certain network layer protocols, so that these encapsulated datagrams can be transmitted in the IPv4 network.

針對基於VXLAN構建的虛擬私有網路VPC中的後端伺服器,可以將包含網路標識資訊VNI和地址資訊的VXLAN報文發送給控制設備,由控制設備產生後端伺服器的唯一路徑指示資訊並下發給負載均衡器,負載均衡器根據後端伺服器的唯一路徑指示資訊併發送給後端伺服器。或者,後端伺服器根據自身的網路標識資訊VNI和地址資訊產生唯一路徑指示資訊,封裝在VXLAN報文中經由控制設備下發給負載均衡器。 For the back-end server in the virtual private network VPC constructed based on VXLAN, the VXLAN message containing the network identification information VNI and address information can be sent to the control device, and the control device generates the unique path indication information of the back-end server And send it to the load balancer, and the load balancer sends it to the back-end server according to the unique path indication information of the back-end server. Or, the back-end server generates unique path indication information based on its own network identification information VNI and address information, encapsulates it in a VXLAN message, and sends it to the load balancer through the control device.

參照圖2,示出了本發明的一種網路的負載均衡方法實施例2的步驟流程圖,具體可以包括如下步驟: Referring to Fig. 2, there is shown a step flow chart of Embodiment 2 of a network load balancing method of the present invention, which may specifically include the following steps:

步驟201,接收並保存多個客戶端向所述控制設備註冊時提交的所述客戶端所處的第一類網路的網路標識資訊。 Step 201: Receive and save the network identification information of the first type of network where the client is located, which is submitted when a plurality of clients register with the control device.

在實際的應用中,客戶端可以向控制設備進行註冊,在註冊時可以提交客戶端所在的第一類網路的網路標識資訊。控制設備可以將註冊時接收到的第一類網路的網路標識資訊發送給負載均衡器。 In actual applications, the client can register with the control device, and the network identification information of the first type of network where the client is located can be submitted during registration. The control device can send the network identification information of the first type of network received during registration to the load balancer.

步驟202,接收控制設備發送的預設流量調度規則,以及後端伺服器在第二類網路的唯一路徑指示資訊,其中,所述唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC。 Step 202: Receive the preset traffic scheduling rule sent by the control device and the unique path indication information of the back-end server in the second type of network, wherein the unique path indication information is in the first type of the client. The network and each back-end server are uniquely located in the second type of network, and at least one of the first type of network and the second type of network is a virtual private network VPC.

步驟203,按照多個後端應用伺服器的唯一路徑指示資訊,相應訪問多個後端伺服器。 Step 203: According to the unique path instruction information of the multiple back-end application servers, correspondingly access the multiple back-end servers.

步驟204,對訪問的後端伺服器進行運行狀態檢查,針對狀態異常的後端伺服器,在對應的唯一路徑指示資訊上標記異常標識;所述異常標識用於指示暫停發送所述後端伺服器訪問請求至後端伺服器。 Step 204: Check the running status of the accessed back-end server, and mark the abnormal identifier on the corresponding unique path indication information for the back-end server with abnormal status; the abnormal identifier is used to indicate the suspension of sending the back-end server Server access request to the back-end server.

需要說明的是,負載均衡器通常在進行流量調度處理之前,先對後端伺服器進行運行狀態檢查,對於運行狀態異常的伺服器,則不向其調度流量。運行狀態異常可以有多種,例如伺服器響應慢、伺服器上的應用無法正常工作、伺服器上的應用程序關聯出錯等。 It should be noted that the load balancer usually checks the running status of the back-end server before performing traffic scheduling processing, and does not schedule traffic to servers with abnormal running status. There can be many kinds of abnormal operation status, such as slow response of the server, failure of the application on the server, and error in the association of the application on the server.

在本發明之前的現有技術中,針對於虛擬私有網路VPC內的後端伺服器進行檢查時,由於後端伺服器的地址僅僅在其域內唯一,負載均衡器無法直接訪問虛擬私有網路VPC內的後端伺服器,因此也需要通過網關與後端伺服器進行資訊交互。 In the prior art prior to the present invention, when checking the back-end server in the virtual private network VPC, since the address of the back-end server is only unique within its domain, the load balancer cannot directly access the virtual private network The back-end server in the VPC also needs to interact with the back-end server through the gateway.

在具體的實現中,負載均衡器可以在進行流量調度處理之前,按照後端應用伺服器的唯一路徑指示資訊,相應訪問各個後端伺服器並進行運行狀態的檢查。對於狀態異常的伺服器,可以在其對應的唯一路徑指示資訊上標記一個異常標識,在進行流量調度時,對於攜帶有異常標識的伺服器,則暫停向其發送訪問請求,以保證由運作正常的伺服器承擔該訪問即提供服務。由此,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊訪問後端伺服器,由於後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,無需網關的參與即可實現對後端伺服器運行狀態的檢查處理。 In a specific implementation, the load balancer can access each back-end server and check its running status according to the unique path indication information of the back-end application server before performing traffic scheduling processing. For servers with abnormal status, an abnormal identifier can be marked on the corresponding unique path indication information. During traffic scheduling, for servers with abnormal identifiers, the access request will be suspended to ensure normal operation. The server of which assumes the access is to provide services. Therefore, the load balancer accesses the back-end server by using the unique path indication information of the back-end server issued by the control device, because the unique path indication information of the back-end server is in the first type of network where the client is located and The only existence in the second type of network where each back-end server is located, therefore, the operation status of the back-end server can be checked and processed without the participation of the gateway.

在實際的應用中,可以在負載均衡器中設置一個運行狀態檢查輔助模組,該模組可以設置在系統底層,當負載均衡器通過運行狀態檢查程序創建與後端伺服器的連接時,通過系統調用保存有的後端伺服器的唯一路徑指示資訊,模組根據後端伺服器的唯一路徑指示資訊封裝一個VXLAN報文,並發送至相應的後端伺服器。 In actual applications, you can set up a running status check auxiliary module in the load balancer. This module can be set at the bottom of the system. When the load balancer creates a connection with the back-end server through the running status check program, pass The system calls the stored unique path indication information of the back-end server, and the module encapsulates a VXLAN message based on the unique path indication information of the back-end server and sends it to the corresponding back-end server.

步驟205,識別客戶端所處的第一類網路的網路類 型。 Step 205: Identify the network type of the first type of network where the client is located type.

因為在實際的應用中,客戶端可能處於基於VXLAN構建的虛擬私有網路VPC或者傳統的廣域網,不同的網路採用不同的網路協議,負載均衡器可以根據不同的網路協議的特點,採用適於該類型網路的資料包結構。 Because in actual applications, the client may be in a virtual private network VPC or a traditional wide area network based on VXLAN. Different networks use different network protocols. The load balancer can use different network protocols according to the characteristics of different network protocols. Data packet structure suitable for this type of network.

步驟206,針對所述第一類網路的網路類型,從所述後端伺服器訪問請求中解封出所述第一類網路的網路標識資訊和所述客戶端的地址標識資訊,並產生所述客戶端的唯一路徑指示資訊。 Step 206: For the network type of the first type of network, unblock the network identification information of the first type of network and the address identification information of the client from the back-end server access request. And generate unique path indication information of the client.

針對於處於第一類網路中的客戶端發起的後端伺服器訪問請求,可以根據第一類網路的網路類型的特點,從訪問請求中解封出第一類網路的網路標識資訊和客戶端的地址標識資訊,並相應產生客戶端的唯一路徑指示資訊。 For the back-end server access request initiated by the client in the first type of network, the network of the first type of network can be unblocked from the access request according to the characteristics of the network type of the first type of network The identification information and the client's address identification information, and correspondingly generate the client's unique path indication information.

在實際的應用中,當負載均衡器接收客戶端發送的後端伺服器訪問請求時,表明已經與客戶端初始建立連接,此時可以將客戶端的唯一路徑指示資訊記錄並學習,後續處理中可以使用該唯一路徑指示資訊,將請求響應資訊原路返回至客戶端。 In actual applications, when the load balancer receives the back-end server access request sent by the client, it indicates that it has initially established a connection with the client. At this time, the client's unique path indication information can be recorded and learned. The subsequent processing can be Use the unique path indication information to return the original path of the request response information to the client.

步驟207,判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端;若是,則執行步驟208。 Step 207: Determine whether the network identification information of the first type of network obtained from the back-end server access request is within the range of the stored network identification information of the first type of network, if not, return a rejection Access information to the client; if yes, go to step 208.

在具體的實現中,還可以在預先保存有的網路標識資訊中,查找是否存在有對應的從訪問請求中解封的網路標 識資訊。若查找不到有該網路標識資訊,表明該客戶端或該客戶端所在的網路還未在控制設備上註冊,可以相應返回拒絕訪問資訊至客戶端。若查找有該網路標識資訊,則可以繼續執行下一步的流量調度處理。 In a specific implementation, you can also find out whether there is a corresponding network logo unblocked from the access request in the pre-stored network identification information. Cognition information. If the network identification information cannot be found, it indicates that the client or the network where the client is located has not been registered on the control device, and the access denied information can be returned to the client accordingly. If you find the network identification information, you can continue to perform the next step of traffic scheduling processing.

步驟208,根據所述後端伺服器的唯一路徑指示資訊,將所述後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器。 Step 208: According to the unique path indication information of the back-end server, send the back-end server access request to at least one back-end server selected according to the preset traffic scheduling rule.

可以利用預設流量調度規則計算各個後端伺服器的負載情況,並相應選擇出可供調度的後端伺服器,根據選擇出的後端伺服器的唯一路徑指示資訊,相應地將後端伺服器訪問請求轉發至該後端伺服器,由後端伺服器處理並響應來自客戶端的訪問請求,並相應返回請求響應資訊至負載均衡器。 The preset traffic scheduling rules can be used to calculate the load conditions of each back-end server, and the back-end servers available for scheduling can be selected accordingly. According to the unique path indication information of the selected back-end servers, the back-end servers can be selected accordingly. The server access request is forwarded to the back-end server, and the back-end server processes and responds to the access request from the client, and returns the request response information to the load balancer accordingly.

步驟209,接收所述後端伺服器返回的請求響應資訊,並按照所述客戶端的唯一路徑指示資訊,針對所述第一類網路的網路類型,封裝所述請求響應資訊並發送至所述客戶端。 Step 209: Receive the request response information returned by the back-end server, and according to the unique path indication information of the client, encapsulate the request response information for the network type of the first type of network and send it to all The client.

接收到後端伺服器響應於訪問請求的請求響應資訊,可以將該請求響應資訊根據之前確定的第一類網路的網路類型進行封裝處理,並按照記錄的客戶端的唯一路徑指示資訊,相應返回至客戶端。 After receiving the request response information from the back-end server in response to the access request, the request response information can be encapsulated according to the previously determined network type of the first type of network, and according to the recorded unique path indication information of the client, corresponding Return to the client.

實際應用中,為了使得後端伺服器可以準確地返回請求響應資訊至負載均衡器,可以在後端伺服器部署一個VTEP自動學習模組,用於學習記錄負載均衡器的VTEP 地址資訊。當然,後端伺服器也可以從控制設備獲取一個預設的返回請求響應資訊規則,以便於準確地返回請求響應資訊至負載均衡器。 In practical applications, in order to enable the back-end server to accurately return request response information to the load balancer, a VTEP automatic learning module can be deployed on the back-end server to learn and record the VTEP of the load balancer Address information. Of course, the back-end server may also obtain a preset return request response information rule from the control device, so as to accurately return the request response information to the load balancer.

根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊,將訪問請求發送至後端伺服器,負載均衡器通過利用客戶端發送的後端伺服器訪問請求獲取客戶端的唯一路徑指示資訊,將後端伺服器返回請求響應資訊轉發至客戶端。由於客戶端和後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,在第一類網路和第二類網路中至少一個為虛擬私有網路VPC時,可以不需要網關對客戶端和後端伺服器的地址轉換處理,從而避免了網關進行地址轉換處理造成的訪問時延,提升了客戶端對後端伺服器的訪問效率和後端伺服器的請求響應資訊的返回效率,同時也節省了網關的處理資源。而且,因為無需對客戶端和後端伺服器的地址進行轉換處理,節省了客戶端和後端伺服器對非VPC的IP地址的消耗。 According to the embodiment of the present invention, the load balancer sends the access request to the back-end server by using the unique path indication information of the back-end server issued by the control device, and the load balancer accesses the back-end server by using the back-end server sent by the client. Request to obtain the unique path indication information of the client, and forward the request response information returned by the back-end server to the client. Since the unique path indication information between the client and the back-end server only exists in the first type of network where the client is located and the second type of network where each back-end server is located, so in the first type of network When at least one of the second and second types of networks is a virtual private network VPC, the address translation processing of the client and the back-end server by the gateway is not required, thereby avoiding the access delay caused by the address translation processing of the gateway and increasing The client's access efficiency to the back-end server and the return efficiency of the back-end server's request response information also save the processing resources of the gateway. Moreover, since there is no need to convert the addresses of the client and the back-end server, the consumption of non-VPC IP addresses by the client and the back-end server is saved.

另外,本發明實施例不需要經過網關進行轉換處理,負載均衡器可以獲取到客戶端真實的網路地址,從而可以精確地對客戶端進行訪問控制。 In addition, the embodiment of the present invention does not need to go through the gateway for conversion processing, and the load balancer can obtain the real network address of the client, so that the client can be accurately controlled.

最後,根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊訪問後端伺服器,由於後端伺服器的唯一路徑指示資訊在客戶端所處的 第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,可以無須經由網關對後端伺服器的VPC地址進行轉換,而利用後端伺服器的唯一路徑指示資訊對後端伺服器進行運行狀態檢查,避免了網關進行地址轉換處理造成的時延,提升了運行狀態檢查的效率。 Finally, according to the embodiment of the present invention, the load balancer accesses the back-end server by using the unique path indicating information of the back-end server issued by the control device, because the unique path indicating information of the back-end server is in the location where the client is located. The first type of network and the second type of network where each back-end server is located is the only one. Therefore, the VPC address of the back-end server can be converted without the gateway, and the unique path indication of the back-end server can be used. Information checks the running status of the back-end server, avoiding the delay caused by the gateway's address translation processing, and improving the efficiency of running status checking.

參照圖3,示出了本發明的一種網路的負載均衡控制方法實施例的步驟流程圖,具體可以包括如下步驟: Referring to FIG. 3, there is shown a step flow chart of an embodiment of a network load balancing control method of the present invention, which may specifically include the following steps:

步驟301,從各後端伺服器獲取所述後端伺服器在第二類網路的唯一路徑指示資訊。 Step 301: Obtain unique path indication information of the back-end server in the second type of network from each back-end server.

控制設備可以從各個後端伺服器獲取後端伺服器的唯一路徑指示資訊,以用於指示資訊準確地發送至後端伺服器。 The control device can obtain the unique path indication information of the back-end server from each back-end server, so as to indicate that the information is accurately sent to the back-end server.

作為本發明實施例的較佳示例,所述唯一路徑指示資訊可以由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。具體地,控制設備可以從多個後端伺服器獲取後端伺服器分別所處的各個第二類網路的網路標識資訊,以及後端伺服器在所處的第二類網路中的地址標識資訊,相應產生各個後端伺服器的唯一路徑指示資訊。 As a preferred example of the embodiment of the present invention, the unique path indication information can be generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC. Specifically, the control device may obtain from multiple back-end servers the network identification information of each second-type network where the back-end servers are located, and the network identification information of the back-end servers in the second-type network where the back-end servers are located. Address identification information, correspondingly generate unique path instruction information for each back-end server.

步驟302,將預設流量調度規則和所述後端伺服器的唯一路徑指示資訊發送至負載均衡設備,以供所述負載均衡設備根據所述後端伺服器的唯一路徑指示資訊,將所述客戶端的後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器,以及按照所述客 戶端在第一類網路的唯一路徑指示資訊,將所述後端伺服器返回的請求響應資訊返回至所述客戶端,其中,所述唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC。 Step 302: Send the preset traffic scheduling rule and the unique path indication information of the back-end server to the load balancing device, so that the load balancing device can send the information according to the unique path indication information of the back-end server The client's back-end server access request is sent to at least one back-end server selected according to the preset traffic scheduling rule, and according to the client The unique path indicating information of the client in the first type of network returns the request response information returned by the back-end server to the client, wherein the unique path indicating information is in the first type of the client The network and each back-end server are uniquely located in the second type of network, and at least one of the first type of network and the second type of network is a virtual private network VPC.

控制設備將預設流量調度規則和多個後端伺服器的唯一路徑指示資訊,發送給負載均衡設備。負載均衡設備在接收到客戶端發起後端伺服器訪問請求時,可以從訪問請求中獲取到客戶端所處的第一類網路的唯一路徑指示資訊,並利用預設流量調度規則計算各個後端伺服器的負載情況,相應選擇出可供調度的後端伺服器,根據選擇出的後端伺服器的唯一路徑指示資訊,相應地將後端伺服器訪問請求轉發至該後端伺服器,由後端伺服器處理並響應來自客戶端的訪問請求,並相應返回請求響應資訊至負載均衡設備。 The control device sends the preset traffic scheduling rules and unique path indication information of multiple back-end servers to the load balancing device. When the load balancing device receives the client's request for access to the back-end server, it can obtain the unique path indication information of the first type of network where the client is located from the access request, and use the preset traffic scheduling rules to calculate each post According to the load situation of the end server, the back-end server that can be dispatched is selected accordingly, and the back-end server access request is forwarded to the back-end server according to the unique path indication information of the selected back-end server. The back-end server processes and responds to the access request from the client, and returns the request response information to the load balancing device accordingly.

負載均衡設備接收到後端伺服器響應於訪問請求的請求響應資訊後,可以根據客戶端的唯一路徑指示資訊,將請求響應資訊返回至客戶端。 After the load balancing device receives the request response information from the back-end server in response to the access request, it can return the request response information to the client according to the unique path indication information of the client.

需要說明的是,負載均衡設備可以為負載均衡器,也可以為任意的負責將客戶端發送的訪問請求調度至至少一個後端伺服器的設備。 It should be noted that the load balancing device may be a load balancer, or any device responsible for scheduling the access request sent by the client to at least one back-end server.

根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊,將訪問請求發送至後端伺服器,由於後端伺服器的唯一路徑指示資訊在客戶 端所處的第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,在第一類網路和第二類網路中至少一個為虛擬私有網路VPC時,可以不需要網關對後端伺服器的地址轉換處理,從而避免了網關進行地址轉換處理造成的訪問時延,提升了客戶端對後端伺服器的訪問效率,同時也節省了網關的處理資源。而且,因為無需對後端伺服器的地址進行轉換處理,節省了後端伺服器對非VPC的IP地址的消耗。 According to the embodiment of the present invention, the load balancer sends the access request to the back-end server by using the unique path indication information of the back-end server issued by the control device. Because the unique path indication information of the back-end server is in the client The only existence in the first type of network where the end is located and the second type of network where each back-end server is located. Therefore, at least one of the first type of network and the second type of network is a virtual private network VPC At this time, the address translation processing of the gateway to the back-end server is not required, thereby avoiding the access delay caused by the address translation processing of the gateway, improving the access efficiency of the client to the back-end server, and also saving the processing of the gateway. resource. Moreover, because there is no need to convert the address of the back-end server, it saves the back-end server's consumption of non-VPC IP addresses.

另外,本發明實施例不需要經過網關進行轉換處理,負載均衡器可以獲取到客戶端真實的網路地址,從而可以精確地對客戶端進行訪問控制。 In addition, the embodiment of the present invention does not need to go through the gateway for conversion processing, and the load balancer can obtain the real network address of the client, so that the client can be accurately controlled.

作為本發明實施例的較佳示例,所述方法可以還包括:指示所述負載均衡設備將所述負載均衡設備的唯一路徑指示資訊發送至所述後端伺服器,以供所述後端伺服器按照所述負載均衡設備的唯一路徑指示資訊,返回請求響應資訊至所述負載均衡設備。 As a preferred example of the embodiment of the present invention, the method may further include: instructing the load balancing device to send the unique path indication information of the load balancing device to the back-end server for the back-end server The device returns request response information to the load balancing device according to the unique path indication information of the load balancing device.

控制設備還可以指示負載均衡設備將其唯一路徑指示資訊發送給多個後端伺服器,以便於後端伺服器可以準確地向負載均衡設備返回請求響應資訊。 The control device may also instruct the load balancing device to send its unique path indication information to multiple back-end servers, so that the back-end server can accurately return request response information to the load balancing device.

作為本發明實施例的較佳示例,所述方法可以還包括:接收所述客戶端在註冊時提交的所述客戶端所在的第一類網路的網路標識資訊;將所述第一類網路的網路標識資訊發送至所述負載均衡設備,以供所述負載均衡設備保存並在接收到所述客戶端的後端伺服器訪問請求時,判斷 從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 As a preferred example of the embodiment of the present invention, the method may further include: receiving the network identification information of the first type of network where the client is located, submitted by the client during registration; The network identification information of the network is sent to the load balancing device for the load balancing device to save and determine when the client's back-end server access request is received Whether the network identification information of the first type of network obtained from the back-end server access request is within the range of the saved network identification information of the first type of network, if not, return the access denied information to all The client.

客戶端可以向控制設備進行註冊,在註冊時可以提交客戶端所在的第一類網路的網路標識資訊。控制設備可以將收集到的第一類網路的網路標識資訊發送給負載均衡設備。 The client can register with the control device, and can submit the network identification information of the first type of network where the client is located during registration. The control device can send the collected network identification information of the first type of network to the load balancing device.

負載均衡設備可以將接收到的第一類網路的網路標識資訊保存,在接收到客戶端發起的後端伺服器訪問請求時,可以從訪問請求中獲取客戶端所在的第一類網路的網路標識資訊,在預先保存有的網路標識資訊中,查找是否存在有該客戶端所處的第一類網路的網路標識資訊。若並查找不到有該網路標識資訊,表明該客戶端或該客戶端所在的網路還未在控制設備上註冊,可以相應返回拒絕訪問資訊至客戶端。若查找有該網路標識資訊,則可以繼續執行下一步的流量調度處理。 The load balancing device can save the received network identification information of the first type of network, and when receiving the back-end server access request initiated by the client, it can obtain the first type of network where the client is located from the access request In the pre-stored network identification information, find out whether there is the network identification information of the first type of network where the client is located. If the network identification information is not found, it indicates that the client or the network where the client is located has not been registered on the control device, and the access denied information can be returned to the client accordingly. If you find the network identification information, you can continue to perform the next step of traffic scheduling processing.

參照圖4,示出了本發明的一種網路交互方法實施例的步驟流程圖,具體可以包括如下步驟: Referring to Fig. 4, a flowchart of the steps of an embodiment of a network interaction method of the present invention is shown, which may specifically include the following steps:

步驟401,根據後端伺服器在第二類網路的唯一路徑指示資訊,將客戶端對所述後端伺服器的訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器,所述第二類網路為虛擬私有網路VPC。 Step 401: According to the unique path indication information of the back-end server in the second type of network, send the client's access request to the back-end server to at least one selected according to the preset traffic scheduling rule End server, the second type of network is a virtual private network VPC.

當後端伺服器所處的第一類網路為虛擬私有網路VPC時,負載均衡器可以利用預設流量調度規則計算各個後端 伺服器的負載情況,並相應選擇出可供調度的後端伺服器,根據選擇出的後端伺服器的唯一路徑指示資訊,相應地將後端伺服器訪問請求轉發至該後端伺服器,由後端伺服器處理並響應來自客戶端的訪問請求,並相應返回請求響應資訊至負載均衡器。 When the first type of network where the back-end server is located is a virtual private network VPC, the load balancer can use the preset traffic scheduling rules to calculate each back-end The load situation of the server, and correspondingly select the back-end server available for scheduling, and forward the back-end server access request to the back-end server according to the unique path indication information of the selected back-end server. The back-end server processes and responds to the access request from the client, and returns the request response information to the load balancer accordingly.

步驟402,按照所述客戶端在第一類網路的唯一路徑指示資訊,將後端伺服器針對客戶端的訪問請求返回的請求響應資訊返回至所述客戶端,所述第一類網路為虛擬私有網路VPC。 Step 402: Return the request response information returned by the back-end server for the client's access request to the client according to the unique path indication information of the client in the first type of network. The first type of network is Virtual private network VPC.

其中,所述唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在。 Wherein, the unique path indication information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located.

負載均衡器接收到後端伺服器響應於訪問請求的請求響應資訊,可以將該請求響應資訊相應返回至客戶端。當客戶端所處的第二類網路為虛擬私有網路VPC時,可以按照客戶端的唯一路徑指示資訊,將該請求響應資訊相應返回客戶端。 The load balancer receives the request response information from the back-end server in response to the access request, and can return the request response information to the client accordingly. When the second type of network where the client is located is a virtual private network VPC, the request response information can be returned to the client according to the unique path indication information of the client.

需要說明的是,實際應用中可以執行上述的一個或多個步驟,例如可以僅執行步驟401,也可以均執行步驟401和步驟402。 It should be noted that in actual applications, one or more of the above-mentioned steps may be executed. For example, only step 401 may be executed, or both steps 401 and 402 may be executed.

根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊,將訪問請求發送至後端伺服器,負載均衡器通過利用客戶端發送的訪問請求獲取客戶端的唯一路徑指示資訊,將後端伺服器返回請求響應資訊轉發至客戶端。由於客戶端和後端伺服器的唯一 路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,在第一類網路和第二類網路中至少一個為虛擬私有網路VPC時,可以不需要網關對客戶端和後端伺服器的地址轉換處理,從而避免了網關進行地址轉換處理造成的訪問時延,提升了客戶端對後端伺服器的訪問效率和後端伺服器的請求響應資訊的返回效率,同時也節省了網關的處理資源。而且,因為無需對客戶端和後端伺服器的地址進行轉換處理,節省了客戶端和後端伺服器對非VPC的IP地址的消耗。 According to the embodiment of the present invention, the load balancer sends the access request to the back-end server by using the unique path indication information of the back-end server issued by the control device, and the load balancer obtains the client's information by using the access request sent by the client. The unique path indication information forwards the request response information returned by the back-end server to the client. Due to the uniqueness of the client and back-end server The path indication information only exists in the first type of network where the client is located and the second type of network where each back-end server is located. Therefore, at least one of the first type of network and the second type of network is In the case of virtual private network VPC, the address translation processing of the client and the back-end server by the gateway is not required, thereby avoiding the access delay caused by the address translation processing of the gateway, and improving the access efficiency of the client to the back-end server And the return efficiency of the request response information of the back-end server, while also saving the processing resources of the gateway. Moreover, since there is no need to convert the addresses of the client and the back-end server, the consumption of non-VPC IP addresses by the client and the back-end server is saved.

另外,本發明實施例不需要經過網關進行轉換處理,負載均衡器可以獲取到客戶端真實的網路地址,從而可以精確地對客戶端進行訪問控制。 In addition, the embodiment of the present invention does not need to go through the gateway for conversion processing, and the load balancer can obtain the real network address of the client, so that the client can be accurately controlled.

為使本領域技術人員更好地理解本發明實施例,以下通過具體的示例對本發明的負載均衡以及控制方法進行說明。 In order to enable those skilled in the art to better understand the embodiments of the present invention, the load balancing and control method of the present invention will be described below through specific examples.

圖9示出了目前的負載均衡器的工作原理示意圖。從圖中可見,客戶端Client訪問某個伺服器以獲取服務,通過域名解析後會對應地訪問負載均衡器LB的VIP:VPORT端口。訪問到達負載均衡器後,會根據一定的流量調度規則,將該訪問分配到後端的實際提供服務的多個後端伺服器RS1、RS2、RS3或RS4。後端伺服器RS1、RS2、RS3或RS4分別通過各自的RIP1:RPORT1、RIP2:RPORT2、RIP3:RPORT3和RIP4:RPORT4端口收到來自客戶端的訪問,相應處理後由原路返回處理結果 到負載均衡器。負載均衡器將該處理結果,通過訪問客戶端的CIP:CPORT端口返回給客戶端。負載均衡器調度根據TCP/UDP調度為四層負載均衡(L4 LB),根據應用層(http、ftp等)為七層負載均衡(L7 LB)。此外,負載均衡器還具有對後端伺服器健康檢查的功能,分發流量時忽略健康檢查失敗的後端伺服器。 Figure 9 shows a schematic diagram of the working principle of a current load balancer. It can be seen from the figure that the client Client accesses a certain server to obtain services, and after domain name resolution, it will correspondingly access the VIP: VPORT port of the load balancer LB. After the visit reaches the load balancer, the visit will be distributed to the multiple back-end servers RS1, RS2, RS3, or RS4 that actually provide services in the back-end according to certain traffic scheduling rules. The back-end servers RS1, RS2, RS3, or RS4 respectively receive access from the client through their respective RIP1: RPORT1, RIP2: RPORT2, RIP3: RPORT3, and RIP4: RPORT4 ports, and return the processing results from the original path after corresponding processing. To the load balancer. The load balancer returns the processing result to the client by accessing the CIP: CPORT port of the client. The load balancer scheduling is based on TCP/UDP scheduling as four-layer load balancing (L4 LB), and according to the application layer (http, ftp, etc.), it is seven-layer load balancing (L7 LB). In addition, the load balancer also has the function of checking the health of the back-end servers, ignoring the back-end servers that have failed the health check when distributing traffic.

圖10示出了目前的利用網關進行負載均衡的工作原理示意圖。從圖中可見,客戶端處於網路標識為VNI79的VXLAN類型的虛擬私有網路VPC中,在該虛擬私有網路VPC中其IP地址為192.168.0.1,該IP地址僅在VNI79的虛擬私有網路VPC中唯一,需要經過網關VXLAN Gateway將VPC地址轉換成非VPC地址,從而轉換成在整個網路中具有唯一性的IP地址10.18.0.1,才可以經由IP地址為10.1.2.3的負載均衡器LB的調度,以訪問同處於VNI79的虛擬私有網路VPC中的後端伺服器RS1和RS2,和處於VNI1234的虛擬私有網路VPC中的後端伺服器RS1和RS2。 Figure 10 shows a schematic diagram of the current working principle of using a gateway for load balancing. It can be seen from the figure that the client is in a VXLAN-type virtual private network VPC with the network identification VNI79. In this virtual private network VPC, its IP address is 192.168.0.1, and the IP address is only in the virtual private network of VNI79. It is the only one in the VPC, the VPC address needs to be converted into a non-VPC address through the gateway VXLAN Gateway, which is converted into a unique IP address 10.18.0.1 in the entire network, before it can pass through the load balancer with an IP address of 10.1.2.3. LB is scheduled to access the back-end servers RS1 and RS2 in the virtual private network VPC of VNI79, and the back-end servers RS1 and RS2 in the virtual private network VPC of VNI1234.

網路標識為VNI79的虛擬私有網路VPC中的後端伺服器RS1和RS2在其所在網路中具有唯一的地址標識資訊192.168.1.11和192.168.2.12,VNI1234的虛擬私有網路VPC中的後端伺服器RS1和RS2在其所在網路中具有唯一的地址標識資訊172.16.100.11和172.16.200.12。然而各個後端伺服器的地址標識資訊僅在其所在的虛擬私有網路VPC中唯一,也需要經過網關分別轉換成IP地址 10.16.1.11、10.16.2.12、10.16.3.13和10.16.4.14,才能夠與負載均衡器進行資訊交互。 The back-end servers RS1 and RS2 in the virtual private network VPC with the network ID of VNI79 have unique address identification information 192.168.1.11 and 192.168.2.12 in the network where they are located. The back-end server in the virtual private network VPC of VNI1234 The end servers RS1 and RS2 have unique address identification information 172.16.100.11 and 172.16.200.12 in the network where they are located. However, the address identification information of each back-end server is only unique in the virtual private network VPC where it is located, and it also needs to be converted into an IP address through the gateway. 10.16.1.11, 10.16.2.12, 10.16.3.13, and 10.16.4.14 can interact with the load balancer.

為了便於本領域技術人員理解本發明的負載均衡方法在不同應用場景中的實施方式,以下將結合圖11、圖12和圖13進行說明。 In order to facilitate those skilled in the art to understand the implementation of the load balancing method of the present invention in different application scenarios, the following will describe with reference to FIG. 11, FIG. 12 and FIG. 13.

需要說明的是,為了表述簡便而將圖例簡化成2至4個後端伺服器的應用場景,實際應用中可適用於任意數量的後端伺服器。其中,圖11和圖12分別給出了客戶端處於虛擬私有網路VPC的情況下,多個後端伺服器均處於虛擬私有網路VPC以及多個後端伺服器均處於廣域網的應用場景示意圖。實際應用中,還可以包括多個後端伺服器中部分處於廣域網,部分處於虛擬私有網路VPC的情況。 It should be noted that the illustration is simplified into an application scenario of 2 to 4 back-end servers for the sake of simplicity. In actual applications, it can be applied to any number of back-end servers. Among them, Figure 11 and Figure 12 respectively show the application scenarios where the client is in a virtual private network VPC, multiple back-end servers are in the virtual private network VPC, and multiple back-end servers are all in the WAN. . In practical applications, it may also include the situation where some of the multiple back-end servers are in the wide area network and some are in the virtual private network VPC.

圖13給出了客戶端處於廣域網的情況下,多個後端伺服器均處於虛擬私有網路VPC的應用場景示意圖。實際應用中,還可以包括至少一個後端伺服器處於虛擬私有網路VPC而其餘後端伺服器處於廣域網的情況。 Figure 13 shows a schematic diagram of an application scenario where multiple back-end servers are in a virtual private network VPC when the client is in the WAN. In actual applications, it may also include a situation where at least one back-end server is in a virtual private network VPC and the remaining back-end servers are in a wide area network.

本領域技術人員可以根據實際需要將本發明的負載均衡方法應用於多種適用的應用場景中。 Those skilled in the art can apply the load balancing method of the present invention to various applicable application scenarios according to actual needs.

圖11示出了本發明的一種負載均衡方法的應用場景一的示意圖。從圖中可見,客戶端Client處於網路標識為VNI79的虛擬私有網路VPC中,在VNI79的虛擬私有網路VPC中的地址為192.168.0.1。客戶端可以在向控制設備註冊時獲取到負載均衡器LB的唯一路徑指示資訊 VNI79/192.168.10.1,並根據該唯一路徑指示資訊訪問負載均衡器LB,以經負載均衡器向後端伺服器發起訪問請求。負載均衡器利用客戶端所在虛擬私有網路VPC的網路標識VNI79和在該虛擬私有網路VPC中的IP地址192.168.0.1,產生該客戶端的唯一路徑指示資訊VNI79/192.168.0.1並記錄學習。 FIG. 11 shows a schematic diagram of application scenario 1 of a load balancing method of the present invention. It can be seen from the figure that the client Client is in the virtual private network VPC with the network identification VNI79, and the address in the virtual private network VPC of VNI79 is 192.168.0.1. The client can obtain the unique path indication information of the load balancer LB when registering with the control device VNI79/192.168.10.1, and access the load balancer LB according to the unique path indication information to initiate an access request to the back-end server via the load balancer. The load balancer uses the network identifier VNI79 of the virtual private network VPC where the client is located and the IP address 192.168.0.1 in the virtual private network VPC to generate the unique path indication information VNI79/192.168.0.1 of the client and record the learning.

在本應用場景中除了具有VNI79的虛擬私有網路VPC,還具有VNI1234的虛擬私有網路VPC。在兩個虛擬私有網路VPC下分別部署有2個後端伺服器RS1和RS2。後端伺服器在其所屬的虛擬私有網路VPC中具有唯一的地址標識資訊192.168.1.11、192.168.2.12、172.16.100.11和172.16.200.12。 In this application scenario, in addition to the virtual private network VPC with VNI79, there is also a virtual private network VPC with VNI1234. Two back-end servers RS1 and RS2 are respectively deployed under the two virtual private network VPCs. The back-end server has unique address identification information 192.168.1.11, 192.168.2.12, 172.16.100.11 and 172.16.200.12 in the virtual private network VPC to which it belongs.

負載均衡器可以從控制設備獲取多個後端伺服器的唯一路徑指示資訊。如圖中所見,負載均衡器可以獲取到網路標識為VNI79的虛擬私有網路VPC中的後端伺服器RS1和RS2的唯一路徑指示資訊VNI79/192.168.1.11和VNI79/192.168.2.12,和VNI1234的虛擬私有網路VPC中的後端伺服器RS1和RS2的唯一路徑指示資訊VNI1234/172.16.100.11和VNI1234/172.16.200.12。 The load balancer can obtain the unique path indication information of multiple back-end servers from the control device. As you can see in the figure, the load balancer can obtain the unique path indication information VNI79/192.168.1.11 and VNI79/192.168.2.12, and VNI1234 of the back-end servers RS1 and RS2 in the virtual private network VPC with the network identifier VNI79. The unique path indication information VNI1234/172.16.100.11 and VNI1234/172.16.200.12 of the back-end servers RS1 and RS2 in the virtual private network VPC.

利用後端伺服器的唯一路徑指示資訊,可以將客戶端發起的訪問請求準確地調度至後端伺服器。後端伺服器返回響應資訊時,也可以根據記錄學習的客戶端的唯一路徑指示資訊,將響應資訊準確地返回至客戶端。從而,不需要經過網關將客戶端和後端伺服器的VPC地址轉換成非 VPC地址,負載均衡器即可準確地將客戶端的訪問調度至後端伺服器,還可以準確地將後端伺服器的響應資訊準確地返回至客戶端。 Using the unique path indication information of the back-end server, the access request initiated by the client can be accurately dispatched to the back-end server. When the back-end server returns the response information, it can also accurately return the response information to the client according to the unique path indication information of the client that records the learning. Therefore, there is no need to go through the gateway to convert the VPC addresses of the client and back-end servers to non- With VPC address, the load balancer can accurately schedule the client's access to the back-end server, and can accurately return the response information of the back-end server to the client.

實際應用中,除了VXLAN,客戶端和後端伺服器也可以處於基於GRE構建的虛擬私有網路VPC中,或者部分客戶端和後端伺服器處於基於VXLAN創建的的虛擬私有網路VPC中,部分處於基於GRE創建的虛擬私有網路VPC中。本領域技術人員可以將本發明實施例應用於多種方式構建的虛擬私有網路VPC中。 In actual applications, in addition to VXLAN, clients and back-end servers can also be in a virtual private network VPC based on GRE, or some clients and back-end servers can be in a virtual private network VPC based on VXLAN. Part of it is in a virtual private network VPC created based on GRE. Those skilled in the art can apply the embodiments of the present invention to a virtual private network VPC constructed in various ways.

圖12示出了本發明的一種負載均衡方法的應用場景二的示意圖。從圖中可見,客戶端Client處於虛擬私有網路VPC中,而後端伺服器RS1和RS2處於傳統的廣域網中。負載均衡器利用客戶端所在虛擬私有網路VPC的網路標識VNI79和在該虛擬私有網路VPC中的IP地址192.168.0.1,產生客戶端的唯一路徑指示資訊並記錄學習。負載均衡伺服器將客戶端發起的訪問請求調度至IP地址分別為100.12.1.11和100.12.1.12的後端伺服器RS1和RS2,並將後端伺服器的響應資訊,根據記錄學習的客戶端的唯一路徑指示資訊,返回至客戶端。從而,不需要經過網關將VPC地址轉換成非VPC地址,負載均衡器即可準確地將客戶端的訪問調度至後端伺服器並返回響應資訊至客戶端。 Fig. 12 shows a schematic diagram of application scenario 2 of a load balancing method of the present invention. It can be seen from the figure that the client Client is in the virtual private network VPC, while the back-end servers RS1 and RS2 are in the traditional wide area network. The load balancer uses the network identifier VNI79 of the virtual private network VPC where the client is located and the IP address 192.168.0.1 in the virtual private network VPC to generate the unique path indication information of the client and record the learning. The load balancing server dispatches the access request initiated by the client to the back-end servers RS1 and RS2 with IP addresses of 100.12.1.11 and 100.12.1.12 respectively, and uses the back-end server's response information according to the uniqueness of the client learned by the record Path indication information, return to the client. Therefore, without the need for a gateway to convert the VPC address to a non-VPC address, the load balancer can accurately schedule the client's access to the back-end server and return response information to the client.

圖13示出了本發明的一種負載均衡方法的應用場景三的示意圖。從圖中可見,客戶端處於傳統的廣域網中, IP地址為10.18.0.1;而後端伺服器RS1和RS2處於網路標識VNI79的虛擬私有網路VPC中,其在虛擬私有網路VPC中具有的IP地址分別為192.168.1.11和192.168.2.12。負載均衡器將客戶端發起的訪問請求調度至後端伺服器時,可以根據後端伺服器的網路標識VNI79以及其在虛擬私有網路VPC中的IP地址192.168.1.11和192.168.2.12產生各自的唯一路徑指示資訊。根據各自的唯一路徑指示資訊,負載均衡器可以將訪問請求準確地調度至後端伺服器,而無須經過網關將後端伺服器的VPC地址轉換成非VPC地址。 FIG. 13 shows a schematic diagram of application scenario 3 of a load balancing method of the present invention. It can be seen from the figure that the client is in a traditional WAN, The IP address is 10.18.0.1; and the back-end servers RS1 and RS2 are in the virtual private network VPC with the network identification VNI79, and their IP addresses in the virtual private network VPC are 192.168.1.11 and 192.168.2.12, respectively. When the load balancer dispatches the client-initiated access request to the back-end server, it can generate each based on the back-end server's network identifier VNI79 and its IP addresses 192.168.1.11 and 192.168.2.12 in the virtual private network VPC. The unique path to indicate information. According to their unique path indication information, the load balancer can accurately dispatch the access request to the back-end server without going through the gateway to convert the VPC address of the back-end server into a non-VPC address.

圖14示出了本發明實施例的負載均衡處理流程圖。從圖中可見,首先從客戶端發起的訪問請求中解封VXLAN報文,獲取其中的VNI資訊和報文內層資訊。然後調度模組根據獲取的VNI資訊和包含有客戶端IP地址的報文內層資訊,以及預設的調度規則選取後端伺服器。如果客戶端初始建立連接成功,則通過VTEP自動學習模組學習並記錄獲取的VNI資訊和報文內層資訊。根據後端伺服器的VNI資訊和地址資訊構造VXLAN報文,發送至相應的後端伺服器。後端伺服器接收到請求處理後,將響應資訊返回至負載均衡器LB。 Fig. 14 shows a flow chart of load balancing processing according to an embodiment of the present invention. It can be seen from the figure that the VXLAN message is first unpacked from the access request initiated by the client, and the VNI information and the inner layer information of the message are obtained. Then the scheduling module selects the back-end server according to the obtained VNI information and the inner layer information of the message containing the client IP address, as well as the preset scheduling rules. If the client successfully establishes a connection initially, it will learn and record the acquired VNI information and message inner information through the VTEP automatic learning module. Construct a VXLAN message based on the VNI information and address information of the back-end server and send it to the corresponding back-end server. After the back-end server receives the request processing, it returns the response information to the load balancer LB.

圖15示出了本發明實施例的負載均衡系統結構圖。從圖中可見,該系統包括如下幾個關鍵模組: Fig. 15 shows a structural diagram of a load balancing system according to an embodiment of the present invention. As can be seen from the figure, the system includes the following key modules:

控制中心,用於下發調度規則給負載均衡器。如果是虛擬私有網路VPC內的後端伺服器,則需要下發後端伺 服器的VNI資訊和IP地址資訊給負載均衡器。 The control center is used to issue scheduling rules to the load balancer. If it is a back-end server in a virtual private network VPC, the back-end server needs to be issued The VNI information and IP address information of the server are given to the load balancer.

VXLAN處理模組,用於在接收到客戶端發送的訪問請求時,根據VXLAN協議的特點識別收到的VXLAN報文並解封。在返回請求響應時,相應封裝一個VXLAN報文。 The VXLAN processing module is used to identify and unseal the received VXLAN message according to the characteristics of the VXLAN protocol when the access request sent by the client is received. When the request response is returned, a VXLAN packet is encapsulated accordingly.

VTEP自動學習模組,用於在客戶端初始建立連接或VTEP發生變化時,學習客戶端的地址資訊並記錄,供返回請求響應時直接使用。 The VTEP automatic learning module is used to learn and record the address information of the client when the client initially establishes a connection or when the VTEP changes, for direct use when returning a request response.

調度模組,用於按早調度規則配置對後端伺服器的負載均衡。 The scheduling module is used to configure the load balancing of the back-end server according to the early scheduling rules.

VSOCK模組,用於輔助對虛擬私有網路VPC內的後端伺服器進行健康檢查。 The VSOCK module is used to assist in the health check of the back-end server in the virtual private network VPC.

圖16示出了利用VSOCK模組輔助健康檢查的流程示意圖。從圖中可見,VSOCK模組工作於系統底層,健康檢查程序在創建連接前先通過系統調用後端伺服器的VNI資訊和地址資訊,後續VSOCK模組會根據調用的資訊封裝或解封VXLAN報文並發送至後端伺服器,無需網關的參與即可完成與後端伺服器的資訊交互。 Figure 16 shows a schematic diagram of the process of using the VSOCK module to assist the health check. It can be seen from the figure that the VSOCK module works at the bottom of the system. The health check program first calls the VNI information and address information of the back-end server through the system before establishing a connection. Subsequent VSOCK modules will encapsulate or unseal the VXLAN report according to the called information. The text is sent to the back-end server, and the information interaction with the back-end server can be completed without the participation of the gateway.

需要說明的是,對於方法實施例,為了簡單描述,故將其都表述為一系列的動作組合,但是本領域技術人員應該知悉,本發明實施例並不受所描述的動作順序的限制,因為依據本發明實施例,某些步驟可以採用其他順序或者同時進行。其次,本領域技術人員也應該知悉,說明書中所描述的實施例均屬較佳實施例,所涉及的動作並不一定 是本發明實施例所必須的。 It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the described sequence of actions, because According to the embodiments of the present invention, certain steps may be performed in other order or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily It is necessary for the embodiment of the present invention.

參照圖5,示出了本發明的一種網路的負載均衡裝置實施例1的結構框圖,具體可以包括如下模組: Referring to Figure 5, there is shown a structural block diagram of Embodiment 1 of a network load balancing device of the present invention, which may specifically include the following modules:

預設流量調度規則接收模組501,用於接收控制設備發送的預設流量調度規則,以及後端伺服器在第二類網路的唯一路徑指示資訊。 The preset traffic scheduling rule receiving module 501 is configured to receive the preset traffic scheduling rule sent by the control device and the unique path indication information of the back-end server in the second type of network.

資訊獲取模組502,用於從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊。 The information obtaining module 502 is used to obtain the unique path indication information of the client in the first type of network from the back-end server access request sent by the client.

後端伺服器訪問請求發送模組503,用於根據所述後端伺服器的唯一路徑指示資訊,將所述後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器。 The back-end server access request sending module 503 is configured to send the back-end server access request to at least one selected according to the preset traffic scheduling rule according to the unique path indication information of the back-end server A back-end server.

請求響應資訊返回模組504,用於接收所述後端伺服器返回的請求響應資訊,並按照所述客戶端的唯一路徑指示資訊,將所述請求響應資訊返回至所述客戶端,其中,所述唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC。 The request response information return module 504 is configured to receive the request response information returned by the back-end server, and return the request response information to the client according to the unique path indication information of the client. The unique path indication information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located, at least in the first type of network and the second type of network One is a virtual private network VPC.

根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊,將訪問請求發送至後端伺服器,負載均衡器通過利用客戶端發送的後端伺服器訪問請求獲取客戶端的唯一路徑指示資訊,將後端伺服器返回請求響應資訊轉發至客戶端。由於客戶端和後端伺 服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,在第一類網路和第二類網路中至少一個為虛擬私有網路VPC時,可以不需要網關對客戶端和後端伺服器的地址轉換處理,從而避免了網關進行地址轉換處理造成的訪問時延,提升了客戶端對後端伺服器的訪問效率和後端伺服器的請求響應資訊的返回效率,同時也節省了網關的處理資源。而且,因為無需對客戶端和後端伺服器的地址進行轉換處理,節省了客戶端和後端伺服器對非VPC的IP地址的消耗。 According to the embodiment of the present invention, the load balancer sends the access request to the back-end server by using the unique path indication information of the back-end server issued by the control device, and the load balancer accesses the back-end server by using the back-end server sent by the client. Request to obtain the unique path indication information of the client, and forward the request response information returned by the back-end server to the client. Since the client and back-end server The server’s unique path indication information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located. Therefore, in the first type of network and the second type of network When at least one of them is a virtual private network VPC, the address translation processing of the client and the back-end server by the gateway may not be required, thereby avoiding the access delay caused by the address translation processing of the gateway, and improving the client's response to the back-end server. The access efficiency of the server and the return efficiency of the request response information of the back-end server, while also saving the processing resources of the gateway. Moreover, since there is no need to convert the addresses of the client and the back-end server, the consumption of non-VPC IP addresses by the client and the back-end server is saved.

另外,本發明實施例不需要經過網關進行轉換處理,負載均衡器可以獲取到客戶端真實的網路地址,從而可以精確地對客戶端進行訪問控制。作為本發明實施例的較佳示例,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 In addition, the embodiment of the present invention does not need to go through the gateway for conversion processing, and the load balancer can obtain the real network address of the client, so that the client can be accurately controlled. As a preferred example of the embodiment of the present invention, the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC.

參照圖6,示出了本發明的一種網路的負載均衡裝置實施例2的結構框圖,具體可以包括如下模組: Referring to FIG. 6, there is shown a structural block diagram of Embodiment 2 of a network load balancing device of the present invention, which may specifically include the following modules:

網路標識資訊接收模組601,用於接收並保存多個客戶端向所述控制設備註冊時提交的所述客戶端所處的第一類網路的網路標識資訊。 The network identification information receiving module 601 is used to receive and save the network identification information of the first type of network where the client is located, which is submitted when multiple clients register with the control device.

預設流量調度規則接收模組602,用於接收控制設備發送的預設流量調度規則,以及後端伺服器在第二類網路的唯一路徑指示資訊。 The preset traffic scheduling rule receiving module 602 is configured to receive the preset traffic scheduling rule sent by the control device and the unique path indication information of the back-end server in the second type of network.

後端伺服器訪問模組603,用於按照多個後端應用伺服器的唯一路徑指示資訊,相應訪問多個後端伺服器。 The back-end server access module 603 is used for correspondingly accessing multiple back-end servers according to the unique path instruction information of the multiple back-end application servers.

運行狀態檢查模組604,用於對訪問的後端伺服器進行運行狀態檢查,針對狀態異常的後端伺服器,在對應的唯一路徑指示資訊上標記異常標識;所述異常標識用於指示暫停發送所述後端伺服器訪問請求至後端伺服器。 The running status checking module 604 is used to check the running status of the accessed back-end server, and for the back-end server with abnormal status, mark the abnormal identifier on the corresponding unique path indication information; the abnormal identifier is used to indicate the suspension Send the back-end server access request to the back-end server.

網路類型識別模組605,用於識別客戶端所處的第一類網路的網路類型。 The network type identification module 605 is used to identify the network type of the first type of network where the client is located.

資訊獲取模組606,用於從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊。 The information acquisition module 606 is used for acquiring the unique path indication information of the client in the first type of network from the back-end server access request sent by the client.

網路標識資訊判斷模組607,用於判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 The network identification information determining module 607 is used to determine whether the network identification information of the first type of network obtained from the back-end server access request is within the range of the stored network identification information of the first type of network If not, then return access denied information to the client.

後端伺服器訪問請求發送模組608,用於根據所述後端伺服器的唯一路徑指示資訊,將所述後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器。 The back-end server access request sending module 608 is configured to send the back-end server access request to at least one selected according to the preset traffic scheduling rule according to the unique path indication information of the back-end server A back-end server.

請求響應資訊返回模組609,用於接收所述後端伺服器返回的請求響應資訊,並按照所述客戶端的唯一路徑指示資訊,將所述請求響應資訊返回至所述客戶端,其中,所述唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路 和所述第二類網路中至少一個為虛擬私有網路VPC。 The request response information return module 609 is used to receive the request response information returned by the back-end server, and return the request response information to the client according to the unique path indication information of the client. The unique path indication information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located. The first type of network At least one of the second type of networks is a virtual private network VPC.

根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊,將訪問請求發送至後端伺服器,負載均衡器通過利用客戶端發送的後端伺服器訪問請求獲取客戶端的唯一路徑指示資訊,將後端伺服器返回請求響應資訊轉發至客戶端。由於客戶端和後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,在第一類網路和第二類網路中至少一個為虛擬私有網路VPC時,可以不需要網關對客戶端和後端伺服器的地址轉換處理,從而避免了網關進行地址轉換處理造成的訪問時延,提升了客戶端對後端伺服器的訪問效率和後端伺服器的請求響應資訊的返回效率,同時也節省了網關的處理資源。而且,因為無需對客戶端和後端伺服器的地址進行轉換處理,節省了客戶端和後端伺服器對非VPC的IP地址的消耗。 According to the embodiment of the present invention, the load balancer sends the access request to the back-end server by using the unique path indication information of the back-end server issued by the control device, and the load balancer accesses the back-end server by using the back-end server sent by the client. Request to obtain the unique path indication information of the client, and forward the request response information returned by the back-end server to the client. Since the unique path indication information between the client and the back-end server only exists in the first type of network where the client is located and the second type of network where each back-end server is located, so in the first type of network When at least one of the second and second types of networks is a virtual private network VPC, the address translation processing of the client and the back-end server by the gateway is not required, thereby avoiding the access delay caused by the address translation processing of the gateway and increasing The client's access efficiency to the back-end server and the return efficiency of the back-end server's request response information also save the processing resources of the gateway. Moreover, since there is no need to convert the addresses of the client and the back-end server, the consumption of non-VPC IP addresses by the client and the back-end server is saved.

另外,本發明實施例不需要經過網關進行轉換處理,負載均衡器可以獲取到客戶端真實的網路地址,從而可以精確地對客戶端進行訪問控制。 In addition, the embodiment of the present invention does not need to go through the gateway for conversion processing, and the load balancer can obtain the real network address of the client, so that the client can be accurately controlled.

最後,根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊訪問後端伺服器,由於後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,可以無須經由網關對後端伺服器的VPC地址 進行轉換,而利用後端伺服器的唯一路徑指示資訊對後端伺服器進行運行狀態檢查,避免了網關進行地址轉換處理造成的時延,提升了運行狀態檢查的效率。 Finally, according to the embodiment of the present invention, the load balancer accesses the back-end server by using the unique path indication information of the back-end server issued by the control device, because the unique path indication information of the back-end server is in the first position where the client is located. The first type of network and the second type of network where each back-end server is located is the only one. Therefore, it is possible to communicate the VPC address of the back-end server without going through the gateway. Perform conversion, and use the unique path indication information of the back-end server to check the running status of the back-end server, avoiding the delay caused by the gateway's address translation processing, and improving the efficiency of running status checking.

作為本發明實施例的較佳示例,所述資訊獲取模組606可以包括:後端伺服器訪問請求解封子模組,用於針對所述第一類網路的網路類型,從所述後端伺服器訪問請求中解封出所述第一類網路的網路標識資訊和所述客戶端的地址標識資訊,並產生所述客戶端的唯一路徑指示資訊。 As a preferred example of the embodiment of the present invention, the information acquisition module 606 may include: a back-end server access request unblocking sub-module, which is used for the network type of the first type of network, from the The back-end server access request unblocks the network identification information of the first type of network and the address identification information of the client, and generates unique path indication information of the client.

作為本發明實施例的較佳示例,所述請求響應資訊返回模組609可以包括以下子模組:請求響應資訊封裝子模組,用於針對所述第一類網路的網路類型,封裝所述請求響應資訊並發送至所述客戶端。 As a preferred example of the embodiment of the present invention, the request response information return module 609 may include the following submodules: a request response information encapsulation submodule for encapsulating the network type of the first type of network The request response information is sent to the client.

參照圖7,示出了本發明的一種網路的負載均衡控制裝置實施例的結構框圖,具體可以包括如下模組:後端伺服器唯一路徑指示資訊獲取模組701,用於從各後端伺服器獲取所述後端伺服器在第二類網路的唯一路徑指示資訊。 Referring to FIG. 7, there is shown a structural block diagram of an embodiment of a network load balancing control device of the present invention, which may specifically include the following modules: a back-end server unique path indication information acquisition module 701, which is used to obtain information from each back-end server The end server obtains the unique path indication information of the back end server in the second type of network.

預設流量調度規則發送模組702,用於將預設流量調度規則和所述後端伺服器的唯一路徑指示資訊發送至負載均衡設備,以供所述負載均衡設備根據所述後端伺服器的唯一路徑指示資訊,將所述客戶端的後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個 後端伺服器,以及按照所述客戶端在第一類網路的唯一路徑指示資訊,將所述後端伺服器返回的請求響應資訊返回至所述客戶端,其中,所述唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC。 The preset traffic scheduling rule sending module 702 is configured to send the preset traffic scheduling rule and the unique path indication information of the back-end server to the load balancing device, so that the load balancing device can use the back-end server according to The unique path indication information of the client sends the client’s back-end server access request to at least one selected according to the preset traffic scheduling rule The back-end server, and according to the unique path indication information of the client in the first type of network, returns the request response information returned by the back-end server to the client, wherein the unique path indication information Only exists in the first type of network where the client is located and the second type of network where each back-end server is located, and at least one of the first type of network and the second type of network is a virtual private network Road VPC.

根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊,將訪問請求發送至後端伺服器,由於後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,在第一類網路和第二類網路中至少一個為虛擬私有網路VPC時,可以不需要網關對後端伺服器的地址轉換處理,從而避免了網關進行地址轉換處理造成的訪問時延,提升了客戶端對後端伺服器的訪問效率,同時也節省了網關的處理資源。而且,因為無需對後端伺服器的地址進行轉換處理,節省了後端伺服器對非VPC的IP地址的消耗。 According to the embodiment of the present invention, the load balancer sends the access request to the back-end server by using the unique path indication information of the back-end server issued by the control device. Because the unique path indication information of the back-end server is in the client The first type of network at the location and the second type of network where each back-end server is located. Therefore, when at least one of the first type of network and the second type of network is a virtual private network VPC, The address translation processing of the gateway to the back-end server may not be required, thereby avoiding the access delay caused by the address translation processing of the gateway, improving the access efficiency of the client to the back-end server, and also saving the processing resources of the gateway. Moreover, because there is no need to convert the address of the back-end server, it saves the back-end server's consumption of non-VPC IP addresses.

另外,本發明實施例不需要經過網關進行轉換處理,負載均衡器可以獲取到客戶端真實的網路地址,從而可以精確地對客戶端進行訪問控制。 In addition, the embodiment of the present invention does not need to go through the gateway for conversion processing, and the load balancer can obtain the real network address of the client, so that the client can be accurately controlled.

作為本發明實施例的較佳示例,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 As a preferred example of the embodiment of the present invention, the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC.

作為本發明實施例的較佳示例,所述裝置可以還包括 以下模組:發送指示模組,用於指示所述負載均衡設備將所述負載均衡設備的唯一路徑指示資訊發送至所述後端伺服器,以供所述後端伺服器按照所述負載均衡設備的唯一路徑指示資訊,返回請求響應資訊至所述負載均衡設備。 As a preferred example of the embodiment of the present invention, the device may further include The following modules: a sending instruction module for instructing the load balancing device to send the unique path instruction information of the load balancing device to the back-end server, so that the back-end server can balance the load according to the load The unique path indication information of the device, and the request response information is returned to the load balancing device.

作為本發明實施例的較佳示例,所述裝置可以還包括以下模組:網路標識資訊接收模組,用於接收所述客戶端在註冊時提交的所述客戶端所在的第一類網路的網路標識資訊。 As a preferred example of the embodiment of the present invention, the device may further include the following module: a network identification information receiving module for receiving the first type of network where the client is located, submitted by the client during registration. Network identification information of the road.

網路標識資訊發送模組,用於將所述第一類網路的網路標識資訊發送至所述負載均衡設備,以供所述負載均衡設備保存並在接收到所述客戶端的後端伺服器訪問請求時,判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 The network identification information sending module is used to send the network identification information of the first type of network to the load balancing device for the load balancing device to save and receive the back-end server of the client In the case of a server access request, it is determined whether the network identification information of the first type of network obtained from the back-end server access request is within the range of the saved network identification information of the first type of network, if not, then Return the access denied information to the client.

參照圖8,示出了本發明的一種網路交互裝置實施例的結構框圖,具體可以包括如下模組:訪問請求發送模組801,用於根據後端伺服器在第二類網路的唯一路徑指示資訊,將客戶端對後端伺服器的訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器,所述第二類網路為虛擬私有網路VPC;和/或,請求響應資訊返回模組802,用於按照所述客戶端在第一類網路的唯一路徑指示資訊,將後端伺服器針對客戶端的訪問請求返回的請求響應資訊返回至所述客戶 端,所述第一類網路為虛擬私有網路VPC;其中,所述唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在。 Referring to FIG. 8, there is shown a structural block diagram of an embodiment of a network interaction device of the present invention, which may specifically include the following modules: an access request sending module 801, which is used to send a request according to the back-end server in the second type of network The unique path indication information sends the client's access request to the back-end server to at least one back-end server selected according to the preset traffic scheduling rule, and the second type of network is a virtual private network VPC And/or, the request response information return module 802, which is used to return the request response information returned by the back-end server to the client's access request according to the unique path indication information of the client in the first type of network Describe the customer At the end, the first type of network is a virtual private network VPC; wherein, the unique path indication information is in the first type of network where the client is located and the second type of network where each back-end server is located The only one exists in.

根據本發明實施例,負載均衡器通過利用控制設備下發的後端伺服器的唯一路徑指示資訊,將訪問請求發送至後端伺服器,負載均衡器通過利用客戶端發送的後端伺服器訪問請求獲取客戶端的唯一路徑指示資訊,將後端伺服器返回請求響應資訊轉發至客戶端。由於客戶端和後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處的第二類網路中唯一存在,因此,在第一類網路和第二類網路中至少一個為虛擬私有網路VPC時,可以不需要網關對客戶端和後端伺服器的地址轉換處理,從而避免了網關進行地址轉換處理造成的訪問時延,提升了客戶端對後端伺服器的訪問效率和後端伺服器的請求響應資訊的返回效率,同時也節省了網關的處理資源。而且,因為無需對客戶端和後端伺服器的地址進行轉換處理,節省了客戶端和後端伺服器對非VPC的IP地址的消耗。 According to the embodiment of the present invention, the load balancer sends the access request to the back-end server by using the unique path indication information of the back-end server issued by the control device, and the load balancer accesses the back-end server by using the back-end server sent by the client. Request to obtain the unique path indication information of the client, and forward the request response information returned by the back-end server to the client. Since the unique path indication information between the client and the back-end server only exists in the first type of network where the client is located and the second type of network where each back-end server is located, so in the first type of network When at least one of the second and second types of networks is a virtual private network VPC, the address translation processing of the client and the back-end server by the gateway is not required, thereby avoiding the access delay caused by the address translation processing of the gateway and increasing The client's access efficiency to the back-end server and the return efficiency of the back-end server's request response information also save the processing resources of the gateway. Moreover, since there is no need to convert the addresses of the client and the back-end server, the consumption of non-VPC IP addresses by the client and the back-end server is saved.

另外,本發明實施例不需要經過網關進行轉換處理,負載均衡器可以獲取到客戶端真實的網路地址,從而可以精確地對客戶端進行訪問控制。 In addition, the embodiment of the present invention does not need to go through the gateway for conversion processing, and the load balancer can obtain the real network address of the client, so that the client can be accurately controlled.

對於裝置實施例而言,由於其與方法實施例基本相似,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。 As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.

本說明書中的各個實施例均採用遞進的方式描述,每個實施例重點說明的都是與其他實施例的不同之處,各個實施例之間相同相似的部分互相參見即可。 The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.

本領域內的技術人員應明白,本發明實施例的實施例可提供為方法、裝置、或計算機程序產品。因此,本發明實施例可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本發明實施例可採用在一個或多個其中包含有計算機可用程序代碼的計算機可用儲存媒體(包括但不限於磁盤記憶體、CD-ROM、光學記憶體等)上實施的計算機程序產品的形式。 Those skilled in the art should understand that the embodiments of the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may adopt the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may adopt computer program products implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program codes. form.

在一個典型的配置中,所述計算機設備包括一個或多個處理器(CPU)、輸入/輸出介面、網路介面和記憶體。記憶體可能包括計算機可讀媒體中的非永久性記憶體,隨機存取記憶體(RAM)和/或非揮發性記憶體等形式,如唯讀記憶體(ROM)或閃存(flash RAM)。記憶體是計算機可讀媒體的示例。計算機可讀媒體包括永久性和非永久性、可移動和非可移動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是計算機可讀指令、資料結構、程序的模組或其他資料。計算機的儲存媒體的例子包括,但不限於相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可擦除可編程唯讀記憶體(EEPROM)、快閃記憶體或其他記憶體技術、唯讀光碟唯讀記憶體(CD-ROM)、數字多功能光碟(DVD)或其他光 學儲存、磁盒式磁帶,磁帶磁磁盤儲存或其他磁性儲存設備或任何其他非傳輸媒體,可用於儲存可以被計算設備訪問的資訊。按照本文中的界定,計算機可讀媒體不包括非持續性的電腦可讀媒體(transitory media),如調製的資料信號和載波。 In a typical configuration, the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include non-permanent memory in computer-readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media. Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), and other types of random access memory (RAM) , Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital multi-function disc (DVD) or other light Electronic storage, magnetic cassette tape, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include non-persistent computer-readable media (transitory media), such as modulated data signals and carrier waves.

本發明實施例是參照根據本發明實施例的方法、終端設備(系統)、和計算機程序產品的流程圖和/或方框圖來描述的。應理解可由計算機程序指令實現流程圖和/或方框圖中的每一流程和/或方框、以及流程圖和/或方框圖中的流程和/或方框的結合。可提供這些計算機程序指令到通用計算機、專用計算機、嵌入式處理機或其他可編程資料處理終端設備的處理器以產生一個機器,使得通過計算機或其他可編程資料處理終端設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的裝置。 The embodiments of the present invention are described with reference to the flowcharts and/or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing terminal equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal equipment A device for realizing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram is generated.

這些計算機程序指令也可儲存在能引導計算機或其他可編程資料處理終端設備以特定方式工作的計算機可讀記憶體中,使得儲存在該計算機可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能。 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including the instruction device , The instruction device realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

這些計算機程序指令也可裝載到計算機或其他可編程資料處理終端設備上,使得在計算機或其他可編程終端設備上執行一系列操作步驟以產生計算機實現的處理,從而 在計算機或其他可編程終端設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的步驟。 These computer program instructions can also be loaded on a computer or other programmable data processing terminal equipment, so that a series of operation steps are executed on the computer or other programmable terminal equipment to produce computer-implemented processing, thereby Instructions executed on a computer or other programmable terminal device provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.

儘管已描述了本發明實施例的較佳實施例,但本領域內的技術人員一旦得知了基本創造性概念,則可對這些實施例做出另外的變更和修改。所以,所附申請專利範圍意欲解釋為包括較佳實施例以及落入本發明實施例範圍的所有變更和修改。 Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the scope of the attached patent application is intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.

最後,還需要說明的是,在本文中,諸如第一和第二等之類的關係術語僅僅用來將一個實體或者操作與另一個實體或操作區分開來,而不一定要求或者暗示這些實體或操作之間存在任何這種實際的關係或者順序。而且,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、物品或者終端設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、物品或者終端設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個......”限定的要素,並不排除在包括所述要素的過程、方法、物品或者終端設備中還存在另外的相同要素。 Finally, it should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. Or there is any such actual relationship or sequence between operations. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements not only includes those elements, but also includes those elements that are not explicitly listed. Other elements listed, or also include elements inherent to this process, method, article, or terminal device. Without more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other same elements in the process, method, article, or terminal device that includes the element.

以上對本發明所提供的一種網路的負載均衡方法和一種網路的負載均衡裝置,一種網路的負載均衡控制方法和一種網路的負載均衡控制裝置,一種網路交互方法和一種網路交互裝置,進行了詳細介紹,本文中應用了具體個例 對本發明的原理及實施方式進行了闡述,以上實施例的說明只是用於幫助理解本發明的方法及其核心思想;同時,對於本領域的一般技術人員,依據本發明的思想,在具體實施方式及應用範圍上均會有改變之處,綜上所述,本說明書內容不應理解為對本發明的限制。 The above is a network load balancing method and a network load balancing device provided by the present invention, a network load balancing control method and a network load balancing control device, a network interaction method and a network interaction The device is introduced in detail, and specific examples are used in this article The principle and implementation of the present invention are explained. The description of the above embodiments is only used to help understand the method and core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, in the specific implementation mode There will be changes in the scope of application and the scope of application. In summary, the content of this specification should not be construed as a limitation of the present invention.

Claims (20)

一種網路的負載均衡方法,其特徵在於,包括:接收控制設備發送的預設流量調度規則,以及後端伺服器在第二類網路的唯一路徑指示資訊;從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊;根據所述後端伺服器的唯一路徑指示資訊的指示,將所述後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器;接收所述後端伺服器返回的請求響應資訊,並按照所述客戶端的唯一路徑指示資訊的指示,將所述請求響應資訊返回至所述客戶端,其中,所述後端伺服器的唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述客戶端的唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC;其中,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 A network load balancing method, characterized in that it includes: receiving preset traffic scheduling rules sent by a control device, and unique path indication information of a back-end server in the second type of network; and a back-end server sent from a client In the server access request, obtain the unique path indication information of the client in the first type of network; according to the indication of the unique path indication information of the back-end server, send the back-end server access request to the At least one back-end server selected by the preset traffic scheduling rule; receiving request response information returned by the back-end server, and returning the request response information according to the instructions of the client's unique path indication information To the client, wherein the unique path indication information of the back-end server exists only in the first type of network where the client is located and the second type of network where each back-end server is located, so The unique path indication information of the client only exists in the first type of network where the client is located and the second type of network where each back-end server is located. The first type of network and the second type of network At least one of the networks is a virtual private network VPC; wherein the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC. 根據請求項1所述的方法,其中,還包括:按照多個後端應用伺服器的唯一路徑指示資訊,相應訪問多個後端伺服器;對訪問的後端伺服器進行運行狀態檢查,針對狀態異 常的後端伺服器,在對應的唯一路徑指示資訊上標記異常標識;所述異常標識用於指示暫停發送所述後端伺服器訪問請求至後端伺服器。 The method according to claim 1, which further includes: correspondingly accessing multiple back-end servers according to the unique path indication information of the multiple back-end application servers; checking the running status of the accessed back-end servers, aiming at State different The normal back-end server marks an abnormality identifier on the corresponding unique path indication information; the abnormality identifier is used to instruct to suspend sending the back-end server access request to the back-end server. 根據請求項1所述的方法,其中,在所述從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊的步驟之前,所述方法還包括:識別所述客戶端所處的第一類網路的網路類型。 The method according to claim 1, wherein, in the back-end server access request sent from the client, before the step of obtaining the unique path indication information of the client in the first type of network, the method It also includes: identifying the network type of the first type of network where the client is located. 根據請求項3所述的方法,其中,所述從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊的步驟包括:針對所述第一類網路的網路類型,從所述後端伺服器訪問請求中解封出所述第一類網路的網路標識資訊和所述客戶端的地址標識資訊,並產生所述客戶端的唯一路徑指示資訊。 The method according to claim 3, wherein, in the back-end server access request sent from the client, the step of obtaining the unique path indication information of the client in the first type of network includes: The network type of a type of network, the network identification information of the first type of network and the address identification information of the client are unsealed from the back-end server access request, and the unique of the client is generated Path indication information. 根據請求項3所述的方法,其中,所述將所述請求響應資訊返回至所述客戶端的步驟包括:針對所述第一類網路的網路類型,封裝所述請求響應資訊並發送至所述客戶端。 The method according to claim 3, wherein the step of returning the request response information to the client includes: encapsulating the request response information for the network type of the first type of network and sending it to The client. 根據請求項1所述的方法,其中,在所述從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊的步驟之前,所述方法還包括:接收並保存多個客戶端向所述控制設備註冊時提交的所述客戶端所處的第一類網路的網路標識資訊;在所述從客戶端發送的後端伺服器訪問請求中,獲取 所述客戶端的唯一路徑指示資訊的步驟之後,所述方法還包括:判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 The method according to claim 1, wherein, in the back-end server access request sent from the client, before the step of obtaining the unique path indication information of the client in the first type of network, the method It also includes: receiving and saving the network identification information of the first type of network where the client is located when a plurality of clients register with the control device; accessing the back-end server sent from the client Request, get After the step of indicating information about the unique path of the client, the method further includes: determining whether the network identification information of the first type of network obtained from the back-end server access request is in the stored first type of network Within the range of the network identification information of, if not, return the access denied information to the client. 一種網路的負載均衡控制方法,其特徵在於,包括:從各後端伺服器獲取所述後端伺服器在第二類網路的唯一路徑指示資訊;將預設流量調度規則和所述後端伺服器的唯一路徑指示資訊發送至負載均衡設備,以供所述負載均衡設備根據所述後端伺服器的唯一路徑指示資訊的指示,將客戶端的後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器,以及按照所述客戶端在第一類網路的唯一路徑指示資訊的指示,將所述後端伺服器返回的請求響應資訊返回至所述客戶端,其中,所述後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述客戶端的唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC;其中,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 A network load balancing control method, which is characterized in that it comprises: obtaining the unique path indication information of the back-end server in the second type of network from each back-end server; The unique path indication information of the end server is sent to the load balancing device, so that the load balancing device sends the back-end server access request of the client to the load balancing device according to the indication of the unique path indication information of the back-end server. The at least one back-end server selected by the preset traffic scheduling rule, and the request response information returned by the back-end server is returned to The client, wherein the unique path indication information of the back-end server uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located, and the client's The unique path indication information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located, in the first type of network and the second type of network At least one is a virtual private network VPC; wherein the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC. 根據請求項7所述的方法,其中,還包括:指示所述負載均衡設備將所述負載均衡設備的唯一路徑指示資訊發送至所述後端伺服器,以供所述後端伺服器按照所述負載均衡設備的唯一路徑指示資訊,返回請求響應資訊至所述負載均衡設備。 The method according to claim 7, further comprising: instructing the load balancing device to send the unique path indication information of the load balancing device to the back-end server, so that the back-end server can follow The unique path indication information of the load balancing device returns request response information to the load balancing device. 根據請求項7所述的方法,其中,還包括:接收所述客戶端在註冊時提交的所述客戶端所在的第一類網路的網路標識資訊;將所述第一類網路的網路標識資訊發送至所述負載均衡設備,以供所述負載均衡設備保存並在接收到所述客戶端的後端伺服器訪問請求時,判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 The method according to claim 7, further comprising: receiving the network identification information of the first type of network where the client is located, submitted by the client during registration; The network identification information is sent to the load balancing device for storage by the load balancing device, and when receiving the client's back-end server access request, it determines the first obtained from the back-end server access request Whether the network identification information of the class network is within the range of the saved network identification information of the first class network, if not, return the access denied information to the client. 一種網路交互方法,其特徵在於,包括:根據後端伺服器在第二類網路的唯一路徑指示資訊的指示,將客戶端對後端伺服器的訪問請求,發送到按照預設流量調度規則選擇出的至少一個後端伺服器,所述第二類網路為虛擬私有網路VPC;和/或,按照所述客戶端在第一類網路的唯一路徑指示資訊的指示,將後端伺服器針對客戶端的訪問請求返回的請求響應資訊返回至所述客戶端,所述第一類網路為虛擬私有網路VPC;其中,所述後端伺服器的唯一路徑指示資訊在所述客 戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述客戶端的唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在;其中,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 A network interaction method, which is characterized in that it includes: according to the indication of the unique path indication information of the back-end server in the second type of network, sending the client's access request to the back-end server to the scheduling according to the preset flow At least one back-end server selected by the rule, the second type of network is a virtual private network VPC; and/or, according to the instructions of the client's unique path indication information in the first type of network, the The request response information returned by the end server in response to the client's access request is returned to the client. The first type of network is a virtual private network VPC; wherein the unique path indication information of the back-end server is in the guest The first type of network where the client is located and the second type of network where each back-end server is located uniquely exist, and the unique path indication information of the client is in the type 1 network where the client is located and each The back-end server is uniquely present in the second type of network; wherein, the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC . 一種網路的負載均衡裝置,其特徵在於,包括:預設流量調度規則接收模組,用於接收控制設備發送的預設流量調度規則,以及後端伺服器在第二類網路的唯一路徑指示資訊;資訊獲取模組,用於從客戶端發送的後端伺服器訪問請求中,獲取所述客戶端在第一類網路的唯一路徑指示資訊;後端伺服器訪問請求發送模組,用於根據所述後端伺服器的唯一路徑指示資訊的指示,將所述後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器;請求響應資訊返回模組,用於接收所述後端伺服器返回的請求響應資訊,並按照所述客戶端的唯一路徑指示資訊的指示,將所述請求響應資訊返回至所述客戶端,其中,所述後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述客戶端的唯一路徑指示資訊在所述客戶端所處的 第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC;其中,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 A network load balancing device, which is characterized by comprising: a preset flow scheduling rule receiving module for receiving preset flow scheduling rules sent by a control device, and a unique path of a back-end server in the second type of network Instruction information; an information acquisition module for acquiring the unique path instruction information of the client in the first type of network from the back-end server access request sent by the client; the back-end server access request sending module, It is used to send the back-end server access request to at least one back-end server selected according to the preset traffic scheduling rule according to the instruction of the unique path indication information of the back-end server; request response information The return module is used to receive the request response information returned by the back-end server, and return the request response information to the client according to the instructions of the unique path indication information of the client, where the back The unique path indication information of the end server uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located, and the unique path indication information of the client is located at the client. At The first type of network and the second type of network where each back-end server is located only exists, and at least one of the first type of network and the second type of network is a virtual private network VPC; The unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC. 根據請求項11所述的裝置,其中,還包括:後端伺服器訪問模組,用於按照多個後端應用伺服器的唯一路徑指示資訊,相應訪問多個後端伺服器;運行狀態檢查模組,用於對訪問的後端伺服器進行運行狀態檢查,針對狀態異常的後端伺服器,在對應的唯一路徑指示資訊上標記異常標識;所述異常標識用於指示暫停發送所述後端伺服器訪問請求至後端伺服器。 The device according to claim 11, which further includes: a back-end server access module for correspondingly accessing multiple back-end servers according to the unique path indication information of the multiple back-end application servers; operation status check The module is used to check the running status of the accessed back-end server, and mark the abnormal identifier on the corresponding unique path indication information for the back-end server with abnormal status; the abnormal identifier is used to indicate the suspension of sending the back-end server The end server access request to the back end server. 根據請求項11所述的裝置,其中,還包括:網路類型識別模組,用於識別所述客戶端所處的第一類網路的網路類型。 The device according to claim 11, further comprising: a network type identification module for identifying the network type of the first type of network where the client is located. 根據請求項13所述的裝置,其中,所述資訊獲取模組包括:後端伺服器訪問請求解封子模組,用於針對所述第一類網路的網路類型,從所述後端伺服器訪問請求中解封出所述第一類網路的網路標識資訊和所述客戶端的地址標識資訊,並產生所述客戶端的唯一路徑指示資訊。 The device according to claim 13, wherein the information acquisition module includes: a back-end server access request unblocking sub-module, which is used for the network type of the first type of network, from the back The end server access request unblocks the network identification information of the first type of network and the address identification information of the client, and generates unique path indication information of the client. 根據請求項13所述的裝置,其中,所述請求響應資訊返回模組包括: 請求響應資訊封裝子模組,用於針對所述第一類網路的網路類型,封裝所述請求響應資訊並發送至所述客戶端。 The device according to claim 13, wherein the request response information return module includes: The request response information encapsulation sub-module is used to encapsulate the request response information for the network type of the first type of network and send it to the client. 根據請求項11所述的裝置,其中,還包括:網路標識資訊接收模組,用於接收並保存多個客戶端向所述控制設備註冊時提交的所述客戶端所處的第一類網路的網路標識資訊;所述裝置還包括:網路標識資訊判斷模組,用於判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 The device according to claim 11, further comprising: a network identification information receiving module, configured to receive and save the first type of the client submitted when the multiple clients register with the control device Network identification information of the network; the device further includes: a network identification information judgment module for judging whether the network identification information of the first type of network obtained from the back-end server access request is being stored If not, return access denied information to the client. 一種網路的負載均衡控制裝置,其特徵在於,所述裝置包括:後端伺服器唯一路徑指示資訊獲取模組,用於從各後端伺服器獲取所述後端伺服器在第二類網路的唯一路徑指示資訊;預設流量調度規則發送模組,用於將預設流量調度規則和所述後端伺服器的唯一路徑指示資訊發送至負載均衡設備,以供所述負載均衡設備根據所述後端伺服器的唯一路徑指示資訊的指示,將客戶端的後端伺服器訪問請求,發送到按照所述預設流量調度規則選擇出的至少一個後端伺服器,以及按照所述客戶端在第一類網路的唯一路徑指示資訊的指示,將所述後端伺服器返回的請求響應資訊返 回至所述客戶端,其中,所述後端伺服器的唯一路徑指示資訊在客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述客戶端的唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述第一類網路和所述第二類網路中至少一個為虛擬私有網路VPC;其中,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 A network load balancing control device, characterized in that, the device includes: a back-end server unique path indication information acquisition module, which is used to obtain from each back-end server that the back-end server is in the second type of network The unique path indication information of the road; the preset traffic scheduling rule sending module is used to send the preset traffic scheduling rule and the unique path indication information of the back-end server to the load balancing device for the load balancing device according to According to the indication of the unique path indication information of the back-end server, the client's back-end server access request is sent to at least one back-end server selected according to the preset traffic scheduling rule, and according to the client In the direction of the unique path indication information of the first type of network, return the request response information returned by the back-end server Back to the client, where the unique path indication information of the back-end server uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located, the The unique path indication information of the client only exists in the first type of network where the client is located and the second type of network where each back-end server is located. The first type of network and the second type of network At least one of the paths is a virtual private network VPC; wherein the unique path indication information is generated from the network identification information of the virtual private network VPC where it is located and the address identification information in the virtual private network VPC. 根據請求項17所述的裝置,其中,還包括:發送指示模組,用於指示所述負載均衡設備將所述負載均衡設備的唯一路徑指示資訊發送至所述後端伺服器,以供所述後端伺服器按照所述負載均衡設備的唯一路徑指示資訊,返回請求響應資訊至所述負載均衡設備。 The device according to claim 17, further comprising: a sending instruction module for instructing the load balancing device to send the unique path instruction information of the load balancing device to the back-end server for all The back-end server returns request response information to the load balancing device according to the unique path indication information of the load balancing device. 根據請求項17所述的裝置,其中,還包括:網路標識資訊接收模組,用於接收所述客戶端在註冊時提交的所述客戶端所在的第一類網路的網路標識資訊;網路標識資訊發送模組,用於將所述第一類網路的網路標識資訊發送至所述負載均衡設備,以供所述負載均衡設備保存並在接收到所述客戶端的後端伺服器訪問請求時,判斷從所述後端伺服器訪問請求獲取的第一類網路的網路標識資訊,是否在保存的第一類網路的網路標識資訊的範圍內,若否,則返回拒絕訪問資訊至所述客戶端。 The device according to claim 17, further comprising: a network identification information receiving module, configured to receive the network identification information of the first type of network where the client is located, submitted by the client during registration ; The network identification information sending module is used to send the network identification information of the first type of network to the load balancing device for the load balancing device to save and receive the backend of the client In the server access request, it is determined whether the network identification information of the first type of network obtained from the back-end server access request is within the range of the stored network identification information of the first type of network, if not, Then return the access denied information to the client. 一種網路交互裝置,其特徵在於,包括: 訪問請求發送模組,用於根據後端伺服器在第二類網路的唯一路徑指示資訊的指示,將客戶端對後端伺服器的訪問請求,發送到按照預設流量調度規則選擇出的至少一個後端伺服器,所述第二類網路為虛擬私有網路VPC;和/或,請求響應資訊返回模組,用於按照所述客戶端在第一類網路的唯一路徑指示資訊的指示,將後端伺服器針對客戶端的訪問請求返回的請求響應資訊返回至所述客戶端,所述第一類網路為虛擬私有網路VPC;其中,所述後端伺服器的唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在,所述客戶端的唯一路徑指示資訊在所述客戶端所處的第一類網路以及各後端伺服器所處第二類網路中唯一存在;其中,所述唯一路徑指示資訊由所在虛擬私有網路VPC的網路標識資訊以及在所述虛擬私有網路VPC中的地址標識資訊產生。 A network interactive device, characterized in that it comprises: The access request sending module is used to send the client's access request to the back-end server to the one selected according to the preset traffic scheduling rules according to the indication of the unique path indication information of the back-end server in the second type of network At least one back-end server, the second type of network is a virtual private network VPC; and/or a request response information return module for indicating information according to the unique path of the client in the first type of network To return the request response information returned by the back-end server in response to the client's access request to the client. The first type of network is a virtual private network VPC; wherein, the only path of the back-end server The indication information uniquely exists in the first type of network where the client is located and the second type of network where each back-end server is located, and the unique path indication information of the client is in the first type of network where the client is located A type network and the second type of network where each back-end server is located; wherein, the unique path indication information consists of the network identification information of the virtual private network VPC where it is located and in the virtual private network VPC The address identification information is generated.
TW106103973A 2016-02-16 2017-02-07 Method and device for network load balancing, control and network interaction TWI746506B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610087638.2 2016-02-16
CN201610087638.2A CN107086966B (en) 2016-02-16 2016-02-16 Network load balancing, control and network interaction method and device

Publications (2)

Publication Number Publication Date
TW201737667A TW201737667A (en) 2017-10-16
TWI746506B true TWI746506B (en) 2021-11-21

Family

ID=59615170

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106103973A TWI746506B (en) 2016-02-16 2017-02-07 Method and device for network load balancing, control and network interaction

Country Status (3)

Country Link
CN (1) CN107086966B (en)
TW (1) TWI746506B (en)
WO (1) WO2017140216A1 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109831468A (en) * 2017-11-23 2019-05-31 北京金山云网络技术有限公司 Load-balancing method, device, electronic equipment and storage medium
CN108616456A (en) * 2018-03-20 2018-10-02 北京优帆科技有限公司 A kind of load-balancing method and load equalizer based on VXLAN
CN110324391B (en) * 2018-03-30 2022-03-25 武汉斗鱼网络科技有限公司 Bullet screen server connection method, client and readable storage medium
CN110753072B (en) * 2018-07-24 2022-06-03 阿里巴巴集团控股有限公司 Load balancing system, method, device and equipment
CN110875889B (en) * 2018-09-03 2022-09-27 阿里巴巴集团控股有限公司 Method and device for acquiring path
CN110928637A (en) * 2018-09-19 2020-03-27 阿里巴巴集团控股有限公司 Load balancing method and system
CN109561171B (en) * 2019-01-22 2021-11-16 北京百度网讯科技有限公司 Configuration method and device of virtual private cloud service
CN110336730B (en) * 2019-07-09 2022-01-18 腾讯科技(深圳)有限公司 Network system and data transmission method
CN112995247A (en) * 2019-12-12 2021-06-18 阿里巴巴集团控股有限公司 Method, device and system for transmitting or processing data
CN111371685B (en) * 2020-02-28 2022-06-17 北京百度网讯科技有限公司 Data processing and IPv6 mounting method and device
CN112261095B (en) * 2020-10-12 2023-11-24 国电南瑞科技股份有限公司 Load distribution realization system and method based on two-stage proxy
CN112202918B (en) * 2020-10-16 2023-08-08 深圳乐播科技有限公司 Load scheduling method, device, equipment and storage medium for long connection communication
CN112769776B (en) * 2020-12-27 2023-04-18 百果园技术(新加坡)有限公司 Distributed service response method, system, device and storage medium
CN112968976B (en) * 2021-03-31 2024-02-06 北京奇艺世纪科技有限公司 External network access control system, method, device, equipment and storage medium
CN113746933A (en) * 2021-09-14 2021-12-03 京东科技信息技术有限公司 Method and device for displaying information
CN113992685B (en) * 2021-10-26 2023-09-22 新华三信息安全技术有限公司 Service controller determining method, system and device
CN115412527B (en) * 2022-08-29 2024-03-01 北京火山引擎科技有限公司 Method and device for unidirectional communication between virtual private networks
CN115604272B (en) * 2022-11-30 2023-03-14 苏州浪潮智能科技有限公司 Load balancing method, device, system and system establishing method, device and medium
CN115952007B (en) * 2023-03-09 2023-06-16 杭州银行股份有限公司 Application running method, computing device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137173A (en) * 2010-12-27 2011-07-27 华为技术有限公司 Routing information distributing method, equipment, virtual special network system
CN103491053A (en) * 2012-06-08 2014-01-01 北京百度网讯科技有限公司 UDP load balancing method, UDP load balancing system and UDP load balancing device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10244612A1 (en) * 2002-09-25 2004-04-08 Siemens Ag Process for the transparent exchange of data packets
JP4173401B2 (en) * 2003-05-01 2008-10-29 株式会社エヌ・ティ・ティ・ドコモ Router, address identification information management server
US20140280775A1 (en) * 2013-03-15 2014-09-18 Conrad N. Wood Network Stack and Related Techniques
CN103401800B (en) * 2013-07-31 2016-08-03 杭州华三通信技术有限公司 A kind of balancing link load method and apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137173A (en) * 2010-12-27 2011-07-27 华为技术有限公司 Routing information distributing method, equipment, virtual special network system
CN103491053A (en) * 2012-06-08 2014-01-01 北京百度网讯科技有限公司 UDP load balancing method, UDP load balancing system and UDP load balancing device

Also Published As

Publication number Publication date
CN107086966B (en) 2021-07-27
TW201737667A (en) 2017-10-16
CN107086966A (en) 2017-08-22
WO2017140216A1 (en) 2017-08-24

Similar Documents

Publication Publication Date Title
TWI746506B (en) Method and device for network load balancing, control and network interaction
US11765057B2 (en) Systems and methods for performing end-to-end link-layer and IP-layer health checks between a host machine and a network virtualization device
US11876708B2 (en) Interface-based ACLs in a layer-2 network
US11909636B2 (en) Layer-2 networking using access control lists in a virtualized cloud environment
US11777897B2 (en) Cloud infrastructure resources for connecting a service provider private network to a customer private network
US11777849B2 (en) Multi-customer (multi-tenants) support with hypervisor based bond implementation
US20240031282A1 (en) Layer-2 networking span port in a virtualized cloud environment
US20240121186A1 (en) Layer-2 networking using access control lists in a virtualized cloud environment
US20220197683A1 (en) Mechanism to implement vcn network virtualization in a rack-based switch
US11818043B2 (en) Highly-available host networking with active-active or active-backup traffic load-balancing
US20230032441A1 (en) Efficient flow management utilizing unified logging
US20240095813A1 (en) Console customization for virtual private label clouds
US11929976B2 (en) Virtual network routing gateway that supports address translation for dataplane as well as dynamic routing protocols (control plane)
US20230370371A1 (en) Layer-2 networking storm control in a virtualized cloud environment
US20230396579A1 (en) Cloud infrastructure resources for connecting a service provider private network to a customer private network
EP4272383A1 (en) Layer-2 networking information in a virtualized cloud environment