KR101383905B1 - method and apparatus for processing server load balancing with the result of hash function - Google Patents
method and apparatus for processing server load balancing with the result of hash function Download PDFInfo
- Publication number
- KR101383905B1 KR101383905B1 KR1020120065182A KR20120065182A KR101383905B1 KR 101383905 B1 KR101383905 B1 KR 101383905B1 KR 1020120065182 A KR1020120065182 A KR 1020120065182A KR 20120065182 A KR20120065182 A KR 20120065182A KR 101383905 B1 KR101383905 B1 KR 101383905B1
- Authority
- KR
- South Korea
- Prior art keywords
- server
- hash
- client
- servers
- load balancer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 53
- 238000012545 processing Methods 0.000 title description 4
- 238000003672 processing method Methods 0.000 claims description 27
- 230000004044 response Effects 0.000 claims description 11
- 238000012546 transfer Methods 0.000 claims description 2
- 230000006870 function Effects 0.000 description 78
- 238000010586 diagram Methods 0.000 description 10
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000004043 responsiveness Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1023—Server selection for load balancing based on a hash applied to IP addresses or costs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/101—Server selection for load balancing based on network conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1027—Persistence of sessions during load balancing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/564—Enhancement of application control based on intercepted application data
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
복수의 서버들에 대한 부하 분산을 위하여, 서버 부하 분산 장치는 클라이언트로부터 획득되는 URL(uniform resource locator)에 대하여 해시 소스를 선택하고, 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시킨다. 그리고 해시 함수를 적용하여 획득되는 해시 결과를 토대로 하는 해시값에 따라 복수의 서버들 중에서 하나를 선택하고, 선택된 서버로 클라이언트를 연결시킨다. In order to load balance a plurality of servers, the server load balancer selects a hash source for a uniform resource locator (URL) obtained from a client, and applies a predetermined hash function to the selected hash source. Then, one of the plurality of servers is selected according to the hash value based on the hash result obtained by applying the hash function, and the client is connected to the selected server.
Description
본 발명은 서버 부하를 분산시켜 처리하는 방법 및 그 장치에 관한 것이다. The present invention relates to a method and apparatus for distributing and processing a server load.
서버 부하 분산(server load balancing)은 인터넷 트래픽을 동일한 서비스를 제공하는 복수의 서버들에게 효율적으로 분배하여 서버의 부하를 분산시키는 것으로, 서버의 이용률과 네트워크 대역폭 효율을 증가시킬 수 있다. Server load balancing is to distribute the load of the server by efficiently distributing the Internet traffic to a plurality of servers providing the same service, which can increase the server utilization and network bandwidth efficiency.
도 1은 기존 서버 부하 분산 처리를 나타낸 도이다. 1 is a diagram illustrating a conventional server load balancing process.
레이어(layer)-4 (L4)에서의 서버 부하 분산을 살펴보면, 도 1의 (A)에서와 같이, 부하 분산 장치는 들어오는 패킷에서 L4 계층의 정보인 IP(Internet protocol) 및 포트(port) 정보를 참조하여 해당 패킷을 어느 호스트로 전송할 것인지를 결정한다. Looking at the server load balancing at layer-4 (L4), as shown in (A) of Figure 1, the load balancer is the IP (Internet protocol) and port (port) information, which is the information of the L4 layer in the incoming packet Refer to to determine which host to send the packet to.
또한 레이어-7(L7)에서의 서버 부하 분산을 살펴보면, 도 1의 (B)에서와 같이, 부하 분산 장치는 들어오는 패킷에서 L7 계층의 정보 즉, 패킷내의 페이로드(payload) 정보 (예를 들면, HTTP 헤더 정보)를 참조하여 해당 패킷을 어느 호스트로 전송할지를 결정한다. In addition, referring to server load balancing in Layer-7 (L7), as shown in (B) of FIG. 1, the load balancer includes information of the L7 layer in the incoming packet, that is, payload information (for example, payload information in the packet). HTTP header information) to determine which host to send the packet to.
이와 같이 L7 계층에서는 서버별로 컨텐츠를 구분하여 저장하면서 입력되는 패킷의 페이로드 정보인 HTTP 프로토콜의 도메인, URL(uniform resource locator) 경로, 파일 확장자 등을 토대로 서버 부하 분산을 수행하며, L4 계층에서는 서버에 대한 IP와 포트 정보를 토대로 서버 부하 분산을 수행하는 NAT(network address translation) 기법이 많이 사용된다.As such, the L7 layer performs server load balancing based on the domain, URL (uniform resource locator) path, file extension, etc. of the HTTP protocol, which is the payload information of the input packet, while storing the content separately for each server. Network address translation (NAT) is widely used to perform server load balancing based on IP and port information.
최근에는 네트워크를 통한 컨텐츠의 용량이 커지고 그 양 또한 매우 증가하고 있으며, 서버마다 전체 컨텐츠를 보관해야 하는 DAS(direct attached storage) 구조로는 컨텐츠 관리에 대한 한계가 있다. 이에 따라 원본 서버에만 컨텐츠를 보관하고 서비스 서버들은 서비스에 필요한 컨텐츠를 필요할 때만 원본 서버에 요청하여 제공받아서 클라이언트에 제공하는 방식을 사용하였다. 에지 서버(edge server와 스토리지 사이의 연결은 NAS(network attached storage), SAN(storage area network), HTTP, 캐시 파일 시스템 등의 방법이 사용되었다. Recently, the capacity of content through the network has increased and its amount has also increased, and there is a limit on content management with a direct attached storage (DAS) structure in which the entire content must be stored for each server. Accordingly, the content is kept only in the original server, and the service servers use the method of requesting the original server and providing it to the client only when needed for the service. The connection between the edge server and storage has been used such as network attached storage (NAS), storage area network (SAN), HTTP, and cache file system.
그러나 컨텐츠의 개수와 용량이 늘어나면 에지 서버의 로컬 디스크와 메모리에서 히트(Hit)나는 컨텐츠가 줄어들고, 다시 원본 서버에 해당 컨텐츠를 요청하는 빈도가 증가하면서 에지 서버의 부하를 증가시킨다. 또한 에지 서버에서 원본 서버로 컨텐츠를 요청하는 건수가 증가하면서 원본 서버도 부하가 증가하게 된다.However, as the number and capacity of content increases, hitting content decreases in the edge server's local disks and memory, and the load on the edge server increases as the frequency of requesting the content from the origin server increases. In addition, as the number of requests for content from the edge server to the origin server increases, the origin server loads increase.
본 발명이 해결하고자 하는 과제는 보다 효율적으로 서버의 부하를 분산시킬 수 있는 방법 및 그 장치를 제공하는 것이다. The problem to be solved by the present invention is to provide a method and apparatus capable of more efficiently balancing the load of the server.
본 발명의 특징에 따른 서버 부하 분산 처리 방법은, 서버 부하 분산 장치가 클라이언트로부터 URL(uniform resource locator)를 수신하는 단계; 상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계; 상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하는 단계; 상기 서버 부하 분산 장치가 상기 해시값에 대응하여 복수의 서버들 중에서 하나를 선택하는 단계; 및 상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계를 포함한다. In accordance with an aspect of the present invention, a server load balancing processing method includes: receiving, by a server load balancer, a uniform resource locator (URL) from a client; The server load balancer selecting a hash source from the URL and applying a preset hash function to the selected hash source; Obtaining, by the server load balancer, a hash value obtained by dividing a hash result obtained by applying the hash function by the total number of servers as a hash value; Selecting, by the server load balancer, one of a plurality of servers in response to the hash value; And the server load balancer connecting the client to the selected server.
또한 본 발명의 다른 특징에 따른 서버 부하 분산 처리 방법은, 서버 부하 분산 장치가 클라이언트로부터 URL(uniform resource locator)를 수신하는 단계; 상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계; 상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수보다 큰 제1 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하는 단계; 상기 서버 부하 분산 장치가 상기 해시값에 대응하여 복수의 서버들 중에서 하나를 선택하는 단계; 및 상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계를 포함한다. In addition, the server load balancing processing method according to another aspect of the present invention, the server load balancer receiving a uniform resource locator (URL) from the client; The server load balancer selecting a hash source from the URL and applying a preset hash function to the selected hash source; Obtaining, by the server load balancer, a hash value obtained by dividing a hash result obtained by applying the hash function by a first number greater than the total number of servers; Selecting, by the server load balancer, one of a plurality of servers in response to the hash value; And the server load balancer connecting the client to the selected server.
여기서 상기 선택하는 단계는 획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블로부터, 상기 해시값에 대응하는 서버를 선택할 수 있다. 그리고 상기 서버 매핑 테이블에서 상기 획득 가능한 나머지 값들을 나누는 각 그룹의 범위가 서버의 총 개수에 따라 가변될 수 있다. The selecting may include selecting the server corresponding to the hash value from a server matching table in which the remaining obtainable values are divided into a plurality of groups, and one server is matched with each of the remaining value groups. The range of each group dividing the remaining obtainable values from the server mapping table may vary according to the total number of servers.
본 발명의 또 다른 특징에 따른 서버 부하 분산 처리 방법은, 서버 부하 분산 장치가 클라이언트로부터 URL(uniform resource locator)를 수신하는 단계; 상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계; 상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 해시값으로 획득하는 단계; 상기 서버 부하 분산 장치가 상기 해시값을 토대로, 히스토리 테이블로부터 상기 해시값에 대하여 이전에 선택되었던 서버가 있는지를 확인하는 단계; 상기 해시값에 대하여 이전에 선택되었던 서버가 있는 경우, 상기 선택되었던 서버를 복수의 서버들 중에서 선택하는 단계; 및 상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계를 포함한다. Server load balancing processing method according to another aspect of the invention, the server load balancer receiving a uniform resource locator (URL) from the client; The server load balancer selecting a hash source from the URL and applying a preset hash function to the selected hash source; Acquiring, by the server load balancer, a hash result obtained by applying the hash function as a hash value; Checking, by the server load balancer, whether there is a server previously selected for the hash value from a history table, based on the hash value; If there is a server previously selected for the hash value, selecting the selected server from a plurality of servers; And the server load balancer connecting the client to the selected server.
여기서, 상기 해시값에 대하여 이전에 선택되었던 서버가 없는 경우, 상기 복수의 서버들의 부하 상태를 고려하여 하나의 서버를 선택하는 단계를 더 포함할 수 있다. 한편 상기 부하 상태를 고려하여 하나의 서버를 선택하는 단계는 상기 복수의 서버들 각각의 부하 및 송출 트래픽을 토대로 하는 서버별 가용 용량을 확인하는 단계; 및 상기 서버별 가용 용량들 중에서 가장 높은 값을 가지는 서버를 선택하는 단계를 포함할 수 있다. Here, when there is no server previously selected for the hash value, the method may further include selecting one server in consideration of a load state of the plurality of servers. On the other hand, the step of selecting a server in consideration of the load condition comprises the steps of checking the available capacity for each server based on the load and outgoing traffic of each of the plurality of servers; And selecting a server having the highest value among the available capacities of the servers.
이러한 특징을 가지는 서버 부하 분산 처리 방법들에서, 상기 선택된 서버에 대한 서비스 가능 여부를 판단하는 단계를 더 포함할 수 있으며, 이 경우, 상기 클라이언트를 연결시키는 단계는 상기 선택된 서버가 서비스 가능한 경우에만 상기 클라이언트를 선택된 서버로 연결시킬 수 있다. In server load balancing processing methods having such a feature, the method may further include determining whether the service is available for the selected server, and in this case, connecting the client may be performed only when the selected server is serviceable. You can connect the client to the selected server.
또한 상기 판단하는 단계는 상기 서버의 상태가 서비스 불가능한 상태인 경우에 서비스가 가능하지 않은 것으로 판단할 수 있으며, 상기 서비스 불가능한 상태는 서버가 물리적/소프트웨어적으로 장애가 발생해서 서비스를 수행할 수 없는 시스템 장애 상태; 서버가 물리적/소프트웨어적으로 정상 동작이지만 이미 서비스 가용용량 전체를 서비스하고 있어서 추가적인 서비스가 어려운 서버 과부하 상태; 서버가 물리적/소프트웨어적으로 정상 동작이지만 서비스 대상이 되는 컨텐츠가 존재하지 않아서 서비스를 할 수 없는 상태 중 적어도 하나일 수 있다. The determining may include determining that the service is not available when the server is in an unserviceable state. The unserviceable state is a system in which a server fails physically and software to perform a service. Disorder status; Server overload condition, in which the server is physically / softwarely operational, but additional services are difficult because the service is already serving the entire service available capacity; Although the server is physically / softwarely operating, it may be at least one of a state in which a service cannot be performed because there is no content to be serviced.
한편 상기 선택된 서버가 서비스 가능하지 않은 경우, 상기 해시 함수를 적용할 새로운 해시 소스를 생성하는 단계를 더 포함할 수 있으며, 상기 새로인 생성된 해시 소스에 대하여 해시 함수를 적용하여 획득되는 해시값을 토대로 서버 선택이 이루어질 수 있다. Meanwhile, when the selected server is not serviceable, the method may further include generating a new hash source to which the hash function is to be applied, and applying a hash value obtained by applying a hash function to the newly generated hash source. Server selection can be made based on this.
또한 상기 새로운 해시 소스를 생성하는 단계는 상기 해시 함수를 적용하여 획득되는 해시 결과를 새로운 해시 소스로 생성할 수 있다. The generating of the new hash source may generate a hash result obtained by applying the hash function as a new hash source.
또한 상기 새로운 해시 소스를 생성하는 단계는 상기 해시 함수를 적용하여 획득되는 해시 결과와 상기 URL을 포함하는 문자열을 새로운 해시 소스로 사용할 수 있다. The generating of the new hash source may use a hash result obtained by applying the hash function and a string including the URL as a new hash source.
한편 상기 클라이언트를 연결시키는 단계는 상기 클라이언트로부터의 URL로부터 획득되는 파라미터를 상기 선택된 서버로 제공하면서 상기 파라미터에 대응하는 컨텐츠를 요청하는 단계; 및 상기 서버로부터 상기 요청에 대응하는 응답을 수신하여 상기 클라이언트로 전달하는 단계를 포함할 수 있다. The step of connecting the client may include requesting content corresponding to the parameter while providing a parameter obtained from the URL from the client to the selected server; And receiving a response corresponding to the request from the server and delivering the response to the client.
본 발명의 또 다른 특징에 따른 장치는, 복수의 서버들에 대한 부하 분산을 수행하는 서버 부하 분산 장치이며, 클라이언트로부터 URL(uniform resource locator)를 수신하는 데이터 획득부; 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 함수 적용부; 상기 해시 함수를 적용하여 획득되는 해시 결과를 토대로 하는 해시값에 따라 상기 복수의 서버들 중에서 하나를 선택하는 서버 선택부; 및 상기 선택된 서버로 상기 클라이언트를 연결시키는 전달부를 포함한다. In accordance with still another aspect of the present invention, an apparatus includes a server load balancer configured to perform load balancing on a plurality of servers, and a data obtainer configured to receive a uniform resource locator (URL) from a client; A function application unit which selects a hash source from the URL and applies a preset hash function to the selected hash source; A server selector configured to select one of the plurality of servers according to a hash value based on a hash result obtained by applying the hash function; And a delivery unit connecting the client to the selected server.
상기 서버 선택부는 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수로 나누어서 얻어지는 나머지 값을 해시값으로 서버선택에 사용할 수 있다. The server selector may use the remaining value obtained by dividing the hash result obtained by applying the hash function by the total number of servers as the hash value to select the server.
또한 상기 서버 선택부는 획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블을 더 포함하고, 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수보다 큰 제1 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하고, 상기 서버 매칭 테이블로부터 상기 해시값에 대응하는 서버를 선택할 수 있다. The server selecting unit may further include a server matching table that divides the remaining obtainable values into a plurality of groups and matches one server with respect to each of the remaining value groups, and applies a hash function obtained by applying the hash function to the server. The remaining value obtained by dividing by the first number greater than the total number of may be obtained as a hash value, and a server corresponding to the hash value may be selected from the server matching table.
또한 상기 서버 선택부는 테이블은 각 해시값별로 선택된 서버의 정보를 포함하는 서버 선택 히스토리가 저장되어 있는 히스토리 테이블을 더 포함하고, 상기 해시 함수를 적용하여 획득되는 해시 결과를 해시값으로 하고, 상기 히스토리 테이블로부터 상기 해시값에 대하여 이전에 선택되었던 서버를 선택할 수 있다. 여기서 상기 서버 선택부는 상기 히스토리 테이블에 해시값에 대하여 이전에 선택되었던 서버가 없는 경우, 상기 복수의 서버들에 대하여 각각 부하 및 송출 트래픽을 토대로 하는 서버별 가용 용량을 확인하고, 상기 서버별 가용 용량들 중에서 가장 높은 값을 가지는 서버를 선택할 수 있다. The server selecting unit may further include a history table in which a server selection history including information on a server selected for each hash value is stored, and the hash result obtained by applying the hash function as a hash value. From the table it is possible to select a server that was previously selected for the hash value. In this case, when there is no server previously selected for a hash value in the history table, the server selecting unit checks the available capacity of each server based on load and outgoing traffic for the plurality of servers, and the available capacity of each server. You can choose the server with the highest value among them.
한편 상기 함수 적용부는 상기 선택된 서버가 서비스 불가능한 상태인 경우, 상기 해시 함수를 적용하여 획득되는 해시 결과를 새로운 해시 소스로 사용하고 상기 해시 함수를 적용하여 새로운 해시 결과를 획득할 수 있다. Meanwhile, when the selected server is in an unserviceable state, the function applying unit may use a hash result obtained by applying the hash function as a new hash source and obtain a new hash result by applying the hash function.
또한 상기 함수 적용부는 상기 선택된 서버가 서비스 불가능한 상태인 경우, 상기 해시 함수를 적용하여 획득되는 해시 결과와 상기 URL 전체 또는 일부를 포함하는 문자열을 새로운 해시 소스로 사용하고 상기 해시 함수를 적용하여 새로운 해시 결과를 획득할 수 있다. The function application unit may use a hash result obtained by applying the hash function and a string including all or part of the URL as a new hash source and apply the hash function when the selected server is in an unserviceable state. The result can be obtained.
또한 상기 함수 적용부는 상기 URL로부터 해시 소스를 선택하는 경우, 프로토콜, 도메인 또는 IP, 폴더, 파일명, 파라미터 중 적어도 하나의 파라미터를 사용할 수 있다. The function application unit may use at least one of a protocol, a domain or an IP, a folder, a file name, and a parameter when selecting a hash source from the URL.
또한 상기 서버 선택부에서 클라이언트의 IP의 ISP, 지역, 국가 정보를 서버 선택에 이용할 수 있다. In addition, the server selection unit may use the ISP, region, and country information of the client IP for server selection.
이러한 본 발명의 특징에 따른 장치에서, 상기 선택된 서버는 물리적으로 한대 또는 한대 이상의 서버를 포함하는 서버그룹일 수 있다. In the apparatus according to this aspect of the invention, the selected server may be a server group that physically includes one or more servers.
본 발명의 실시 예에 따르면, 컨텐츠의 개수와 용량이 늘어나도 서버에 대한 부하를 효과적으로 분산시킬 수 있다. 또한 서버와 스토리지의 효율성을 극대화시킬 수 있다.According to an embodiment of the present invention, even if the number and capacity of the contents increase, the load on the server can be effectively distributed. In addition, server and storage efficiency can be maximized.
도 1은 기존 서버 부하 분산 처리를 나타낸 도이다.
도 2는 본 발명의 실시 예에 따른 서버 부하 분산 장치의 구조를 나타낸 도이다.
도 3은 해시값에 따른 서버 매칭 관계를 나타낸 예시도이다.
도 4는 본 발명의 실시 예에 따른 해시 함수 적용 결과를 나타낸 예시도이다.
도 5는 본 발명의 제1 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
도 6은 본 발명의 제2 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
도 7은 본 발명의 제3 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
도 8은 본 발명의 제4 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
도 9는 본 발명의 실시 예에 따른 서버 연결 과정을 나타낸 예시도이다.
도 10은 본 발명의 실시 예에 따른 다른 서버 연결 과정을 나타낸 예시도이다. 1 is a diagram illustrating a conventional server load balancing process.
2 is a diagram illustrating a structure of a server load balancer according to an exemplary embodiment of the present invention.
3 is an exemplary diagram illustrating a server matching relationship based on a hash value.
4 is an exemplary view showing a result of applying a hash function according to an embodiment of the present invention.
5 is a flowchart illustrating a server load balancing processing method according to a first embodiment of the present invention.
6 is a flowchart of a server load balancing processing method according to a second embodiment of the present invention.
7 is a flowchart illustrating a server load balancing processing method according to a third embodiment of the present invention.
8 is a flowchart illustrating a server load balancing processing method according to a fourth embodiment of the present invention.
9 is an exemplary diagram illustrating a server connection process according to an embodiment of the present invention.
10 is an exemplary diagram illustrating another server connection process according to an embodiment of the present invention.
아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시 예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.
명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성 요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. Throughout the specification, when an element is referred to as "comprising ", it means that it can include other elements as well, without excluding other elements unless specifically stated otherwise.
이하, 도면을 참조하여 본 발명의 실시 예에 따른 서버 부하 분산 처리 방법 및 그 장치에 대하여 설명한다. Hereinafter, a server load balancing processing method and apparatus thereof according to an embodiment of the present invention will be described with reference to the drawings.
본 발명의 실시 예에서는 클라이언트로부터 입력되는 HTTP(hyper text transfer protocol) URL(uniform resource locator)에 대한 해싱 방법을 사용하여 서버 부하를 분산처리한다. 해싱 방법은 입력되는 패킷의 HTTP URL에 대하여 해시(hash) 함수를 적용하여 해시 결과를 획득하는 것으로, 본 발명의 실시 예에서는 해시 결과에 따른 해시값을 토대로 서버에 대한 부하 분산을 수행한다. In an embodiment of the present invention, a server load is distributed by using a hashing method for a hyper text transfer protocol (HTTP) uniform resource locator (URL) input from a client. The hashing method obtains a hash result by applying a hash function to an HTTP URL of an input packet. In an embodiment of the present invention, load balancing is performed on a server based on a hash value according to the hash result.
HTTP URL은 HTTP 네트워크 상에서 자원이 어디 있는지 알려주기 위한 규약을 나타내며, 다음과 같은 구조로 이루어진다. An HTTP URL represents a protocol for telling where a resource is on an HTTP network. It has the following structure:
HTTP URL = 프로토콜(Protocol) + 도메인 네임(domain name) + 파일 경로(file path) + 파라미터(get parameter)HTTP URL = Protocol + domain name + file path + get parameter
여기서 프로토콜은 “ http://”이며, 호스트 네임이 도메인 네임을 나타낸다. 그리고 파일 경로는 폴더(folder)와 파일 네임(file name)을 포함하며, 폴더와 파일 네임은 “/”에 의하여 구분된다. 파라미터(get parameter)는 “?”으로 시작하며, 복수의 파라미터를 나타낼 때는 각 파라미터를 “&”으로 구분한다. The protocol here is “http: //”, where the hostname represents the domain name. The file path includes a folder and a file name, and the folder and file name are separated by “/”. Get parameters start with "?", And each parameter is separated by "&" when representing multiple parameters.
이러한 구조로 이루어지는 HTTP URL은 예를 들어, "http://vod.domain.com/vod/sample.mp4?id=1234”와 같이 나타낼 수 있다. 여기서 "http"는 프로토콜을 나타내고, "vod.domain.com”은 도네인 네임을 나타내며, "/vod/sample.mp4”은 파일 경로를 나타내고, “id=1234”은 파라미터를 나타낸다. An HTTP URL having such a structure may be expressed as, for example, "http://vod.domain.com/vod/sample.mp4?id=1234", where "http" represents a protocol and "vod. domain.com ”represents a domain name,“ /vod/sample.mp4 ”represents a file path, and“ id = 1234 ”represents a parameter.
본 발명의 실시 예에서는 위와 같은 구조로 이루어지는 URL에 대하여 해시 함수(또는 해시 알고리즘(hash algorithm))을 적용하여 해시값을 획득한다. 해시 함수는 임의 데이터로부터 일종의 짧은 "전자 지문"을 만들어 내는 것으로, 데이터를 자르고 치환하거나 위치를 바꾸는 등의 방법을 사용해 결과를 생성하며, 이러한 결과를 “해시 결과”라고 한다. 본 발명의 실시 예에서는 해시 결과를 토대로 서버 선택을 위한 해시값(hash value)을 획득한다. 해시 함수는 결정론적으로 작동하는데, 두 해시 결과가 다르다면 그 해시 결과에 대한 원래 데이터도 달라야 하며, 이것의 역은 성립하지 않는다. 해시 함수의 신뢰성은 얼마나 적은 해시 충돌 즉, 서로 다른 두 데이터의 해시 결과가 같은 경우가 발생하느냐로 결정되는데, 해시 충돌이 많이 날수록 서로 다른 데이터를 구별하기 어려워지고 데이터를 검색하는 비용이 증가될 수 있다. In an embodiment of the present invention, a hash function (or a hash algorithm) is applied to a URL having the above structure to obtain a hash value. Hash functions create a kind of short "electronic fingerprint" from arbitrary data, and produce results using methods such as cutting, replacing, or repositioning the data. These results are called "hash results." In an embodiment of the present invention, a hash value for server selection is obtained based on the hash result. The hash function works deterministically, if the two hash results are different, the original data for that hash result must be different, and vice versa. The reliability of a hash function is determined by how many hash collisions, that is, when the two different data have the same hash result. The more hash collisions, the more difficult it is to distinguish different data and the cost of retrieving the data can increase. have.
해시 함수는 기본적으로 두 개의 해시 결과가 다르다면 원래의 입력 데이터들도 다르다는 결정론적 특징을 가지지만, 단사 함수는 아니다. 동일한 해시 결과를 가진다면, 원래의 입력 데이터들도 같다는 것을 시사하지만 보장해 주지는 않는다. 원래 데이터의 한 비트만 바뀌더라도 해시 함수의 성질로 인해 해시 결과는 크게 달라진다. A hash function basically has a deterministic characteristic that the original input data is different if the two hash results are different, but it is not a singular function. If they have the same hash result, it suggests that the original input data are the same, but does not guarantee. Even if only one bit of the original data is changed, the hash result is very different due to the nature of the hash function.
도 2는 본 발명의 실시 예에 따른 서버 부하 분산 장치의 구조를 나타낸 도이다. 2 is a diagram illustrating a structure of a server load balancer according to an exemplary embodiment of the present invention.
첨부한 도 2에서와 같이, 본 발명의 실시 예에 따른 서버 부하 분산 장치(1)는 복수의 클라이언트(2)와 네트워크를 통하여 연결되며, 또한 복수의 서버(3)들과 연결된다. As shown in FIG. 2, the
서버 부하 분산 장치(1)는 클라이언트(2)로부터 입력되는 데이터에 대하여 해시 함수를 적용하여 해시 결과를 획득하고, 해시 결과에 따라 획득되는 해시값을 토대로 복수의 서버들 중에서 하나의 서버로 클라이언트를 연결시킨다. The
이를 위하여, 서버 부하 분산 장치(1)는 클라이언트(2)로부터 데이터를 획득하는 데이터 획득부(11), 획득된 데이터에 대하여 해시 함수를 적용하는 함수 적용부(12), 해시 함수 적용 결과로 획득되는 해시값을 토대로 서버를 선택하는 서버 선택부(13), 선택된 서버로 클라이언트의 요청을 전달하는 연결부(14)를 포함한다. To this end, the
함수 적용부(12)는 획득된 데이터로부터 해시 함수를 적용할 부분을 선택하고, 선택된 부분에 대하여 해시 함수를 적용하여 그 결과를 획득한다. 그리고 그 결과를 해시값으로 사용하거나 결과에 대한 소정의 처리를 수행하여 획득되는 값을 해시값으로 사용한다. The
한편 해시값에 따라 서버를 선택하기 위하여, 복수의 서버(3)들에 대하여 소정의 해시값이 매칭된다. 도 3은 해시값에 따른 서버 매칭 관계를 나타낸 예시도이다. 첨부한 도 3에 예시된 바와 같이, 해시값이 예를 들어, ①, ②, ③이라고 하면, "①,"의 해시값에 대응하여 하나의 서버(31)가 매칭되고, "②,"의 해시값에 대응하여 하나의 서버(32)가 매칭되며, "③"의 해시값에 대응하여 하나의 서버(33)가 매칭될 수 있다. 이러한 상태에서 클라이언트(2)로부터 입력되는 데이터로부터 획득되는 해시값에 따라 복수의 서버(31∼33)들 중에서 하나의 서버가 선택된다. 입력되는 데이터가 동일한 URL인 경우에는 항상 동일한 해시값이 획득되므로, 동일한 서버로 클라이언트의 요청이 전달될 수 있다. Meanwhile, in order to select a server according to the hash value, a predetermined hash value is matched with respect to the plurality of
서버 부하 분산 장치(1)에서, 입력되는 데이터에 대하여 해시 함수를 적용하는 것을 예로 들어 설명한다. In the
도 4는 본 발명의 실시 예에 따른 해시 함수 적용 결과를 나타낸 예시도이다. 4 is an exemplary view showing a result of applying a hash function according to an embodiment of the present invention.
클라이언트(2)로부터 전달되는 패킷으로부터 추출한 데이터 즉, 입력 데이터 URL이 도 4의 (A)에서와 같이, “http://vod.domain.com/vod/sample.mp4?id=1234”로 동영상 컨텐츠에 관련된 것이라고 가정하자. 네트워크에서 복수의 서버 예를 들어, N(여기서 N은 양의 정수)개의 서버들(서버[0]~서버[N-1]) 가 있는 상태에서, 해시 함수 적용에 따라 선택되는 서버는 서버[(int) 해시함수(HTTP URL) % N ]일 수 있다. The data extracted from the packet transmitted from the
입력 데이터 “http://vod.domain.com/vod/sample.mp4?id-1234”에서 파일 경로 “vod/sample.mp4”에 대하여 해시 함수를 적용한다. 입력 데이터(URL)에서 해시 함수가 적용되는 부분을 “해시 소스”라고 명명한다. 여기서는 해시 소스로서 URL의 파일 경로가 사용되지만 이에 한정되지는 않는다. 예를 들어, 필요에 따라 HTTP URL의 도메인 네임 등의 다른 URL 구성 요소와 사용자 에이전트(user agent)와 같은 HTTP 헤더의 정보를 부가적으로 이용할 수도 있다. The hash function is applied to the file path “vod / sample.mp4” from the input data “http://vod.domain.com/vod/sample.mp4?id-1234”. The portion of the input data (URL) that the hash function applies to is called the "hash source". The file path of the URL is used here as the hash source, but is not limited thereto. For example, other URL components such as the domain name of the HTTP URL and the information of the HTTP header such as the user agent may be additionally used as necessary.
입력되는 URL의 파일 경로 “vod/sample.mp4”에 대하여 해시 함수 “MD5" 를 적용하면 도 4의 (B)에서와 같이, 32자의 문자열이 획득된다. 한편 해시 함수로서 “CRC32”를 사용하는 경우에는 도 4의 (C)와 같이 10자리의 정수가 획득될 수 있다. 해시 함수로 “CRC32”를 사용하여 “3756904710”의 해시 결과를 획득하고, 획득한 해시 결과를 서버의 개수 “N”으로 나누면 “3756904710%4=2”의 값 즉, 해시값이 획득된다. 이와 같이 획득된 해시값 “2”에 따라 서버[2]가 선택될 수 있다. When the hash function “MD5” is applied to the file path “vod / sample.mp4” of the input URL, 32 character strings are obtained as shown in Fig. 4B, while using “CRC32” as the hash function. In this case, an integer of 10 digits can be obtained as shown in (C) of Fig. 4. A hash result of “3756904710” is obtained using “CRC32” as a hash function, and the obtained hash result is the number of servers “N”. In this case, a hash value of “3756904710% 4 = 2”, that is, a hash value is obtained, and a server [2] may be selected according to the hash value “2” thus obtained.
본 발명의 실시 예에서는 입력 데이터 URL에 대하여 해시 함수를 적용하여 획득되는 해시값을 토대로 클라이언트의 요청을 전달할 서버를 선택하며, 선택된 서버로 클라이언트의 요청을 전달한다. 여기서 서버로 클라이언트의 요청을 전달하는 것은 서버와 클라이언트를 연결시키는 모든 관련 동작을 포함하며, 이에 대해서는 추후에 보다 구체적으로 설명하기로 한다.In an embodiment of the present invention, a server to which a client's request is delivered is selected based on a hash value obtained by applying a hash function to an input data URL, and the client's request is transmitted to the selected server. The forwarding of the client's request to the server here includes all the related operations of connecting the server and the client, which will be described in more detail later.
다음에는 본 발명의 실시 예에 따른 서버 부하 분산 처리 방법에 대하여 설명한다. Next, a server load balancing processing method according to an embodiment of the present invention will be described.
여기서는 N개의 서버(또는 서버 그룹)가 있으며, 각 서버들에 대하여 S[0]~S[N-1]의 해시값이 각각 할당되어 있는 것으로 가정하고, 각 실시 예들에 따른 서버 부하 분산 처리 방법에 대하여 설명한다. In this example, it is assumed that there are N servers (or server groups), and that hash values S [0] to S [N-1] are assigned to each server, respectively. It demonstrates.
먼저, 본 발명의 제1 실시 예에 따른 서버 부하 분산 처리 방법에 설명한다. 도 5는 본 발명의 제1 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다. First, a server load balancing processing method according to a first embodiment of the present invention will be described. 5 is a flowchart illustrating a server load balancing processing method according to a first embodiment of the present invention.
서버 부하 분산 장치(1)는 클라이언트(2)로부터 입력 데이터 즉, HTTP 연결 요청을 수신한다(S100). HTTP 연결 요청으로부터 URL을 획득하고, 획득된 URL로부터 해시 함수를 적용할 해시 소스를 획득한다(S110). 여기서는 해시 소스로서 URL의 파일 경로가 사용되지만, 반드시 이것에 한정되는 것은 아니다. The
서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 해시 결과를 획득하고(S120), 획득된 해시 결과로부터 서버 선택을 위한 해시값을 획득한다. The
본 발명의 제1 실시 예에서는 해시 소스에 대하여 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수인 “N”으로 나누어서 얻어지는 나머지 값을 해시값으로 이용한다(S130). 예를 들어, S0, S1, S2, S3의 서버가 존재하고, "http://vod.domain.com/vod/sample.mp4?id=1234”의 URL로부터 획득한 해시 소스 “/vod/sample.mp4”에 대하여 해시 함수(예를 들어, CRC32)를 적용하여 "3756904710”해시 결과를 획득한 경우, 해시 결과 “3756904710”를 “4”로 나누어서 얻어지는 나머지 값 “2”가 해시값으로 사용된다. In the first embodiment of the present invention, the hash value obtained by dividing the hash result obtained by applying the hash function to the hash source by “N” which is the total number of servers is used as the hash value (S130). For example, servers S0, S1, S2, and S3 exist, and the hash source “/ vod / sample obtained from the URL of“ http://vod.domain.com/vod/sample.mp4?id=1234 ”. If the "3756904710" hash result is obtained by applying a hash function (e.g. CRC32) for .mp4 ", the remaining value" 2 "obtained by dividing the hash result" 3756904710 "by" 4 "is used as the hash value. .
서버 부하 분산 장치(1)는 복수의 서버들 중에서 획득한 해시값에 대응하는 하나의 서버를 선택하고(S140). 선택된 서버로 클라이언트 요청을 전달한다(S150). 예를 들어, 해시값 “2”에 대응하는 서버 S2가 선택되고, 선택된 서버 S2로 클라이언트를 연결시킨다. The
이러한 본 발명의 제1 실시 예에서는 간단하게 서버들의 부하를 효율적으로 분산시킬 수 있다. In the first embodiment of the present invention, it is possible to efficiently distribute the load of the servers simply.
다음에는 본 발명의 제2 실시 예에 따른 서버 부하 분산 처리 방법에 설명한다. 도 6은 본 발명의 제2 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다. Next, a server load balancing processing method according to a second embodiment of the present invention will be described. 6 is a flowchart of a server load balancing processing method according to a second embodiment of the present invention.
본 발명의 제2 실시 예에서는 서버(또는 서버 그룹)의 수가 변경되어도 용이하게 서버 부하 분산을 수행할 수 있는 방법을 제공한다. The second embodiment of the present invention provides a method for easily performing server load balancing even when the number of servers (or server groups) is changed.
위에 기술된 제1 실시 예와 동일하게, 도 6에 도시되어 있듯이, 서버 부하 분산 장치(1)는 클라이언트(2)로부터 HTTP 연결 요청을 수신하고, URL로부터 해시 소스를 획득하며, 획득된 URL로부터 해시 함수를 적용하여 해시값을 획득한다(S200~S220).As in the first embodiment described above, as shown in FIG. 6, the
서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 해시값을 획득한다. 본 발명의 제2 실시 예에서는 해시 소스에 대하여 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수인 “N”보다 충분히 큰 수인 “M(여기서 M은 양의 정수)”로 나누어서 얻어지는 나머지 0~M-1 값을 해시값으로 이용한다(S230). 특히 본 발명의 제2 실시 예에서는 서버의 총 개수인 N보다 큰 M으로 해시 결과를 나누어서 얻어지는 나머지 값들을 사용함으로, 나머지 값들이 서버의 총 개수보다 많다. 이에 따라 서버 부하 분산 장치(1)는 서버 매칭 테이블을 사용하여 획득 가능한 나머지 값들에 서버들을 미리 대응시키고, 위의 단계(S230)를 통하여 얻어지는 해시값을 토대로 서버 매칭 테이블로부터 서버를 선택할 수 있다. 즉, 획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 테이블을 미리 생성하고, 이후 해시값을 토대로 서버 매칭 테이블로부터 서버를 선택한다. 예를 들어, S0, S1, S2, S3개의 서버가 있고, M=100인 경우, 다음 표 1과 같은 서버 매칭 테이블이 사용될 수 있다. The
(해시결과 % M)Rest of the value
(Hashed% M)
(또는 서버 그룹)server
(Or server group)
표 1과 같이, 획득 가능한 나머지값들 0~100을 4개의 그룹(제1 그룹(0~24), 제2 그룹(25~49), 제3 그룹(50~74), 그리고 제4 그룹(75~99))으로 나누고, 각 그룹에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블을 사용할 수 있다. 이러한 서버 매칭 테이블은 서버 부하 분산 장치(1)의 서버 선택부(13)에 저장되어 관리될 수 있다. As shown in Table 1, the remaining values 0 to 100 that can be obtained are divided into four groups (first group (0 to 24), second group (25 to 49), third group (50 to 74), and fourth group ( 75 to 99)), and a server matching table in which one server is matched with each group may be used. The server matching table may be stored and managed in the
위의 제1 실시 예서와 같이, 해시 소스 “/vod/sample.mp4’”에 대하여 해시 함수를 적용하여 “3756904710”의 해시 결과를 획득한 경우, 해시 결과 "3756904710”를 M인 “100”으로 나누어서 얻어지는 나머지 값 “10”이 해시값으로 사용된다. As in the first embodiment, when the hash result of “3756904710” is obtained by applying the hash function to the hash source “/vod/sample.mp4 '”, the hash result “3756904710” is set to “100” of M. The remaining value "10" obtained by dividing is used as the hash value.
서버 부하 분산 장치(1)는 위에 기술된 바와 같이 미리 설정된 서버 매칭 테이블을 이용하여 복수의 서버들 중에서 획득한 해시값에 대응하는 하나의 서버를 선택하고(S240). 선택된 서버로 클라이언트 요청을 전달한다(S250). 예를 들어, 표 1과 같은 서버 매칭 테이블로부터 해시값 “10”에 대응하는 서버 S0가 선택되고, 선택된 서버 S0로 클라이언트를 연결시킨다. The
이러한 본 발명의 실시 예에 따르면 서버의 개수가 변경되는 경우에도 적응적으로 서버 부하 분산을 효율적으로 수행할 수 있다. 구체적으로, 서버(또는 서버그룹)의 개수가 N개인 상태에서 M개로 서버(또는 서버그룹)을 변경할 경우에도 서버 매칭 테이블을 변환하는 것으로 서버 부하를 효과적으로 분산시킬 수 있다. 예를 들어, 서버의 개수가 N개이고, N개의 서버의 로컬 저장소(예를 들어, 디스크, 메모리 등)에 컨텐츠가 캐싱(cashing) 되어 있고 제1 실시 예와 같은 방법으로 서버 부하 분산을 수행하고 있는 상태에서, 서버의 개수가 M개로 변경되면 기존 서버들에 캐싱된 컨텐츠를 다시 캐싱해야 하는 문제가 발생할 수 있으며, 이 경우에는 클라이언트 요청에 대한 처리가 지연될 수 있다. According to the embodiment of the present invention, even if the number of servers is changed, it is possible to efficiently perform server load balancing. In detail, even when the number of servers (or server groups) is changed from N to M, the server load may be effectively distributed by converting the server matching table. For example, the number of servers is N, the content is cached in local storage (for example, disk, memory, etc.) of the N servers, and server load balancing is performed in the same manner as in the first embodiment. If the number of servers is changed to M, there may be a problem of re-cached the content cached in the existing servers, in which case the processing of the client request may be delayed.
그러나 본 발명의 제2 실시 예에 따르면 서버의 총 개수가 변경되어도 서버 매칭 테이블에서 서버에 매칭되는 나머지 값들의 범위를 조정하면 된다. However, according to the second embodiment of the present invention, even if the total number of servers is changed, the range of the remaining values matched to the server in the server matching table may be adjusted.
표 1과 같은 서버 매칭 테이블이 유지 및 관리되고 있는 상태에서, 서버의 개수가 5개로 증가되었다고 가정하자. 이 경우에는 다음 표 2와 같이 서버 매칭 테이블을 변경할 수 있다. Assume that the number of servers is increased to five while the server matching table shown in Table 1 is maintained and managed. In this case, the server matching table can be changed as shown in Table 2 below.
(해시결과 % M)Rest of the value
(Hashed% M)
(또는 서버 그룹)server
(Or server group)
70~74, 95~9920-24, 45-49,
70 ~ 74, 95 ~ 99
서버의 개수가 3개로 감소되는 경우에도, 다음 표 3과 같이 서버 매칭 테이블을 변경할 수 있다. Even when the number of servers is reduced to three, the server matching table may be changed as shown in Table 3 below.
(해시결과 % M)Rest of the value
(Hashed% M)
(또는 서버 그룹)server
(Or server group)
이와 같이 본 발명의 실시 예에 따르면 사용되는 서버들의 개수에 따라 서버 매칭 테이블에서 각 서버에 매칭되는 나머지 값들의 범위를 조절할 수 있으며, 서버의 개수가 변경되는 경우에도 적응적인 서버 부하 분산 처리가 가능하다.As described above, according to the embodiment of the present invention, the range of the remaining values matched to each server in the server matching table can be adjusted according to the number of servers used, and adaptive server load balancing processing is possible even when the number of servers is changed. Do.
다음에는 본 발명의 제3 실시 예에 따른 서버 부하 분산 처리 방법에 설명한다. 도 7은 본 발명의 제3 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다. Next, a server load balancing processing method according to a third embodiment of the present invention will be described. 7 is a flowchart illustrating a server load balancing processing method according to a third embodiment of the present invention.
위에 기술된 제1 실시 예와 동일하게, 도 7에 도시되어 있듯이, 서버 부하 분산 장치(1)는 클라이언트(2)로부터 HTTP 연결 요청을 수신하고, URL로부터 해시 소스를 획득하며, 획득된 URL로부터 해시 함수를 적용하여 해시값을 획득한다(S300~S320).As in the first embodiment described above, as shown in FIG. 7, the
서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 해시값을 획득하고, 획득한 해시값에 대하여 기존에 선택된 서버가 있으면 해당 서버를 선택하고, 획득한 해시값에 대하여 기존에 선택된 서버가 없으면 서버의 부하 상태를 고려하여 임의 서버를 선택한다. 이를 위하여, 본 발명의 제3 실시 예에서는 서버 선택 히스토리를 저장하는 히스토리 테이블을 저장 및 관리한다. 서버 선택 히스토리는 해시값별로 기존에 선택되었던 서버들 정보를 포함한다. 예를 들어, 서버 부하 분산 장치(1)의 서버 선택부(13)가 히스토리 테이블을 저장 및 관리할 수 있으며, 히스토리 테이블은 데이터베이스 형태로 구현될 수 있다. The
본 발명의 실시 예에 따른 히스토리 테이블은 다음 표 4와 같을 수 있다. The history table according to an embodiment of the present invention may be as Table 4 below.
Hash result
(또는 서버 그룹)server
(Or server group)
표 4에 예시된 바와 같이, 본 발명의 실시 예에 따른 히스토리 테이블은 해시 소스에 대하여 해시 함수를 적용하여 획득되는 해시 결과에 대응하여 선택되었던 서버가 저장된다. 여기서는 해시 결과가 서버 선택을 위한 해시값으로 사용된다. As illustrated in Table 4, the history table according to an embodiment of the present invention stores a server that has been selected corresponding to a hash result obtained by applying a hash function to a hash source. Here the hash result is used as the hash value for the server selection.
예를 들어, S0, S1, S2, S3의 서버가 존재하고, "http://vod.domain.com/vod/sample.mp4?id=1234”의 URL로부터 획득한 해시 소스 “/vod/sample.mp4’”에 대하여 해시 함수(예를 들어, CRC32)를 적용하여 "3756904710”해시 결과를 획득한 경우, 해시 결과 “3756904710”를 토대로 히스토리 테이블로부터 선택된 서버가 있는지를 확인한다. 표 4와 같이 히스토리 테이블로부터 해시 결과“3756904710”에 대응하여 서버 S4가 선택되었던 히스토리를 확인한다. 이후 서버 S4가 입력된 클라이언트 요청을 전달받을 서버로 선택된다. For example, servers S0, S1, S2, and S3 exist, and the hash source “/ vod / sample obtained from the URL of“ http://vod.domain.com/vod/sample.mp4?id=1234 ”. If a "3756904710" hash result is obtained by applying a hash function (e.g. CRC32) for .mp4 '", check whether there is a server selected from the history table based on the hash result" 3756904710 ". As shown in Table 4, the history table from which the server S4 was selected corresponding to the hash result “3756904710” is checked from the history table. Thereafter, the server S4 is selected as a server to receive the input client request.
이와 같은 과정을 토대로, 서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 획득한 해시 결과를 해시값으로 사용하면서, 히스토리 테이블로부터 해시값에 대응하여 선택되었던 서버가 있는지를 확인한다(S330, S340). Based on this process, the
확인 결과, 히스토리 테이블에 현재 획득한 해시값에 대응하여 기존에 선택되었던 서버가 있는 경우에는 해당 서버를 선택한다(S350). 반면, 히스토리 테이블에 해시값에 대응하여 기존에 선택된 서버가 없는 경우에, 서버 부하 분산 장치(1)는 각 서버들의 부하 상태를 고려하여 하나의 서버를 선택한다(S360).As a result of the check, if there is a server previously selected corresponding to the currently obtained hash value in the history table, the corresponding server is selected (S350). On the other hand, if there is no server previously selected corresponding to the hash value in the history table, the
여기서 서버의 부하 상태는 각 서버들의 부하 및 송출 트래픽을 고려한 가용요량을 나타낸다. 서버의 부하 상태를 관리하기 위하여, 서버 부하 분산 장치(1)는 서버 가용용량 데이터베이스를 포함할 수 있다. 이러한 서버 가용용량 데이터베이스는 다음 표 5와 같은 구조로 이루어질 수 있다. In this case, the load state of the server represents available capacity considering loads and outgoing traffic of each server. In order to manage the load status of the server, the
(또는 서버 그룹)server
(Or server group)
서부 부하 분산 장치(1)는 서버 가용용량 데이터베이스로부터 각 서버들의 부하 상태를 체크하고, 가용용량이 가장 높은 값을 가지는 서버를 선택한다. 예를 들어, S0, S1, S2, S3의 서버들 중에서 현재 가용용량이 제일 높은 서버 S1을 선택할 수 있다(S370). 그리고 서버 부하 분산 장치(1)는 선택된 서버에 대한 히스토리를 히스토리 테이블에 저장한다. 즉, 현재 획득한 해시값에 대응하여 서버의 부하 상태에 따라 선택된 서버를 히스토리 테이블에 대응하여 새로이 저장시킨다. The
이후, 서버 부하 분산 장치(1)는 선택된 서버로 클라이언트 요청을 전달한다(S380). Thereafter, the
이러한 본 발명의 제3 실시 예에 따르면, 클라이언트 요청에 따른 기존의 서버 선택 히스토리를 이용함으로써, 각 서버의 저장소에 캐싱되어진 컨텐츠를 최대한 활용할 수 있으며, 클라어인트 요청에 대한 응답성을 향상시킬 수 있다. According to the third embodiment of the present invention, by using the existing server selection history according to the client request, it is possible to maximize the content cached in the storage of each server, and to improve the responsiveness to the client request. have.
또한 기존 서버 선택 히스토리가 없는 경우에도, 각 서버들의 가용용량을 기준으로 서버를 선택하여 클라이언트 요청을 처리함으로써, 특정 서버(또는 서버그룹)로만 부하가 몰리는 현상을 최소화할 수 있다. In addition, even if there is no existing server selection history, by selecting a server based on the available capacity of each server to process a client request, it is possible to minimize the load on a specific server (or server group).
다음에는 본 발명의 제4 실시 예에 따른 서버 부하 분산 처리 방법에 설명한다. 도 8은 본 발명의 제4 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다. Next, a server load balancing processing method according to a fourth embodiment of the present invention will be described. 8 is a flowchart illustrating a server load balancing processing method according to a fourth embodiment of the present invention.
본 발명의 제4 실시 예에 따른 서버 부하 분산 처리 방법은, 클라이언트 요청에 대응하여 선택된 서버로 클라이언트를 바로 연결시키지 않고, 선택된 서버에 대한 서비스 가능 여부를 판단하여 클라이언트를 연결시킬 수 있다. In the server load balancing processing method according to the fourth embodiment of the present invention, the client may be connected by determining whether the service is available to the selected server without directly connecting the client to the selected server in response to the client request.
위에 기술된 실시 예들에 따라 선택된 서버가 서비스가 불가능한 상태일 수 있다. 몇가지 예를 들면, 첫째, 서버가 물리적/소프트웨어적으로 장애가 발생해서 서비스를 수행할 수 없는 시스템 장애 상태일 수 있다. 둘째, 서버가 물리적/소프트웨어적으로 정상 동작이지만 이미 서비스 가용용량 전체를 서비스하고 있어서 추가적인 서비스가 어려운 서버 과부하 상태일 수 있다. 마지막으로, 서버가 물리적/소프트웨어적으로 정상 동작이지만 서비스 대상이 되는 컨텐츠가 존재하지 않아서 서비스를 할 수 없는 경우일 수 있다.According to the above-described embodiments, the selected server may be in a service-unavailable state. Some examples are: First, a server may be in a system failure state that is physically and / or software-failed and unable to perform service. Second, although the server is physically / softwarely operating normally, additional services may be difficult due to already serving the entire service available capacity. Lastly, the server may be physically / softwarely operated, but the service may not be performed because the content to be serviced does not exist.
따라서 본 발명의 제4 실시 예에 따른 서버 부하 분산 장치(1)는 위에 기술된 바와 같은 서비스 불가능한 상태를 판단해서, 선택된 서버가 서비스 불가능한 상태인 경우에는 다른 서버를 추가적으로 선택할 수 있다. Therefore, the
위에 기술된 제1 실시 예와 동일하게, 도 8에 도시되어 있듯이, 서버 부하 분산 장치(1)는 클라이언트(2)로부터 HTTP 연결 요청을 수신하고, URL로부터 해시 소스를 획득하며, 획득된 URL로부터 해시 함수를 적용하여 해시값을 획득한다(S400~S420).As in the first embodiment described above, as shown in FIG. 8, the
서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 해시값을 획득하고(S430), 획득한 해시값을 토대로 하나의 서버를 선택한다(S440). 여기서 서버를 선택하는 방법은 위에 기술된 제1 실시 예 내지 제3 실시 예에 따른 방법 중 하나의 방법이 사용될 수 있다. The
서버 부하 분산 장치(1)는 선택된 서버에 대하여 서비스 가능 여부를 판단한다(S450). 선택된 서버가 위에 기술된 바와 같은 서비스 불가능한 상태에 해당하지 않는 경우에는 서비스 가능한 상태로 판단하고, 선택된 서버로 클라이언트 요청을 전달한다(S460, S470). The
반면, 선택된 서버가 위에 기술된 바와 같은 서비스 불가능한 상태 중 하나에 해당하면 서비스가 가능하지 않은 것으로 판단하고, 다시 서버 선택을 수행한다. 이를 위하여, 서버 부하 분산 장치(1)는 해시 함수를 적용할 해시 소스를 다시 생성한다(S480). On the other hand, if the selected server corresponds to one of the unserviceable states as described above, it is determined that the service is not available, and server selection is performed again. To this end, the
구체적으로 단계(S420)에서 해시 함수를 적용하여 획득한 이전 해시 결과 또는 이전 해시 결과를 포함하는 문자열을 해시 함수를 적용할 새로운 해시 소스로 사용한다. 그리고 해시 함수를 재귀적으로 처리한다. 예를 들어, 이전 해시 결과가 “Hash(URL)”이라고 하면, 이전 해시 결과를 해시 소스로 하여 해시 함수가 적용됨으로써, “Hash(Hash(URL))”의 해시 결과가 획득될 수 있다. In more detail, the previous hash result obtained by applying the hash function in step S420 or a string including the previous hash result is used as a new hash source to which the hash function is applied. And recursively handle hash functions. For example, if the previous hash result is “Hash (URL)”, a hash function of “Hash (Hash (URL))” may be obtained by applying a hash function using the previous hash result as a hash source.
그리고 새로이 획득된 해시 결과에 따른 해시값을 토대로 서버를 선택한다. 이 때, 새로이 선택된 서버도 서비스 불가능한 상태인 경우에는 다시 새로운 해시 소스를 생성하고 이를 토대로 서버를 선택하는 서버 선택 과정을, 서비스 가능한 서버가 선택될 때까지 반복적으로 수행할 수 있다. 이러한 경우에는 예를 들어, 다음과 같은 수학식을 토대로 해시 소스 생성 과정이 반복적으로 수행될 수 있다. (n 가능한 서버가 선택될 때까지의 반복횟수) The server is selected based on the hash value according to the newly obtained hash result. In this case, when the newly selected server is also in an unserviceable state, a server selection process of creating a new hash source again and selecting a server based on this may be repeatedly performed until a serviceable server is selected. In this case, for example, the hash source generation process may be repeatedly performed based on the following equation. (number of iterations until n possible servers are selected)
이러한 수학식 1을 토대로, Based on
1차 해시 결과: Hash(URL)Primary Hash Result: Hash (URL)
2차 해시 결과: Hash(Hash(URL))Second hash result: Hash (Hash (URL))
3차 해시 결과: Hash(Hash(Hash(URL)))Third hash result: Hash (Hash (Hash (URL)))
…...
n차 해시 결과: Hash(Hash(URL,n-1))nth hash result: Hash (Hash (URL, n-1))
와 같은 형태의 해시 결과 생성이 수행되고, 생성된 해시 결과를 토대로 하는 서버 선택 과정이 수행될 수 있다. A hash result generation in the form of, may be performed, and a server selection process based on the generated hash result may be performed.
한편, 새로운 해시 소스 생성시에, 이전 해시 결과와 클라이언트로부터 획득한 URL을 포함하는 문자열을 해시 소스로 사용하여 해시 결과를 획득할 수 있다. 예를 들어, 이전 해시 결과 “Hash(URL)”과 “URL”을 포함하는 해시 소스를 해시 함수에 적용하여, “Hash(Hash(URL)+URL)”의 해시 결과를 획득할 수 있다. 이러한 해시 소스 생성은 상대적으로 해시 결과의 범위가 다른 해시 함수에 비하여 적은 해시 함수를 사용하는 경우나, 1차적으로 해시 함수를 적용한 경우와는 다른 값을 획득하고자 하는 경우에 사용될 수 있지만, 이에 한정되는 것은 아니다. Meanwhile, when generating a new hash source, a hash result may be obtained using a string including a previous hash result and a URL obtained from a client as a hash source. For example, a hash source including the previous hash result “Hash (URL)” and “URL” may be applied to the hash function to obtain a hash result of “Hash (Hash (URL) + URL)”. Such a hash source generation can be used when a hash function has a relatively smaller range of hash results than other hash functions, or when a hash value is obtained differently from when a hash function is first applied. It doesn't happen.
이러한 해시 소스 생성 과정은 예를 들어, 다음과 같은 수학식을 토대로 반복적으로 수행될 수 있다. (n 가능한 서버가 선택될 때까지의 반복횟수) This hash source generation process may be repeatedly performed based on, for example, the following equation. (number of iterations until n possible servers are selected)
이러한 수학식 2를 토대로,Based on
1차 해시 결과: Hash(URL)Primary Hash Result: Hash (URL)
2차 해시 결과: Hash(Hash(URL)+URL)Second hash result: Hash (Hash (URL) + URL)
3차 해시 결과: Hash(Hash(Hash(URL)+URL)+URL)Third Hash Result: Hash (Hash (Hash (URL) + URL) + URL)
… ...
n차 해시 결과 : Hash(Hash(URL,n-1)+URL)nth hash result: Hash (Hash (URL, n-1) + URL)
와 같은 형태의 해시 소스 및 해시 결과 생성이 반복적으로 수행될 수 있다. The hash source and hash result generation in the form of may be performed repeatedly.
이외에도, 상기 URL에 대한 해시 결과에 추가적으로 클라이언트 IP를 서버선택에 반영을 하면, ISP, 국가, 지역별로 구분되는 부한 분산을 할 수 있다. In addition, if the client IP is additionally reflected in the server selection in addition to the hash result for the URL, it is possible to divide the load by ISP, country and region.
다음에는 위에 기술된 바와 같은 본 발명의 실시 예에 따른 서버 부하 분산 처리 방법에서, 선택된 서버로 클라이언트의 요청을 전달하여 클라이언트를 서버로 연결시키는 과정에 대하여 보다 구체적으로 설명한다. Next, in the server load balancing processing method according to an embodiment of the present invention as described above, a process of connecting the client to the server by transmitting the client's request to the selected server will be described in more detail.
도 9는 본 발명의 실시 예에 따른 서버 연결 과정을 나타낸 예시도이다. 9 is an exemplary diagram illustrating a server connection process according to an embodiment of the present invention.
본 발명의 실시 예에 따른 서버 부하 분산 장치(1)는 클라이언트(2)로부터 입력되는 연결 요청 패킷을 수신하고, 수신된 패킷의 목적지 주소를 변경하는 방법으로 클라이언트(2)를 선택된 서버로 연결시킬 수 있다. The
도 9에 예시되어 있듯이, 서버 부하 분산 장치(1)는 L7을 기반으로 하면서, L4 부하 분산 기능을 내장하는 형태로 구현되어, 클라이언트(2)와 서버 부하 분산 장치(1) 사이에 L7로 연결된다. 서버 부하 분산 장치(1)는 복수의 서버들 중에서 선택된 서버(예를 들어, S0)로 클라이언트(2)로부터 입력되는 연결 요청 HTTP URL로부터 획득한 GET 파라미터에 대응하는 컨텐츠를 요청하며, 서버로부터 요청에 대한 응답을 제공받아 클라이언트(2)로 제공한다.As illustrated in FIG. 9, the
이러한 연결 과정에 따르면, 클라이언트(2)는 L7 부하분산 구조에 대해서도 전혀 몰라도 되며, 클라이언트의 HTTP 요청에 대해서 L7 부하 분산 구조를 가지는 서버 부하 분산 장치(1)를 통하여 선택 서버를 통한 응답이 제공된다. 특히, 이러한 연결 과정은 트래픽 규모가 크지 않으며, HTML, 텍스트, 이미지 등의 저용량 컨텐츠를 서비스할 때 보다 효과적으로 이용될 수 있다. According to this connection process, the
도 10은 본 발명의 실시 예에 따른 다른 서버 연결 과정을 나타낸 예시도이다. 10 is an exemplary diagram illustrating another server connection process according to an embodiment of the present invention.
본 발명의 실시 예에 따른 서버 부하 분산 장치(1)는 클라이언트(2)로부터 입력되는 연결 요청 패킷을 수신하고, 클라이언트(2)로 선택된 서버에 대한 도메인 또는 IP 정보를 포함하는 리다이렉션 URL을 제공하여, 클라이언트(2)가 선택된 서버로 연결되도록 한다. The
이러한 연결 과정은 클라이언트(2)가 단순히 TCP에 따라 서버로 페이지를 요청하는 기능만을 수행하는 프로그램이 아니라, HTTP 301/302 리다이렉션(redirection)을 지원하는 경우에 수행될 수 있다. This connection process may be performed when the
클라이언트(2)가 HTTP 301/302 리다이렉션을 지원하는 경우, 서버 부하 분산 장치(2)는 도 10에 예시된 바와 같이, 클라이언트(2)로부터 입력되는 HTTP URL로부터 획득한 해시 소스를 토대로 선택된 서버로 클라이언트를 연결시키기 위하여, 클라이언트(2)로 선택된 서버에 대한 정보를 포함하는 리다이렉션 URL을 제공한다. 클라이언트(2)는 서버 부하 분산 장치(2)로부터 제공되는 리다이렉션 URL에 따라 해당하는 서버로 접속한다. If the
이러한 연결 과정은 트래픽 규모가 매우 크며, 고화질 이미지와 같은 비정형 데이터의 송수신시에 효과적으로 이용될 수 있다. This connection process is very large and can be effectively used for transmitting and receiving unstructured data such as high quality images.
본 발명의 실시 예는 이상에서 설명한 장치 및/또는 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하기 위한 프로그램, 그 프로그램이 기록된 기록 매체 등을 통해 구현될 수도 있으며, 이러한 구현은 앞서 설명한 실시예의 기재로부터 본 발명이 속하는 기술분야의 전문가라면 쉽게 구현할 수 있는 것이다.The embodiments of the present invention are not limited to the above-described apparatuses and / or methods, but may be implemented through a program for realizing functions corresponding to the configuration of the embodiment of the present invention, a recording medium on which the program is recorded And such an embodiment can be easily implemented by those skilled in the art from the description of the embodiments described above.
이상에서 본 발명의 실시 예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, It belongs to the scope of right.
Claims (25)
상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계;
상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하는 단계;
상기 서버 부하 분산 장치가 상기 해시값에 대응하여 복수의 서버들 중에서 하나를 선택하는 단계; 및
상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계
를 포함하는, 서버 부하 분산 처리 방법.Receiving, by the server load balancer, a uniform resource locator (URL) from a client;
The server load balancer selecting a hash source from the URL and applying a preset hash function to the selected hash source;
Obtaining, by the server load balancer, a hash value obtained by dividing a hash result obtained by applying the hash function by the total number of servers as a hash value;
Selecting, by the server load balancer, one of a plurality of servers in response to the hash value; And
The server load balancer connecting the client to the selected server
Including, server load balancing processing method.
상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계;
상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수보다 큰 제1 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하는 단계;
상기 서버 부하 분산 장치가 상기 해시값에 대응하여 복수의 서버들 중에서 하나를 선택하는 단계; 및
상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계
를 포함하는, 서버 부하 분산 처리 방법.Receiving, by the server load balancer, a uniform resource locator (URL) from a client;
The server load balancer selecting a hash source from the URL and applying a preset hash function to the selected hash source;
Obtaining, by the server load balancer, a hash value obtained by dividing a hash result obtained by applying the hash function by a first number greater than the total number of servers;
Selecting, by the server load balancer, one of a plurality of servers in response to the hash value; And
The server load balancer connecting the client to the selected server
Including, server load balancing processing method.
상기 선택하는 단계는
획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블로부터, 상기 해시값에 대응하는 서버를 선택하는, 서버 부하 분산 처리 방법.The method according to claim 2, wherein
The step of selecting
And dividing the remaining obtainable values into a plurality of groups and selecting a server corresponding to the hash value from a server matching table in which one server is matched corresponding to each of the remaining value groups.
상기 서버 매칭 테이블에서 상기 획득 가능한 나머지 값들을 나누는 각 그룹의 범위가 서버의 총 개수에 따라 가변되는, 서버 부하 분산 처리 방법.The method of claim 3, wherein
And the range of each group dividing the obtainable remaining values in the server matching table is varied according to the total number of servers.
상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계;
상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 해시값으로 획득하는 단계;
상기 서버 부하 분산 장치가 상기 해시값을 토대로, 히스토리 테이블로부터 상기 해시값에 대하여 이전에 선택되었던 서버가 있는지를 확인하는 단계;
상기 해시값에 대하여 이전에 선택되었던 서버가 있는 경우, 상기 선택되었던 서버를 복수의 서버들 중에서 선택하는 단계; 및
상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계
를 포함하는, 서버 부하 분산 처리 방법.Receiving, by the server load balancer, a uniform resource locator (URL) from a client;
The server load balancer selecting a hash source from the URL and applying a preset hash function to the selected hash source;
Acquiring, by the server load balancer, a hash result obtained by applying the hash function as a hash value;
Checking, by the server load balancer, whether there is a server previously selected for the hash value from a history table, based on the hash value;
If there is a server previously selected for the hash value, selecting the selected server from a plurality of servers; And
The server load balancer connecting the client to the selected server
Including, server load balancing processing method.
상기 해시값에 대하여 이전에 선택되었던 서버가 없는 경우, 상기 복수의 서버들의 부하 상태를 고려하여 하나의 서버를 선택하는 단계를 더 포함하는, 서버 부하 분산 처리 방법.The method of claim 5, wherein
If there is no server previously selected for the hash value, selecting one server in consideration of the load state of the plurality of servers.
상기 부하 상태를 고려하여 하나의 서버를 선택하는 단계는
상기 복수의 서버들 각각의 부하 및 송출 트래픽을 토대로 하는 서버별 가용 용량을 확인하는 단계; 및
상기 서버별 가용 용량들 중에서 가장 높은 값을 가지는 서버를 선택하는 단계
를 포함하는, 서버 부하 분산 처리 방법.The method of claim 6, wherein
Selecting one server in consideration of the load state
Identifying available capacity for each server based on load and outgoing traffic of each of the plurality of servers; And
Selecting a server having the highest value among the available capacities of the servers
Including, server load balancing processing method.
상기 히스토리 테이블은 각 해시값별로 선택된 서버의 정보를 포함하는 서버 선택 히스토리가 저장되어 있는, 서버 부하 분산 처리 방법.The method according to any one of claims 5 to 7,
And a server selection history including information on a server selected for each hash value.
상기 선택된 서버에 대한 서비스 가능 여부를 판단하는 단계를 더 포함하고,
상기 클라이언트를 연결시키는 단계는 상기 선택된 서버가 서비스 가능한 경우에만 상기 클라이언트를 선택된 서버로 연결시키는, 서버 부하 분산 처리 방법.The method according to any one of the preceding claims.
Determining whether the service is available for the selected server;
The step of connecting the client connects the client to the selected server only if the selected server is serviceable.
상기 판단하는 단계는 상기 서버의 상태가 서비스 불가능한 상태인 경우에 서비스가 가능하지 않은 것으로 판단하며,
상기 서비스 불가능한 상태는
서버가 물리적/소프트웨어적으로 장애가 발생해서 서비스를 수행할 수 없는 시스템 장애 상태;
서버가 물리적/소프트웨어적으로 정상 동작이지만 이미 서비스 가용용량 전체를 서비스하고 있어서 추가적인 서비스가 어려운 서버 과부하 상태; 그리고
서버가 물리적/소프트웨어적으로 정상 동작이지만 서비스 대상이 되는 컨텐츠가 존재하지 않아서 서비스를 할 수 없는 상태
중 적어도 하나인, 서버 부하 분산 처리 방법.The method of claim 9, wherein
The determining may determine that service is not possible when the state of the server is in an unserviceable state.
The out of service state
A system failure state in which a server fails physically and software and cannot perform services;
Server overload condition, in which the server is physically / softwarely operational, but additional services are difficult because the service is already serving the entire service available capacity; And
The server is in normal physical / software operation but cannot be serviced because the content to be serviced does not exist.
Server load balancing processing method.
상기 선택된 서버가 서비스 가능하지 않은 경우, 상기 해시 함수를 적용할 새로운 해시 소스를 생성하는 단계
를 더 포함하고,
상기 새로운 해시 소스에 대하여 해시 함수를 적용하여 획득되는 해시값을 토대로 서버 선택이 이루어지는, 서버 부하 분산 처리 방법.The method of claim 9, wherein
If the selected server is not serviceable, creating a new hash source to apply the hash function to
Further comprising:
And server selection is performed based on a hash value obtained by applying a hash function to the new hash source.
상기 새로운 해시 소스를 생성하는 단계는
상기 해시 함수를 적용하여 획득되는 해시 결과를 새로운 해시 소스로 생성하는, 서버 부하 분산 처리 방법.The method of claim 11, wherein
Generating the new hash source
And generating a hash result obtained by applying the hash function as a new hash source.
상기 새로운 해시 소스를 생성하는 단계는
상기 해시 함수를 적용하여 획득되는 해시 결과와 상기 URL을 포함하는 문자열을 새로운 해시 소스로 사용하는, 서버 부하 분산 처리 방법.The method of claim 11, wherein
Generating the new hash source
And a hash result obtained by applying the hash function and a string including the URL as a new hash source.
상기 클라이언트를 연결시키는 단계는
상기 클라이언트로부터의 URL로부터 획득되는 파라미터를 상기 선택된 서버로 제공하면서 상기 파라미터에 대응하는 컨텐츠를 요청하는 단계; 및
상기 서버로부터 상기 요청에 대응하는 응답을 수신하여 상기 클라이언트로 전달하는 단계
를 포함하는, 서버 부하 분산 처리 방법.The method according to any one of the preceding claims.
The step of connecting the client
Requesting content corresponding to the parameter while providing a parameter obtained from the URL from the client to the selected server; And
Receiving a response corresponding to the request from the server and forwarding the response to the client
Including, server load balancing processing method.
상기 클라이언트를 연결시키는 단계는
상기 선택된 서버의 도메인 또는 IP 정보를 포함하는 리다이렉션 URL을 상기 클라이언트로 제공하는 단계
를 포함하는, 서버 부하 분산 처리 방법.The method according to any one of the preceding claims.
The step of connecting the client
Providing a redirect URL to the client that includes domain or IP information of the selected server
Including, server load balancing processing method.
클라이언트로부터 URL(uniform resource locator)를 수신하는 데이터 획득부;
상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 함수 적용부;
상기 해시 함수를 적용하여 획득되는 해시 결과를 토대로 하는 해시값에 따라 상기 복수의 서버들 중에서 하나를 선택하는 서버 선택부; 및
상기 선택된 서버로 상기 클라이언트를 연결시키는 전달부
를 포함하는, 서버 부하 분산 장치.In a server load balancer that performs load balancing for a plurality of servers,
A data acquisition unit for receiving a uniform resource locator (URL) from a client;
A function application unit which selects a hash source from the URL and applies a preset hash function to the selected hash source;
A server selector configured to select one of the plurality of servers according to a hash value based on a hash result obtained by applying the hash function; And
A transfer unit connecting the client to the selected server
Comprising a server load balancer.
상기 서버 선택부는 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수로 나누어서 얻어지는 나머지 값을 해시값으로 서버선택에 사용하는, 서버 부하 분산 장치.The method of claim 16, wherein
And the server selector uses the remaining value obtained by dividing the hash result obtained by applying the hash function by the total number of servers as the hash value to select the server.
상기 서버 선택부는
획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블을 더 포함하고,
상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수보다 큰 제1 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하고, 상기 서버 매칭 테이블로부터 상기 해시값에 대응하는 서버를 선택하는, 서버 부하 분산 장치.The method of claim 16, wherein
The server selector
Further comprising a server matching table dividing the remaining obtainable values into a plurality of groups and matching one server corresponding to each of the remaining value groups;
A server load is obtained by dividing a hash result obtained by applying the hash function by a first number greater than the total number of servers as a hash value and selecting a server corresponding to the hash value from the server matching table. Dispersing device.
상기 서버 선택부는
테이블은 각 해시값별로 선택된 서버의 정보를 포함하는 서버 선택 히스토리가 저장되어 있는 히스토리 테이블을 더 포함하고,
상기 해시 함수를 적용하여 획득되는 해시 결과를 해시값으로 하고, 상기 히스토리 테이블로부터 상기 해시값에 대하여 이전에 선택되었던 서버를 선택하는, 서버 부하 분산 장치.The method of claim 16, wherein
The server selector
The table further includes a history table in which a server selection history including information of a server selected for each hash value is stored.
And a hash result obtained by applying the hash function as a hash value, and selecting a server previously selected for the hash value from the history table.
상기 서버 선택부는
상기 히스토리 테이블에 해시값에 대하여 이전에 선택되었던 서버가 없는 경우, 상기 복수의 서버들에 대하여 각각 부하 및 송출 트래픽을 토대로 하는 서버별 가용 용량을 확인하고, 상기 서버별 가용 용량들 중에서 가장 높은 값을 가지는 서버를 선택하는, 서버 부하 분산 장치.The method of claim 19, wherein
The server selector
If there is no server previously selected for a hash value in the history table, the available capacity for each server is checked for each of the plurality of servers based on load and outgoing traffic, and the highest value among the available capacity for each server is determined. Selecting a server having a server load balancer.
상기 함수 적용부는
상기 선택된 서버가 서비스 불가능한 상태인 경우, 상기 해시 함수를 적용하여 획득되는 해시 결과를 새로운 해시 소스로 사용하고 상기 해시 함수를 적용하여 새로운 해시 결과를 획득하는, 서버 부하 분산 장치.The method according to any one of claims 16 to 20.
The function application unit
And when the selected server is in an unserviceable state, uses the hash result obtained by applying the hash function as a new hash source and obtains a new hash result by applying the hash function.
상기 함수 적용부는
상기 선택된 서버가 서비스 불가능한 상태인 경우, 상기 해시 함수를 적용하여 획득되는 해시 결과와 상기 URL 전체 또는 일부를 포함하는 문자열을 새로운 해시 소스로 사용하고 상기 해시 함수를 적용하여 새로운 해시 결과를 획득하는, 서버 부하 분산 장치.The method according to any one of claims 16 to 20.
The function application unit
When the selected server is out of service, using a hash result obtained by applying the hash function and a string including all or part of the URL as a new hash source and applying the hash function to obtain a new hash result, Server Load Balancer.
상기 함수 적용부는
상기 URL로부터 해시 소스를 선택하는 경우, 프로토콜, 도메인 또는 IP, 폴더, 파일명, 파라미터 중 적어도 하나의 파라미터를 사용하는 서버 부하 분산 장치.The method according to any one of claims 16 to 20.
The function application unit
And selecting a hash source from the URL, using at least one of a protocol, a domain or an IP, a folder, a file name, and a parameter.
상기 서버 선택부에서
클라이언트의 IP의 ISP, 지역, 국가 정보를 서버 선택에 이용하는, 서버 부하 분산 장치.The method according to any one of claims 16 to 20.
In the server selector
A server load balancer that uses the ISP, region, and country information of the client's IP for server selection.
상기 선택된 서버는
물리적으로 한대 또는 한대 이상의 서버를 포함하는 서버그룹인, 서버 부하 분산 장치.
The method according to any one of claims 16 to 20.
The selected server
A server load balancer, which is a group of servers that physically contains one or more servers.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/358,125 US9525730B2 (en) | 2011-12-19 | 2012-07-18 | Method and apparatus for processing server load balancing by using the result of hash function |
PCT/KR2012/005726 WO2013094837A1 (en) | 2011-12-19 | 2012-07-18 | Method for managing server load distribution by using hash function results, and apparatus for same |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20110137596 | 2011-12-19 | ||
KR1020110137596 | 2011-12-19 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20130070500A KR20130070500A (en) | 2013-06-27 |
KR101383905B1 true KR101383905B1 (en) | 2014-04-17 |
Family
ID=48865298
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020120065182A Active KR101383905B1 (en) | 2011-12-19 | 2012-06-18 | method and apparatus for processing server load balancing with the result of hash function |
Country Status (2)
Country | Link |
---|---|
US (1) | US9525730B2 (en) |
KR (1) | KR101383905B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101837144B1 (en) | 2016-07-06 | 2018-03-09 | 주식회사 코밴 | Method of payment processing and payment processing system performing the same |
Families Citing this family (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8966012B2 (en) * | 2011-08-31 | 2015-02-24 | Metaswitch Networks Ltd | Processing data and operating a communications device |
EP2731040B1 (en) | 2012-11-08 | 2017-04-19 | CompuGroup Medical SE | Computer system for storing and retrieval of encrypted data items, client computer, computer program product and computer-implemented method |
US20150215389A1 (en) * | 2014-01-30 | 2015-07-30 | Salesforce.Com, Inc. | Distributed server architecture |
US9838482B1 (en) * | 2014-12-18 | 2017-12-05 | Amazon Technologies, Inc. | Maintaining client/server session affinity through load balancers |
CA2974204A1 (en) | 2015-01-30 | 2016-08-04 | Calgary Scientific Inc. | Method of providing access to a service in a client-server remote access system |
US9628504B2 (en) * | 2015-03-09 | 2017-04-18 | International Business Machines Corporation | Deploying a security appliance system in a high availability environment without extra network burden |
KR20170029263A (en) * | 2015-09-07 | 2017-03-15 | 한국전자통신연구원 | Apparatus and method for load balancing |
CN106790324B (en) * | 2015-11-20 | 2020-06-16 | 华为技术有限公司 | Content distribution method, virtual server management method, cloud platform and system |
US10404829B2 (en) * | 2016-03-11 | 2019-09-03 | Wipro Limited | Method and system for achieving improved quality of service (QoS) for content delivery in a SDN controller based communication network |
EP3340071B1 (en) | 2016-12-23 | 2021-06-09 | CompuGroup Medical SE | Offline preparation for bulk inserts |
CN106878415B (en) * | 2017-02-15 | 2020-09-01 | 阿里巴巴集团控股有限公司 | Load balancing method and device for data consumption |
US10721719B2 (en) * | 2017-06-20 | 2020-07-21 | Citrix Systems, Inc. | Optimizing caching of data in a network of nodes using a data mapping table by storing data requested at a cache location internal to a server node and updating the mapping table at a shared cache external to the server node |
KR102039570B1 (en) * | 2018-03-05 | 2019-11-01 | 주식회사 더볼터 | P2p ledger for fiat money without cryptocurrency |
CN109361749B (en) * | 2018-10-24 | 2022-03-29 | 华为云计算技术有限公司 | Message processing method, related equipment and computer storage medium |
US11240155B2 (en) * | 2019-03-29 | 2022-02-01 | Intel Corporation | Technologies for network device load balancers for accelerated functions as a service |
CN109995881B (en) * | 2019-04-30 | 2021-12-14 | 网易(杭州)网络有限公司 | Load balancing method and device of cache server |
CN112311876B (en) * | 2020-10-30 | 2022-08-16 | 武汉绿色网络信息服务有限责任公司 | Method and device for determining back-end device of current session through load balancing device |
CN112910981B (en) * | 2021-01-27 | 2022-07-26 | 联想(北京)有限公司 | Control method and device |
CN113572828B (en) * | 2021-07-13 | 2024-04-09 | 壹药网科技(上海)股份有限公司 | System for improving client load balance based on URL grouping granularity |
US12339771B2 (en) | 2021-09-23 | 2025-06-24 | Samsung Electronics Co., Ltd. | Systems and methods for workload distribution across processing units |
US12058203B2 (en) | 2022-12-30 | 2024-08-06 | Stclab. Co., Ltd. | Entry management server, system, method for digital service-based traffic orchestration |
KR102519073B1 (en) * | 2022-12-30 | 2023-04-06 | 주식회사 에스티씨랩 | Entry management server, system and method for traffic orchestration based on digital service |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR970009032A (en) * | 1995-07-20 | 1997-02-24 | 김광호 | Network reconnection method |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100768631B1 (en) | 2001-09-28 | 2007-10-18 | 주식회사 케이티 | Method and device for content routing of content level in content delivery network |
DE60303384T2 (en) * | 2002-06-24 | 2006-08-17 | International Business Machines Corp. | LASTEUS COMPENSATION IN DATA NETWORKS |
US20060064478A1 (en) * | 2004-05-03 | 2006-03-23 | Level 3 Communications, Inc. | Geo-locating load balancing |
US7536481B2 (en) * | 2005-02-25 | 2009-05-19 | Microsoft Corporation | Method and system for re-synchronizing end points when an intermediary detects that the end points may be unsynchronized |
US7774470B1 (en) * | 2007-03-28 | 2010-08-10 | Symantec Corporation | Load balancing using a distributed hash |
US7995584B2 (en) * | 2007-07-26 | 2011-08-09 | Hewlett-Packard Development Company, L.P. | Method and apparatus for detecting malicious routers from packet payload |
CN101409706B (en) | 2007-10-09 | 2011-11-23 | 华为技术有限公司 | A data distribution method, data distribution system and related equipment in an edge network |
US8489750B2 (en) * | 2008-02-28 | 2013-07-16 | Level 3 Communications, Llc | Load-balancing cluster |
US9411653B2 (en) * | 2008-04-11 | 2016-08-09 | Adobe Systems Incorporated | System and method for provisioning and load balancing user accounts on server clusters |
US9071608B2 (en) * | 2008-04-28 | 2015-06-30 | International Business Machines Corporation | Method and apparatus for load balancing in network based telephony application |
JP5396848B2 (en) * | 2008-12-16 | 2014-01-22 | 富士通株式会社 | Data processing program, server device, and data processing method |
JP5288204B2 (en) | 2009-08-10 | 2013-09-11 | 株式会社日立製作所 | Gateway system and control method |
US8842533B2 (en) * | 2010-07-02 | 2014-09-23 | Futurewei Technologies, Inc. | Traffic engineering and server selection for content distribution |
-
2012
- 2012-06-18 KR KR1020120065182A patent/KR101383905B1/en active Active
- 2012-07-18 US US14/358,125 patent/US9525730B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR970009032A (en) * | 1995-07-20 | 1997-02-24 | 김광호 | Network reconnection method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101837144B1 (en) | 2016-07-06 | 2018-03-09 | 주식회사 코밴 | Method of payment processing and payment processing system performing the same |
Also Published As
Publication number | Publication date |
---|---|
US9525730B2 (en) | 2016-12-20 |
US20140337417A1 (en) | 2014-11-13 |
KR20130070500A (en) | 2013-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101383905B1 (en) | method and apparatus for processing server load balancing with the result of hash function | |
US10367907B2 (en) | Content delivery network architecture with edge proxy | |
US11044335B2 (en) | Method and apparatus for reducing network resource transmission size using delta compression | |
US9985927B2 (en) | Managing content delivery network service providers by a content broker | |
US9800539B2 (en) | Request routing management based on network components | |
US8966603B2 (en) | Systems and methods for intercepting and automatically filling in forms by the appliance for single-sign on | |
US8458250B2 (en) | Request routing using network computing components | |
US8521851B1 (en) | DNS query processing using resource identifiers specifying an application broker | |
WO2021253889A1 (en) | Load balancing method and apparatus, proxy device, cache device and serving node | |
US20120102226A1 (en) | Application specific web request routing | |
US11805093B2 (en) | Systems and methods for processing requests for content of a content distribution network | |
WO2013094837A1 (en) | Method for managing server load distribution by using hash function results, and apparatus for same | |
WO2017097092A1 (en) | Method and system for processing cache cluster service | |
KR101131787B1 (en) | Method for updating data stored in cache server, cache server and content delivery system thereof | |
KR101150725B1 (en) | Method for storing data using content server and cache server, content server and content delivery system thereof | |
WO2012174499A2 (en) | Application specific web request routing | |
Weyulu et al. | Exploring The Benefits of In-Band Service Routing | |
HK1232689B (en) | Content delivery network architecture with edge proxy |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20120618 |
|
PA0201 | Request for examination | ||
PG1501 | Laying open of application | ||
E902 | Notification of reason for refusal | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20131022 Patent event code: PE09021S01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20140221 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20140403 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20140403 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration | ||
FPAY | Annual fee payment |
Payment date: 20170406 Year of fee payment: 4 |
|
PR1001 | Payment of annual fee |
Payment date: 20170406 Start annual number: 4 End annual number: 4 |
|
FPAY | Annual fee payment |
Payment date: 20180403 Year of fee payment: 5 |
|
PR1001 | Payment of annual fee |
Payment date: 20180403 Start annual number: 5 End annual number: 5 |
|
FPAY | Annual fee payment |
Payment date: 20190403 Year of fee payment: 6 |
|
PR1001 | Payment of annual fee |
Payment date: 20190403 Start annual number: 6 End annual number: 6 |
|
PR1001 | Payment of annual fee |
Payment date: 20210405 Start annual number: 8 End annual number: 8 |
|
PR1001 | Payment of annual fee |
Payment date: 20220404 Start annual number: 9 End annual number: 9 |
|
PR1001 | Payment of annual fee |
Payment date: 20230403 Start annual number: 10 End annual number: 10 |
|
PR1001 | Payment of annual fee |
Payment date: 20240402 Start annual number: 11 End annual number: 11 |
|
PR1001 | Payment of annual fee |
Payment date: 20250402 Start annual number: 12 End annual number: 12 |