WO2013094837A1 - 해시 함수 결과를 이용한 서버 부하 분산 처리 방법 및 그 장치 - Google Patents

해시 함수 결과를 이용한 서버 부하 분산 처리 방법 및 그 장치 Download PDF

Info

Publication number
WO2013094837A1
WO2013094837A1 PCT/KR2012/005726 KR2012005726W WO2013094837A1 WO 2013094837 A1 WO2013094837 A1 WO 2013094837A1 KR 2012005726 W KR2012005726 W KR 2012005726W WO 2013094837 A1 WO2013094837 A1 WO 2013094837A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
hash
client
servers
applying
Prior art date
Application number
PCT/KR2012/005726
Other languages
English (en)
French (fr)
Inventor
박명순
원태환
Original Assignee
주식회사 솔박스
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020120065182A external-priority patent/KR101383905B1/ko
Application filed by 주식회사 솔박스 filed Critical 주식회사 솔박스
Priority to US14/358,125 priority Critical patent/US9525730B2/en
Publication of WO2013094837A1 publication Critical patent/WO2013094837A1/ko

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Definitions

  • the present invention relates to a method and apparatus for distributing and processing a server load.
  • 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.
  • FIG. 1 is a diagram illustrating a conventional server load balancing process.
  • the load balancer is the IP (Internet protocol) and port (port) information that is the information of the L4 layer in the incoming packet Refer to to determine which host to send the packet to.
  • 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.
  • 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.
  • NAS network attached storage
  • SAN storage area network
  • HTTP HyperText Transfer Protocol
  • cache file system cache file system
  • 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.
  • 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.
  • a uniform resource locator URL
  • 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;
  • 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.
  • 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;
  • URL uniform resource locator
  • the method may further include selecting one server in consideration of a load state of the plurality of servers.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • an apparatus in accordance with still another aspect of the present invention, 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.
  • 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
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the server selection unit may use the ISP, region, and country information of the client IP for server selection.
  • the selected server may be a server group that physically includes one or more servers.
  • the load on the server can be effectively distributed.
  • server and storage efficiency can be maximized.
  • FIG. 1 is a diagram illustrating a conventional server load balancing process.
  • FIG. 2 is a diagram illustrating a structure of a server load balancer according to an exemplary embodiment of the present invention.
  • FIG. 3 is an exemplary diagram illustrating a server matching relationship based on a hash value.
  • FIG. 4 is an exemplary view showing a result of applying a hash function according to an embodiment of the present invention.
  • FIG. 5 is a flowchart illustrating a server load balancing processing method according to a first embodiment of the present invention.
  • FIG. 6 is a flowchart of a server load balancing processing method according to a second embodiment of the present invention.
  • FIG. 7 is a flowchart illustrating a server load balancing processing method according to a third embodiment of the present invention.
  • FIG. 8 is a flowchart illustrating a server load balancing processing method according to a fourth embodiment of the present invention.
  • FIG. 9 is an exemplary diagram illustrating a server connection process according to an embodiment of the present invention.
  • FIG. 10 is an exemplary diagram illustrating another server connection process according to 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.
  • HTTP hyper text transfer protocol
  • URL uniform resource locator
  • the hashing method obtains a hash result by applying a hash function to an HTTP URL of an input packet.
  • load balancing is performed on a server based on a hash value according to the hash result.
  • 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
  • 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.
  • 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.”
  • 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.
  • FIG. 2 is a diagram illustrating a structure of a server load balancer according to an exemplary embodiment of the present invention.
  • the server load balancer 1 is connected to a plurality of clients 2 through a network and also to a plurality of servers 3.
  • the server load balancer 1 obtains a hash result by applying a hash function to data input from the client 2, and sends the client to one server among a plurality of servers based on the hash value obtained according to the hash result.
  • the server load balancer 1 is obtained as a data obtaining unit 11 for obtaining data from the client 2, a function applying unit 12 for applying a hash function to the obtained data, and a result of applying the hash function.
  • the server selector 13 selects a server based on the hash value, and the connection unit 14 transmits a client's request to the selected server.
  • the function applying unit 12 selects a part to which the hash function is applied from the obtained data, and applies a hash function to the selected part to obtain a result.
  • the result is used as a hash value or a value obtained by performing a predetermined process on the result is used as a hash value.
  • 3 is an exemplary diagram illustrating a server matching relationship based on a hash value.
  • the hash value is, for example, 1, 2, 3
  • one server 31 is matched with the hash value of "1", and the hash value of "2".
  • One server 32 may be matched to correspond to the second server 33, and one server 33 may be matched to correspond to a hash value of "3".
  • one server is selected from the plurality of servers 31 to 33 according to the hash value obtained from the data input from the client 2.
  • the client's request can be delivered to the same server.
  • FIG. 4 is an exemplary view showing a result of applying a hash function according to an embodiment of the present invention.
  • the server selected according to the hash function is selected as server [ (int) hash function (HTTP URL)% N].
  • 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.
  • 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.
  • 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.
  • FIG. 5 is a flowchart illustrating a server load balancing processing method according to a first embodiment of the present invention.
  • the server load balancer 1 receives input data, that is, an HTTP connection request from the client 2 (S100). Obtain a URL from the HTTP connection request, and obtains a hash source to apply the hash function from the obtained URL (S110).
  • the file path of the URL is used here as the hash source, but is not necessarily limited thereto.
  • the server load balancer 1 obtains a hash result by applying a hash function preset to a hash source (S120), and obtains a hash value for selecting a server from the obtained hash result.
  • 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).
  • 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. .
  • a hash function e.g. CRC32
  • the server load balancer 1 selects one server corresponding to the hash value obtained from the plurality of servers (S140).
  • the client request is forwarded to the selected server (S150).
  • the server S2 corresponding to the hash value "2" is selected, and the client is connected to the selected server S2.
  • FIG. 6 is a flowchart of a server load balancing processing method according to a second embodiment of the present invention.
  • 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.
  • the server load balancer 1 receives an HTTP connection request from the client 2, obtains a hash source from the URL, and obtains the URL from the obtained URL. By applying a hash function to obtain a hash value (S200 ⁇ S220).
  • the server load balancer 1 obtains a hash value by applying a hash function preset for the hash source.
  • a hash result obtained by applying a hash function to a hash source is divided by “M (where M is a positive integer)”, which is a sufficiently large number than “N”, which is the total number of servers.
  • a value of M-1 is used as a hash value (S230).
  • the second embodiment of the present invention uses the remaining values obtained by dividing the hash result by M which is greater than N, which is the total number of servers, so that the remaining values are larger than the total number of servers.
  • 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 server selector 13 of the server load balancer 1.
  • 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.
  • the server load balancer 1 selects one server corresponding to the hash value obtained from the plurality of servers by using the server matching table preset as described above (S240).
  • the client request is forwarded to the selected server (S250).
  • the server S0 corresponding to the hash value "10" is selected from the server matching table shown in Table 1, and the client is connected to the selected server S0.
  • the server load may be effectively distributed by converting the server matching table.
  • 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.
  • the range of the remaining values matched to the server in the server matching table may be adjusted.
  • the server matching table can be changed as shown in Table 2 below.
  • the server matching table may be changed as shown in Table 3 below.
  • 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.
  • FIG. 7 is a flowchart illustrating a server load balancing processing method according to a third embodiment of the present invention.
  • the server load balancer 1 receives an HTTP connection request from the client 2, obtains a hash source from the URL, and obtains from the obtained URL.
  • Hash values are obtained by applying a hash function (S300 ⁇ S320).
  • the server load balancer 1 obtains a hash value by applying a hash function preset for a hash source, selects a server if there is a server previously selected for the obtained hash value, and selects a corresponding server for the hash value. If no server is selected, the server selects a random server considering the load of the server.
  • the third embodiment of the present invention stores and manages a history table that stores server selection history.
  • the server selection history includes information on servers that have been previously selected for each hash value.
  • the server selector 13 of the server load balancer 1 may store and manage a history table, and the history table may be implemented in a database form.
  • the history table according to an embodiment of the present invention may be as Table 4 below.
  • Hash result Server (or server group) 1546554652 S0 5456446846 S1 3756904710 S2
  • the history table stores a server that has been selected corresponding to a hash result obtained by applying a hash function to a hash source.
  • the hash result is used as the hash value for the server selection.
  • the hash function eg CRC32
  • the server load balancer 1 uses a hash result obtained by applying a hash function preset to a hash source as a hash value, and checks whether there is a server selected from the history table corresponding to the hash value. Check (S330, S340).
  • the server load balancer 1 selects one server in consideration of the load status of each server (S360).
  • the load state of the server represents available capacity considering loads and outgoing traffic of each server.
  • the server load balancer 1 may comprise a server available capacity database.
  • the server available capacity database may be configured as shown in Table 5 below.
  • Table 5 Server (or server group) Usable capacity S0 30 S1 70 S2 30 S3 50
  • the western load balancer 1 checks the load status of each server from the server available capacity database, and selects the server with the highest available capacity. For example, among the servers of S0, S1, S2, and S3, a server S1 having the highest available capacity may be selected (S370).
  • the server load balancer 1 stores a history of the selected server in a history table. That is, the server selected according to the load state of the server corresponding to the currently obtained hash value is newly stored corresponding to the history table.
  • the server load balancer 1 transmits a client request to the selected server (S380).
  • 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.
  • FIG. 8 is a flowchart illustrating a server load balancing processing method according to a 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.
  • the selected server may be in a service-unavailable state.
  • a server may be in a system failure state that is physically and / or software-failed and unable to perform service.
  • the server may be physically / softwarely operated, but the service may not be performed because the content to be serviced does not exist.
  • the server load balancer 1 may determine the non-service state as described above, and additionally select another server when the selected server is in the non-service state.
  • the server load balancer 1 receives an HTTP connection request from the client 2, obtains a hash source from the URL, and obtains from the obtained URL.
  • Hash values are obtained by applying a hash function (S400 to S420).
  • the server load balancer 1 obtains a hash value by applying a hash function preset to a hash source (S430), and selects one server based on the obtained hash value (S440).
  • the method of selecting a server may be one of the methods according to the first to third embodiments described above.
  • the server load balancer 1 determines whether service is possible for the selected server (S450). If the selected server does not correspond to the non-serviceable state as described above, it is determined as a serviceable state and transmits a client request to the selected server (S460 and S470).
  • the server load balancer 1 regenerates a hash source to which the hash function is applied (S480).
  • 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.
  • a hash function of “Hash (Hash (URL))” may be obtained by applying a hash function using the previous hash result as a hash source.
  • the server is selected based on the hash value according to the newly obtained hash result.
  • 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.
  • the hash source generation process may be repeatedly performed based on the following equation. (number of iterations until n possible servers are selected)
  • 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.
  • 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.
  • 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.
  • 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)
  • Hash Hash (Hash (URL, n-1) + URL)
  • the hash source and hash result generation in the form of may be performed repeatedly.
  • 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.
  • FIG. 9 is an exemplary diagram illustrating a server connection process according to an embodiment of the present invention.
  • the server load balancer 1 receives the connection request packet input from the client 2 and connects the client 2 to the selected server by changing a destination address of the received packet. Can be.
  • the server load balancer 1 is implemented in the form of a built-in L4 load balancing function based on L7 to connect L7 between the client 2 and the server load balancer 1. do.
  • the server load balancer 1 requests the content corresponding to the GET parameter obtained from the connection request HTTP URL input from the client 2 to the selected server (for example, S0) among the plurality of servers, and requests from the server.
  • the response to the request is provided to the client (2).
  • connection process the client 2 does not need to know anything about the L7 load balancing structure, and the response through the selection server is provided through the server load balancer 1 having the L7 load balancing structure for the client's HTTP request.
  • this connection process is not large in traffic volume, and can be used more effectively when serving low-volume content such as HTML, text, and images.
  • FIG. 10 is an exemplary diagram illustrating another server connection process according to an embodiment of the present invention.
  • the server load balancer 1 receives a connection request packet input from the client 2, and provides the client 2 with a redirect URL including domain or IP information about the selected server. The client 2 then connects to the selected server.
  • This connection process may be performed when the client 2 supports HTTP 301/302 redirection, not a program that merely performs a function of requesting a page to a server according to TCP.
  • the server load balancer 2 goes to the selected server based on the hash source obtained from the HTTP URL input from the client 2, as illustrated in FIG.
  • a redirect URL containing information about the selected server is provided to the client 2.
  • the client 2 connects to the corresponding server according to the redirection URL provided from the server load balancer 2.
  • This connection process is very large and can be effectively used for transmitting and receiving unstructured data such as high quality images.
  • An embodiment of the present invention is not implemented only through the above-described apparatus and / or method, but may be implemented through a program for realizing a function corresponding to the configuration of the embodiment of the present invention, a recording medium on which the program is recorded, and the like. Such implementations may be readily implemented by those skilled in the art from the description of the above-described embodiments.

Abstract

복수의 서버들에 대한 부하 분산을 위하여, 서버 부하 분산 장치는 클라이언트로부터 획득되는 URL(uniform resource locator)에 대하여 해시 소스를 선택하고, 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시킨다. 그리고 해시 함수를 적용하여 획득되는 해시 결과를 토대로 하는 해시값에 따라 복수의 서버들 중에서 하나를 선택하고, 선택된 서버로 클라이언트를 연결시킨다.

Description

해시 함수 결과를 이용한 서버 부하 분산 처리 방법 및 그 장치
본 발명은 서버 부하를 분산시켜 처리하는 방법 및 그 장치에 관한 것이다.
서버 부하 분산(server load balancing)은 인터넷 트래픽을 동일한 서비스를 제공하는 복수의 서버들에게 효율적으로 분배하여 서버의 부하를 분산시키는 것으로, 서버의 이용률과 네트워크 대역폭 효율을 증가시킬 수 있다.
도 1은 기존 서버 부하 분산 처리를 나타낸 도이다.
레이어(layer)-4(L4)에서의 서버 부하 분산을 살펴보면, 도 1의 (A)에서와 같이, 부하 분산 장치는 들어오는 패킷에서 L4 계층의 정보인 IP(Internet protocol) 및 포트(port) 정보를 참조하여 해당 패킷을 어느 호스트로 전송할 것인지를 결정한다.
또한 레이어-7(L7)에서의 서버 부하 분산을 살펴보면, 도 1의 (B)에서와 같이, 부하 분산 장치는 들어오는 패킷에서 L7 계층의 정보 즉, 패킷내의 페이로드(payload) 정보 (예를 들면, HTTP 헤더 정보)를 참조하여 해당 패킷을 어느 호스트로 전송할지를 결정한다.
이와 같이 L7 계층에서는 서버별로 컨텐츠를 구분하여 저장하면서 입력되는 패킷의 페이로드 정보인 HTTP 프로토콜의 도메인, URL(uniform resource locator) 경로, 파일 확장자 등을 토대로 서버 부하 분산을 수행하며, L4 계층에서는 서버에 대한 IP와 포트 정보를 토대로 서버 부하 분산을 수행하는 NAT(network address translation) 기법이 많이 사용된다.
최근에는 네트워크를 통한 컨텐츠의 용량이 커지고 그 양 또한 매우 증가하고 있으며, 서버마다 전체 컨텐츠를 보관해야 하는 DAS(direct attached storage) 구조로는 컨텐츠 관리에 대한 한계가 있다. 이에 따라 원본 서버에만 컨텐츠를 보관하고 서비스 서버들은 서비스에 필요한 컨텐츠를 필요할 때만 원본 서버에 요청하여 제공받아서 클라이언트에 제공하는 방식을 사용하였다. 에지 서버(edge server와 스토리지 사이의 연결은 NAS(network attached storage), SAN(storage area network), HTTP, 캐시 파일 시스템 등의 방법이 사용되었다.
그러나 컨텐츠의 개수와 용량이 늘어나면 에지 서버의 로컬 디스크와 메모리에서 히트(Hit)나는 컨텐츠가 줄어들고, 다시 원본 서버에 해당 컨텐츠를 요청하는 빈도가 증가하면서 에지 서버의 부하를 증가시킨다. 또한 에지 서버에서 원본 서버로 컨텐츠를 요청하는 건수가 증가하면서 원본 서버도 부하가 증가하게 된다.
본 발명이 해결하고자 하는 과제는 보다 효율적으로 서버의 부하를 분산시킬 수 있는 방법 및 그 장치를 제공하는 것이다.
본 발명의 특징에 따른 서버 부하 분산 처리 방법은, 서버 부하 분산 장치가 클라이언트로부터 URL(uniform resource locator)를 수신하는 단계; 상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계; 상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하는 단계; 상기 서버 부하 분산 장치가 상기 해시값에 대응하여 복수의 서버들 중에서 하나를 선택하는 단계; 및 상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계를 포함한다.
또한 본 발명의 다른 특징에 따른 서버 부하 분산 처리 방법은, 서버 부하 분산 장치가 클라이언트로부터 URL(uniform resource locator)를 수신하는 단계; 상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계; 상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수보다 큰 제1 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하는 단계; 상기 서버 부하 분산 장치가 상기 해시값에 대응하여 복수의 서버들 중에서 하나를 선택하는 단계; 및 상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계를 포함한다.
여기서 상기 선택하는 단계는 획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블로부터, 상기 해시값에 대응하는 서버를 선택할 수 있다. 그리고 상기 서버 매핑 테이블에서 상기 획득 가능한 나머지 값들을 나누는 각 그룹의 범위가 서버의 총 개수에 따라 가변될 수 있다.
본 발명의 또 다른 특징에 따른 서버 부하 분산 처리 방법은, 서버 부하 분산 장치가 클라이언트로부터 URL(uniform resource locator)를 수신하는 단계; 상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계; 상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 해시값으로 획득하는 단계; 상기 서버 부하 분산 장치가 상기 해시값을 토대로, 히스토리 테이블로부터 상기 해시값에 대하여 이전에 선택되었던 서버가 있는지를 확인하는 단계; 상기 해시값에 대하여 이전에 선택되었던 서버가 있는 경우, 상기 선택되었던 서버를 복수의 서버들 중에서 선택하는 단계; 및 상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계를 포함한다.
여기서, 상기 해시값에 대하여 이전에 선택되었던 서버가 없는 경우, 상기 복수의 서버들의 부하 상태를 고려하여 하나의 서버를 선택하는 단계를 더 포함할 수 있다. 한편 상기 부하 상태를 고려하여 하나의 서버를 선택하는 단계는 상기 복수의 서버들 각각의 부하 및 송출 트래픽을 토대로 하는 서버별 가용 용량을 확인하는 단계; 및 상기 서버별 가용 용량들 중에서 가장 높은 값을 가지는 서버를 선택하는 단계를 포함할 수 있다.
이러한 특징을 가지는 서버 부하 분산 처리 방법들에서, 상기 선택된 서버에 대한 서비스 가능 여부를 판단하는 단계를 더 포함할 수 있으며, 이 경우, 상기 클라이언트를 연결시키는 단계는 상기 선택된 서버가 서비스 가능한 경우에만 상기 클라이언트를 선택된 서버로 연결시킬 수 있다.
또한 상기 판단하는 단계는 상기 서버의 상태가 서비스 불가능한 상태인 경우에 서비스가 가능하지 않은 것으로 판단할 수 있으며, 상기 서비스 불가능한 상태는 서버가 물리적/소프트웨어적으로 장애가 발생해서 서비스를 수행할 수 없는 시스템 장애 상태; 서버가 물리적/소프트웨어적으로 정상 동작이지만 이미 서비스 가용용량 전체를 서비스하고 있어서 추가적인 서비스가 어려운 서버 과부하 상태; 서버가 물리적/소프트웨어적으로 정상 동작이지만 서비스 대상이 되는 컨텐츠가 존재하지 않아서 서비스를 할 수 없는 상태 중 적어도 하나일 수 있다.
한편 상기 선택된 서버가 서비스 가능하지 않은 경우, 상기 해시 함수를 적용할 새로운 해시 소스를 생성하는 단계를 더 포함할 수 있으며, 상기 새로인 생성된 해시 소스에 대하여 해시 함수를 적용하여 획득되는 해시값을 토대로 서버 선택이 이루어질 수 있다.
또한 상기 새로운 해시 소스를 생성하는 단계는 상기 해시 함수를 적용하여 획득되는 해시 결과를 새로운 해시 소스로 생성할 수 있다.
또한 상기 새로운 해시 소스를 생성하는 단계는 상기 해시 함수를 적용하여 획득되는 해시 결과와 상기 URL을 포함하는 문자열을 새로운 해시 소스로 사용할 수 있다.
한편 상기 클라이언트를 연결시키는 단계는 상기 클라이언트로부터의 URL로부터 획득되는 파라미터를 상기 선택된 서버로 제공하면서 상기 파라미터에 대응하는 컨텐츠를 요청하는 단계; 및 상기 서버로부터 상기 요청에 대응하는 응답을 수신하여 상기 클라이언트로 전달하는 단계를 포함할 수 있다.
본 발명의 또 다른 특징에 따른 장치는, 복수의 서버들에 대한 부하 분산을 수행하는 서버 부하 분산 장치이며, 클라이언트로부터 URL(uniform resource locator)를 수신하는 데이터 획득부; 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 함수 적용부; 상기 해시 함수를 적용하여 획득되는 해시 결과를 토대로 하는 해시값에 따라 상기 복수의 서버들 중에서 하나를 선택하는 서버 선택부; 및 상기 선택된 서버로 상기 클라이언트를 연결시키는 전달부를 포함한다.
상기 서버 선택부는 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수로 나누어서 얻어지는 나머지 값을 해시값으로 서버선택에 사용할 수 있다.
또한 상기 서버 선택부는 획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블을 더 포함하고, 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수보다 큰 제1 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하고, 상기 서버 매칭 테이블로부터 상기 해시값에 대응하는 서버를 선택할 수 있다.
또한 상기 서버 선택부는 테이블은 각 해시값별로 선택된 서버의 정보를 포함하는 서버 선택 히스토리가 저장되어 있는 히스토리 테이블을 더 포함하고, 상기 해시 함수를 적용하여 획득되는 해시 결과를 해시값으로 하고, 상기 히스토리 테이블로부터 상기 해시값에 대하여 이전에 선택되었던 서버를 선택할 수 있다. 여기서 상기 서버 선택부는 상기 히스토리 테이블에 해시값에 대하여 이전에 선택되었던 서버가 없는 경우, 상기 복수의 서버들에 대하여 각각 부하 및 송출 트래픽을 토대로 하는 서버별 가용 용량을 확인하고, 상기 서버별 가용 용량들 중에서 가장 높은 값을 가지는 서버를 선택할 수 있다.
한편 상기 함수 적용부는 상기 선택된 서버가 서비스 불가능한 상태인 경우, 상기 해시 함수를 적용하여 획득되는 해시 결과를 새로운 해시 소스로 사용하고 상기 해시 함수를 적용하여 새로운 해시 결과를 획득할 수 있다.
또한 상기 함수 적용부는 상기 선택된 서버가 서비스 불가능한 상태인 경우, 상기 해시 함수를 적용하여 획득되는 해시 결과와 상기 URL 전체 또는 일부를 포함하는 문자열을 새로운 해시 소스로 사용하고 상기 해시 함수를 적용하여 새로운 해시 결과를 획득할 수 있다.
또한 상기 함수 적용부는 상기 URL로부터 해시 소스를 선택하는 경우, 프로토콜, 도메인 또는 IP, 폴더, 파일명, 파라미터 중 적어도 하나의 파라미터를 사용할 수 있다.
또한 상기 서버 선택부에서 클라이언트의 IP의 ISP, 지역, 국가 정보를 서버 선택에 이용할 수 있다.
이러한 본 발명의 특징에 따른 장치에서, 상기 선택된 서버는 물리적으로 한대 또는 한대 이상의 서버를 포함하는 서버그룹일 수 있다.
본 발명의 실시 예에 따르면, 컨텐츠의 개수와 용량이 늘어나도 서버에 대한 부하를 효과적으로 분산시킬 수 있다. 또한 서버와 스토리지의 효율성을 극대화시킬 수 있다.
도 1은 기존 서버 부하 분산 처리를 나타낸 도이다.
도 2는 본 발명의 실시 예에 따른 서버 부하 분산 장치의 구조를 나타낸 도이다.
도 3은 해시값에 따른 서버 매칭 관계를 나타낸 예시도이다.
도 4는 본 발명의 실시 예에 따른 해시 함수 적용 결과를 나타낸 예시도이다.
도 5는 본 발명의 제1 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
도 6은 본 발명의 제2 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
도 7은 본 발명의 제3 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
도 8은 본 발명의 제4 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
도 9는 본 발명의 실시 예에 따른 서버 연결 과정을 나타낸 예시도이다.
도 10은 본 발명의 실시 예에 따른 다른 서버 연결 과정을 나타낸 예시도이다.
아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시 예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.
명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성 요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.
이하, 도면을 참조하여 본 발명의 실시 예에 따른 서버 부하 분산 처리 방법 및 그 장치에 대하여 설명한다.
본 발명의 실시 예에서는 클라이언트로부터 입력되는 HTTP(hyper text transfer protocol) URL(uniform resource locator)에 대한 해싱 방법을 사용하여 서버 부하를 분산처리한다. 해싱 방법은 입력되는 패킷의 HTTP URL에 대하여 해시(hash) 함수를 적용하여 해시 결과를 획득하는 것으로, 본 발명의 실시 예에서는 해시 결과에 따른 해시값을 토대로 서버에 대한 부하 분산을 수행한다.
HTTP URL은 HTTP 네트워크 상에서 자원이 어디 있는지 알려주기 위한 규약을 나타내며, 다음과 같은 구조로 이루어진다.
HTTP URL = 프로토콜(Protocol) + 도메인 네임(domain name) + 파일 경로(file path) + 파라미터(get parameter)
여기서 프로토콜은 “ http://”이며, 호스트 네임이 도메인 네임을 나타낸다. 그리고 파일 경로는 폴더(folder)와 파일 네임(file name)을 포함하며, 폴더와 파일 네임은 “/”에 의하여 구분된다. 파라미터(get parameter)는 “?”으로 시작하며, 복수의 파라미터를 나타낼 때는 각 파라미터를 “&”으로 구분한다.
이러한 구조로 이루어지는 HTTP URL은 예를 들어, "http://vod.domain.com/vod/sample.mp4?id=1234”와 같이 나타낼 수 있다. 여기서 "http"는 프로토콜을 나타내고, "vod.domain.com”은 도네인 네임을 나타내며, "/vod/sample.mp4”은 파일 경로를 나타내고, “id=1234”은 파라미터를 나타낸다.
본 발명의 실시 예에서는 위와 같은 구조로 이루어지는 URL에 대하여 해시 함수(또는 해시 알고리즘(hash algorithm))을 적용하여 해시값을 획득한다. 해시 함수는 임의 데이터로부터 일종의 짧은 "전자 지문"을 만들어 내는 것으로, 데이터를 자르고 치환하거나 위치를 바꾸는 등의 방법을 사용해 결과를 생성하며, 이러한 결과를 “해시 결과”라고 한다. 본 발명의 실시 예에서는 해시 결과를 토대로 서버 선택을 위한 해시값(hash value)을 획득한다. 해시 함수는 결정론적으로 작동하는데, 두 해시 결과가 다르다면 그 해시 결과에 대한 원래 데이터도 달라야 하며, 이것의 역은 성립하지 않는다. 해시 함수의 신뢰성은 얼마나 적은 해시 충돌 즉, 서로 다른 두 데이터의 해시 결과가 같은 경우가 발생하느냐로 결정되는데, 해시 충돌이 많이 날수록 서로 다른 데이터를 구별하기 어려워지고 데이터를 검색하는 비용이 증가될 수 있다.
해시 함수는 기본적으로 두 개의 해시 결과가 다르다면 원래의 입력 데이터들도 다르다는 결정론적 특징을 가지지만, 단사 함수는 아니다. 동일한 해시 결과를 가진다면, 원래의 입력 데이터들도 같다는 것을 시사하지만 보장해 주지는 않는다. 원래 데이터의 한 비트만 바뀌더라도 해시 함수의 성질로 인해 해시 결과는 크게 달라진다.
도 2는 본 발명의 실시 예에 따른 서버 부하 분산 장치의 구조를 나타낸 도이다.
첨부한 도 2에서와 같이, 본 발명의 실시 예에 따른 서버 부하 분산 장치(1)는 복수의 클라이언트(2)와 네트워크를 통하여 연결되며, 또한 복수의 서버(3)들과 연결된다.
서버 부하 분산 장치(1)는 클라이언트(2)로부터 입력되는 데이터에 대하여 해시 함수를 적용하여 해시 결과를 획득하고, 해시 결과에 따라 획득되는 해시값을 토대로 복수의 서버들 중에서 하나의 서버로 클라이언트를 연결시킨다.
이를 위하여, 서버 부하 분산 장치(1)는 클라이언트(2)로부터 데이터를 획득하는 데이터 획득부(11), 획득된 데이터에 대하여 해시 함수를 적용하는 함수 적용부(12), 해시 함수 적용 결과로 획득되는 해시값을 토대로 서버를 선택하는 서버 선택부(13), 선택된 서버로 클라이언트의 요청을 전달하는 연결부(14)를 포함한다.
함수 적용부(12)는 획득된 데이터로부터 해시 함수를 적용할 부분을 선택하고, 선택된 부분에 대하여 해시 함수를 적용하여 그 결과를 획득한다. 그리고 그 결과를 해시값으로 사용하거나 결과에 대한 소정의 처리를 수행하여 획득되는 값을 해시값으로 사용한다.
한편 해시값에 따라 서버를 선택하기 위하여, 복수의 서버(3)들에 대하여 소정의 해시값이 매칭된다. 도 3은 해시값에 따른 서버 매칭 관계를 나타낸 예시도이다. 첨부한 도 3에 예시된 바와 같이, 해시값이 예를 들어, ①, ②, ③이라고 하면, "①"의 해시값에 대응하여 하나의 서버(31)가 매칭되고, "②"의 해시값에 대응하여 하나의 서버(32)가 매칭되며, "③"의 해시값에 대응하여 하나의 서버(33)가 매칭될 수 있다. 이러한 상태에서 클라이언트(2)로부터 입력되는 데이터로부터 획득되는 해시값에 따라 복수의 서버(31∼33)들 중에서 하나의 서버가 선택된다. 입력되는 데이터가 동일한 URL인 경우에는 항상 동일한 해시값이 획득되므로, 동일한 서버로 클라이언트의 요청이 전달될 수 있다.
서버 부하 분산 처리 장치(1)에서, 입력되는 데이터에 대하여 해시 함수를 적용하는 것을 예로 들어 설명한다.
도 4는 본 발명의 실시 예에 따른 해시 함수 적용 결과를 나타낸 예시도이다.
클라이언트(2)로부터 전달되는 패킷으로부터 추출한 데이터 즉, 입력 데이터 URL이 도 4의 (A)에서와 같이, “http://vod.domain.com/vod/sample.mp4?id=1234”로 동영상 컨텐츠에 관련된 것이라고 가정하자. 네트워크에서 복수의 서버 예를 들어, N(여기서 N은 양의 정수)개의 서버들(서버[0]~서버[N-1]) 가 있는 상태에서, 해시 함수 적용에 따라 선택되는 서버는 서버[(int) 해시함수(HTTP URL) % N ]일 수 있다.
입력 데이터 “http://vod.domain.com/vod/sample.mp4?id=1234”에서 파일 경로 “vod/sample.mp4”에 대하여 해시 함수를 적용한다. 입력 데이터(URL)에서 해시 함수가 적용되는 부분을 “해시 소스”라고 명명한다. 여기서는 해시 소스로서 URL의 파일 경로가 사용되지만 이에 한정되지는 않는다. 예를 들어, 필요에 따라 HTTP URL의 도메인 네임 등의 다른 URL 구성 요소와 사용자 에이전트(user agent)와 같은 HTTP 헤더의 정보를 부가적으로 이용할 수도 있다.
입력되는 URL의 파일 경로 “vod/sample.mp4”에 대하여 해시 함수 “MD5" 를 적용하면 도 4의 (B)에서와 같이, 32자의 문자열이 획득된다. 한편 해시 함수로서 “CRC32”를 사용하는 경우에는 도 4의 (C)와 같이 10자리의 정수가 획득될 수 있다. 해시 함수로 “CRC32”를 사용하여 “3756904710”의 해시 결과를 획득하고, 획득한 해시 결과를 서버의 개수 “N”으로 나누면 “3756904710%4=2”의 값 즉, 해시값이 획득된다. 이와 같이 획득된 해시값 “2”에 따라 서버[2]가 선택될 수 있다.
본 발명의 실시 예에서는 입력 데이터 URL에 대하여 해시 함수를 적용하여 획득되는 해시값을 토대로 클라이언트의 요청을 전달할 서버를 선택하며, 선택된 서버로 클라이언트의 요청을 전달한다. 여기서 서버로 클라이언트의 요청을 전달하는 것은 서버와 클라이언트를 연결시키는 모든 관련 동작을 포함하며, 이에 대해서는 추후에 보다 구체적으로 설명하기로 한다.
다음에는 본 발명의 실시 예에 따른 서버 부하 분산 처리 방법에 대하여 설명한다.
여기서는 N개의 서버(또는 서버 그룹)가 있으며, 각 서버들에 대하여 S[0]~S[N-1]의 해시값이 각각 할당되어 있는 것으로 가정하고, 각 실시 예들에 따른 서버 부하 분산 처리 방법에 대하여 설명한다.
먼저, 본 발명의 제1 실시 예에 따른 서버 부하 분산 처리 방법에 설명한다. 도 5는 본 발명의 제1 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
서버 부하 분산 장치(1)는 클라이언트(2)로부터 입력 데이터 즉, HTTP 연결 요청을 수신한다(S100). HTTP 연결 요청으로부터 URL을 획득하고, 획득된 URL로부터 해시 함수를 적용할 해시 소스를 획득한다(S110). 여기서는 해시 소스로서 URL의 파일 경로가 사용되지만, 반드시 이것에 한정되는 것은 아니다.
서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 해시 결과를 획득하고(S120), 획득된 해시 결과로부터 서버 선택을 위한 해시값을 획득한다.
본 발명의 제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”가 해시값으로 사용된다.
서버 부하 분산 장치(1)는 복수의 서버들 중에서 획득한 해시값에 대응하는 하나의 서버를 선택하고(S140). 선택된 서버로 클라이언트 요청을 전달한다(S150). 예를 들어, 해시값 “2”에 대응하는 서버 S2가 선택되고, 선택된 서버 S2로 클라이언트를 연결시킨다.
이러한 본 발명의 제1 실시 예에서는 간단하게 서버들의 부하를 효율적으로 분산시킬 수 있다.
다음에는 본 발명의 제2 실시 예에 따른 서버 부하 분산 처리 방법에 설명한다. 도 6은 본 발명의 제2 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
본 발명의 제2 실시 예에서는 서버(또는 서버 그룹)의 수가 변경되어도 용이하게 서버 부하 분산을 수행할 수 있는 방법을 제공한다.
위에 기술된 제1 실시 예와 동일하게, 도 6에 도시되어 있듯이, 서버 부하 분산 장치(1)는 클라이언트(2)로부터 HTTP 연결 요청을 수신하고, URL로부터 해시 소스를 획득하며, 획득된 URL로부터 해시 함수를 적용하여 해시값을 획득한다(S200~S220).
서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 해시값을 획득한다. 본 발명의 제2 실시 예에서는 해시 소스에 대하여 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수인 “N”보다 충분히 큰 수인 “M(여기서 M은 양의 정수)”로 나누어서 얻어지는 나머지 0~M-1 값을 해시값으로 이용한다(S230). 특히 본 발명의 제2 실시 예에서는 서버의 총 개수인 N보다 큰 M으로 해시 결과를 나누어서 얻어지는 나머지 값들을 사용함으로, 나머지 값들이 서버의 총 개수보다 많다. 이에 따라 서버 부하 분산 장치(1)는 서버 매칭 테이블을 사용하여 획득 가능한 나머지 값들에 서버들을 미리 대응시키고, 위의 단계(S230)를 통하여 얻어지는 해시값을 토대로 서버 매칭 테이블로부터 서버를 선택할 수 있다. 즉, 획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 테이블을 미리 생성하고, 이후 해시값을 토대로 서버 매칭 테이블로부터 서버를 선택한다. 예를 들어, S0, S1, S2, S3개의 서버가 있고, M=100인 경우, 다음 표 1과 같은 서버 매칭 테이블이 사용될 수 있다.
표 1
나머지 값(해시결과 % M) 서버(또는 서버 그룹)
0~24 S0
25~49 S1
50~74 S2
75~99 S3
표 1과 같이, 획득 가능한 나머지값들 0~100을 4개의 그룹(제1 그룹(0~24), 제2 그룹(25~49), 제3 그룹(50~74), 그리고 제4 그룹(75~99))으로 나누고, 각 그룹에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블을 사용할 수 있다. 이러한 서버 매칭 테이블은 서버 부하 분산 장치(1)의 서버 선택부(13)에 저장되어 관리될 수 있다.
위의 제1 실시 예서와 같이, 해시 소스 “/vod/sample.mp4’”에 대하여 해시 함수를 적용하여 “3756904710”의 해시 결과를 획득한 경우, 해시 결과 "3756904710”를 M인 “100”으로 나누어서 얻어지는 나머지 값 “10”이 해시값으로 사용된다.
서버 부하 분산 장치(1)는 위에 기술된 바와 같이 미리 설정된 서버 매칭 테이블을 이용하여 복수의 서버들 중에서 획득한 해시값에 대응하는 하나의 서버를 선택하고(S240). 선택된 서버로 클라이언트 요청을 전달한다(S250). 예를 들어, 표 1과 같은 서버 매칭 테이블로부터 해시값 “10”에 대응하는 서버 S0가 선택되고, 선택된 서버 S0로 클라이언트를 연결시킨다.
이러한 본 발명의 실시 예에 따르면 서버의 개수가 변경되는 경우에도 적응적으로 서버 부하 분산을 효율적으로 수행할 수 있다. 구체적으로, 서버(또는 서버그룹)의 개수가 N개인 상태에서 M개로 서버(또는 서버그룹)을 변경할 경우에도 서버 매칭 테이블을 변환하는 것으로 서버 부하를 효과적으로 분산시킬 수 있다. 예를 들어, 서버의 개수가 N개이고, N개의 서버의 로컬 저장소(예를 들어, 디스크, 메모리 등)에 컨텐츠가 캐싱(cashing) 되어 있고 제1 실시 예와 같은 방법으로 서버 부하 분산을 수행하고 있는 상태에서, 서버의 개수가 M개로 변경되면 기존 서버들에 캐싱된 컨텐츠를 다시 캐싱해야 하는 문제가 발생할 수 있으며, 이 경우에는 클라이언트 요청에 대한 처리가 지연될 수 있다.
그러나 본 발명의 제2 실시 예에 따르면 서버의 총 개수가 변경되어도 서버 매칭 테이블에서 서버에 매칭되는 나머지 값들의 범위를 조정하면 된다.
표 1과 같은 서버 매칭 테이블이 유지 및 관리되고 있는 상태에서, 서버의 개수가 5개로 증가되었다고 가정하자. 이 경우에는 다음 표 2와 같이 서버 매칭 테이블을 변경할 수 있다.
표 2
나머지 값(해시결과 % M) 서버(또는 서버 그룹)
0~19 S0
25~44 S1
50~69 S2
75~94 S3
20~24, 45~49, 70~74, 95~99 S4
서버의 개수가 3개로 감소되는 경우에도, 다음 표 3과 같이 서버 매칭 테이블을 변경할 수 있다.
표 3
나머지 값(해시결과 % M) 서버(또는 서버 그룹)
0~19, 75~82 S0
25~44, 83~90 S1
50~69, 91~99 S2
이와 같이 본 발명의 실시 예에 따르면 사용되는 서버들의 개수에 따라 서버 매칭 테이블에서 각 서버에 매칭되는 나머지 값들의 범위를 조절할 수 있으며, 서버의 개수가 변경되는 경우에도 적응적인 서버 부하 분산 처리가 가능하다.
다음에는 본 발명의 제3 실시 예에 따른 서버 부하 분산 처리 방법에 설명한다. 도 7은 본 발명의 제3 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
위에 기술된 제1 실시 예와 동일하게, 도 7에 도시되어 있듯이, 서버 부하 분산 장치(1)는 클라이언트(2)로부터 HTTP 연결 요청을 수신하고, URL로부터 해시 소스를 획득하며, 획득된 URL로부터 해시 함수를 적용하여 해시값을 획득한다(S300~S320).
서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 해시값을 획득하고, 획득한 해시값에 대하여 기존에 선택된 서버가 있으면 해당 서버를 선택하고, 획득한 해시값에 대하여 기존에 선택된 서버가 없으면 서버의 부하 상태를 고려하여 임의 서버를 선택한다. 이를 위하여, 본 발명의 제3 실시 예에서는 서버 선택 히스토리를 저장하는 히스토리 테이블을 저장 및 관리한다. 서버 선택 히스토리는 해시값별로 기존에 선택되었던 서버들 정보를 포함한다. 예를 들어, 서버 부하 분산 장치(1)의 서버 선택부(13)가 히스토리 테이블을 저장 및 관리할 수 있으며, 히스토리 테이블은 데이터베이스 형태로 구현될 수 있다.
본 발명의 실시 예에 따른 히스토리 테이블은 다음 표 4와 같을 수 있다.
표 4
해시 결과 서버(또는 서버 그룹)
1546554652 S0
5456446846 S1
3756904710 S2
표 4에 예시된 바와 같이, 본 발명의 실시 예에 따른 히스토리 테이블은 해시 소스에 대하여 해시 함수를 적용하여 획득되는 해시 결과에 대응하여 선택되었던 서버가 저장된다. 여기서는 해시 결과가 서버 선택을 위한 해시값으로 사용된다.
예를 들어, S0, S1, S2, S3의 서버가 존재하고, "http://vod.domain.com/vod/sample.mp4?id=1234”의 URL로부터 획득한 해시 소스 “/vod/sample.mp4”에 대하여 해시 함수(예를 들어, CRC32)를 적용하여 "3756904710”해시 결과를 획득한 경우, 해시 결과 “3756904710”를 토대로 히스토리 테이블로부터 선택된 서버가 있는지를 확인한다. 표 4와 같이 히스토리 테이블로부터 해시 결과“3756904710”에 대응하여 서버 S4가 선택되었던 히스토리를 확인한다. 이후 서버 S4가 입력된 클라이언트 요청을 전달받을 서버로 선택된다.
이와 같은 과정을 토대로, 서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 획득한 해시 결과를 해시값으로 사용하면서, 히스토리 테이블로부터 해시값에 대응하여 선택되었던 서버가 있는지를 확인한다(S330, S340).
확인 결과, 히스토리 테이블에 현재 획득한 해시값에 대응하여 기존에 선택되었던 서버가 있는 경우에는 해당 서버를 선택한다(S350). 반면, 히스토리 테이블에 해시값에 대응하여 기존에 선택된 서버가 없는 경우에, 서버 부하 분산 장치(1)는 각 서버들의 부하 상태를 고려하여 하나의 서버를 선택한다(S360).
여기서 서버의 부하 상태는 각 서버들의 부하 및 송출 트래픽을 고려한 가용요량을 나타낸다. 서버의 부하 상태를 관리하기 위하여, 서버 부하 분산 장치(1)는 서버 가용용량 데이터베이스를 포함할 수 있다. 이러한 서버 가용용량 데이터베이스는 다음 표 5와 같은 구조로 이루어질 수 있다.
표 5
서버(또는 서버 그룹) 가용용량
S0 30
S1 70
S2 30
S3 50
서부 부하 분산 장치(1)는 서버 가용용량 데이터베이스로부터 각 서버들의 부하 상태를 체크하고, 가용용량이 가장 높은 값을 가지는 서버를 선택한다. 예를 들어, S0, S1, S2, S3의 서버들 중에서 현재 가용용량이 제일 높은 서버 S1을 선택할 수 있다(S370). 그리고 서버 부하 분산 장치(1)는 선택된 서버에 대한 히스토리를 히스토리 테이블에 저장한다. 즉, 현재 획득한 해시값에 대응하여 서버의 부하 상태에 따라 선택된 서버를 히스토리 테이블에 대응하여 새로이 저장시킨다.
이후, 서버 부하 분산 장치(1)는 선택된 서버로 클라이언트 요청을 전달한다(S380).
이러한 본 발명의 제3 실시 예에 따르면, 클라이언트 요청에 따른 기존의 서버 선택 히스토리를 이용함으로써, 각 서버의 저장소에 캐싱되어진 컨텐츠를 최대한 활용할 수 있으며, 클라어인트 요청에 대한 응답성을 향상시킬 수 있다.
또한 기존 서버 선택 히스토리가 없는 경우에도, 각 서버들의 가용용량을 기준으로 서버를 선택하여 클라이언트 요청을 처리함으로써, 특정 서버(또는 서버그룹)로만 부하가 몰리는 현상을 최소화할 수 있다.
다음에는 본 발명의 제4 실시 예에 따른 서버 부하 분산 처리 방법에 설명한다. 도 8은 본 발명의 제4 실시 예에 따른 서버 부하 분산 처리 방법의 흐름도이다.
본 발명의 제4 실시 예에 따른 서버 부하 분산 처리 방법은, 클라이언트 요청에 대응하여 선택된 서버로 클라이언트를 바로 연결시키지 않고, 선택된 서버에 대한 서비스 가능 여부를 판단하여 클라이언트를 연결시킬 수 있다.
위에 기술된 실시 예들에 따라 선택된 서버가 서비스가 불가능한 상태일 수 있다. 몇가지 예를 들면, 첫째, 서버가 물리적/소프트웨어적으로 장애가 발생해서 서비스를 수행할 수 없는 시스템 장애 상태일 수 있다. 둘째, 서버가 물리적/소프트웨어적으로 정상 동작이지만 이미 서비스 가용용량 전체를 서비스하고 있어서 추가적인 서비스가 어려운 서버 과부하 상태일 수 있다. 마지막으로, 서버가 물리적/소프트웨어적으로 정상 동작이지만 서비스 대상이 되는 컨텐츠가 존재하지 않아서 서비스를 할 수 없는 경우일 수 있다.
따라서 본 발명의 제4 실시 예에 따른 서버 부하 분산 장치(1)는 위에 기술된 바와 같은 서비스 불가능한 상태를 판단해서, 선택된 서버가 서비스 불가능한 상태인 경우에는 다른 서버를 추가적으로 선택할 수 있다.
위에 기술된 제1 실시 예와 동일하게, 도 8에 도시되어 있듯이, 서버 부하 분산 장치(1)는 클라이언트(2)로부터 HTTP 연결 요청을 수신하고, URL로부터 해시 소스를 획득하며, 획득된 URL로부터 해시 함수를 적용하여 해시값을 획득한다(S400~S420).
서버 부하 분산 장치(1)는 해시 소스에 대하여 미리 설정된 해시 함수를 적용하여 해시값을 획득하고(S430), 획득한 해시값을 토대로 하나의 서버를 선택한다(S440). 여기서 서버를 선택하는 방법은 위에 기술된 제1 실시 예 내지 제3 실시 예에 따른 방법 중 하나의 방법이 사용될 수 있다.
서버 부하 분산 장치(1)는 선택된 서버에 대하여 서비스 가능 여부를 판단한다(S450). 선택된 서버가 위에 기술된 바와 같은 서비스 불가능한 상태에 해당하지 않는 경우에는 서비스 가능한 상태로 판단하고, 선택된 서버로 클라이언트 요청을 전달한다(S460, S470).
반면, 선택된 서버가 위에 기술된 바와 같은 서비스 불가능한 상태 중 하나에 해당하면 서비스가 가능하지 않은 것으로 판단하고, 다시 서버 선택을 수행한다. 이를 위하여, 서버 부하 분산 장치(1)는 해시 함수를 적용할 해시 소스를 다시 생성한다(S480).
구체적으로 단계(S420)에서 해시 함수를 적용하여 획득한 이전 해시 결과 또는 이전 해시 결과를 포함하는 문자열을 해시 함수를 적용할 새로운 해시 소스로 사용한다. 그리고 해시 함수를 재귀적으로 처리한다. 예를 들어, 이전 해시 결과가 “Hash(URL)”이라고 하면, 이전 해시 결과를 해시 소스로 하여 해시 함수가 적용됨으로써, “Hash(Hash(URL))”의 해시 결과가 획득될 수 있다.
그리고 새로이 획득된 해시 결과에 따른 해시값을 토대로 서버를 선택한다. 이 때, 새로이 선택된 서버도 서비스 불가능한 상태인 경우에는 다시 새로운 해시 소스를 생성하고 이를 토대로 서버를 선택하는 서버 선택 과정을, 서비스 가능한 서버가 선택될 때까지 반복적으로 수행할 수 있다. 이러한 경우에는 예를 들어, 다음과 같은 수학식을 토대로 해시 소스 생성 과정이 반복적으로 수행될 수 있다. (n 가능한 서버가 선택될 때까지의 반복횟수)
수학식 1
Figure PCTKR2012005726-appb-M000001
이러한 수학식 1을 토대로,
1차 해시 결과: Hash(URL)
2차 해시 결과: Hash(Hash(URL))
3차 해시 결과: Hash(Hash(Hash(URL)))
n차 해시 결과: Hash(Hash(URL,n-1))
와 같은 형태의 해시 결과 생성이 수행되고, 생성된 해시 결과를 토대로 하는 서버 선택 과정이 수행될 수 있다.
한편, 새로운 해시 소스 생성시에, 이전 해시 결과와 클라이언트로부터 획득한 URL을 포함하는 문자열을 해시 소스로 사용하여 해시 결과를 획득할 수 있다. 예를 들어, 이전 해시 결과 “Hash(URL)”과 “URL”을 포함하는 해시 소스를 해시 함수에 적용하여, “Hash(Hash(URL)+URL)”의 해시 결과를 획득할 수 있다. 이러한 해시 소스 생성은 상대적으로 해시 결과의 범위가 다른 해시 함수에 비하여 적은 해시 함수를 사용하는 경우나, 1차적으로 해시 함수를 적용한 경우와는 다른 값을 획득하고자 하는 경우에 사용될 수 있지만, 이에 한정되는 것은 아니다.
이러한 해시 소스 생성 과정은 예를 들어, 다음과 같은 수학식을 토대로 반복적으로 수행될 수 있다. (n 가능한 서버가 선택될 때까지의 반복횟수)
수학식 2
Figure PCTKR2012005726-appb-M000002
이러한 수학식 2를 토대로,
1차 해시 결과: Hash(URL)
2차 해시 결과: Hash(Hash(URL)+URL)
3차 해시 결과: Hash(Hash(Hash(URL)+URL)+URL)
n차 해시 결과 : Hash(Hash(URL,n-1)+URL)
와 같은 형태의 해시 소스 및 해시 결과 생성이 반복적으로 수행될 수 있다.
이외에도, 상기 URL에 대한 해시 결과에 추가적으로 클라이언트 IP를 서버선택에 반영을 하면, ISP, 국가, 지역별로 구분되는 부한 분산을 할 수 있다.
다음에는 위에 기술된 바와 같은 본 발명의 실시 예에 따른 서버 부하 분산 처리 방법에서, 선택된 서버로 클라이언트의 요청을 전달하여 클라이언트를 서버로 연결시키는 과정에 대하여 보다 구체적으로 설명한다.
도 9는 본 발명의 실시 예에 따른 서버 연결 과정을 나타낸 예시도이다.
본 발명의 실시 예에 따른 서버 부하 분산 장치(1)는 클라이언트(2)로부터 입력되는 연결 요청 패킷을 수신하고, 수신된 패킷의 목적지 주소를 변경하는 방법으로 클라이언트(2)를 선택된 서버로 연결시킬 수 있다.
도 9에 예시되어 있듯이, 서버 부하 분산 장치(1)는 L7을 기반으로 하면서, L4 부하 분산 기능을 내장하는 형태로 구현되어, 클라이언트(2)와 서버 부하 분산 장치(1) 사이에 L7로 연결된다. 서버 부하 분산 장치(1)는 복수의 서버들 중에서 선택된 서버(예를 들어, S0)로 클라이언트(2)로부터 입력되는 연결 요청 HTTP URL로부터 획득한 GET 파라미터에 대응하는 컨텐츠를 요청하며, 서버로부터 요청에 대한 응답을 제공받아 클라이언트(2)로 제공한다.
이러한 연결 과정에 따르면, 클라이언트(2)는 L7 부하분산 구조에 대해서도 전혀 몰라도 되며, 클라이언트의 HTTP 요청에 대해서 L7 부하 분산 구조를 가지는 서버 부하 분산 장치(1)를 통하여 선택 서버를 통한 응답이 제공된다. 특히, 이러한 연결 과정은 트래픽 규모가 크지 않으며, HTML, 텍스트, 이미지 등의 저용량 컨텐츠를 서비스할 때 보다 효과적으로 이용될 수 있다.
도 10은 본 발명의 실시 예에 따른 다른 서버 연결 과정을 나타낸 예시도이다.
본 발명의 실시 예에 따른 서버 부하 분산 장치(1)는 클라이언트(2)로부터 입력되는 연결 요청 패킷을 수신하고, 클라이언트(2)로 선택된 서버에 대한 도메인 또는 IP 정보를 포함하는 리다이렉션 URL을 제공하여, 클라이언트(2)가 선택된 서버로 연결되도록 한다.
이러한 연결 과정은 클라이언트(2)가 단순히 TCP에 따라 서버로 페이지를 요청하는 기능만을 수행하는 프로그램이 아니라, HTTP 301/302 리다이렉션(redirection)을 지원하는 경우에 수행될 수 있다.
클라이언트(2)가 HTTP 301/302 리다이렉션을 지원하는 경우, 서버 부하 분산 장치(2)는 도 10에 예시된 바와 같이, 클라이언트(2)로부터 입력되는 HTTP URL로부터 획득한 해시 소스를 토대로 선택된 서버로 클라이언트를 연결시키기 위하여, 클라이언트(2)로 선택된 서버에 대한 정보를 포함하는 리다이렉션 URL을 제공한다. 클라이언트(2)는 서버 부하 분산 장치(2)로부터 제공되는 리다이렉션 URL에 따라 해당하는 서버로 접속한다.
이러한 연결 과정은 트래픽 규모가 매우 크며, 고화질 이미지와 같은 비정형 데이터의 송수신시에 효과적으로 이용될 수 있다.
본 발명의 실시 예는 이상에서 설명한 장치 및/또는 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하기 위한 프로그램, 그 프로그램이 기록된 기록 매체 등을 통해 구현될 수도 있으며, 이러한 구현은 앞서 설명한 실시예의 기재로부터 본 발명이 속하는 기술분야의 전문가라면 쉽게 구현할 수 있는 것이다.
이상에서 본 발명의 실시 예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.

Claims (25)

  1. 서버 부하 분산 장치가 클라이언트로부터 URL(uniform resource locator)를 수신하는 단계;
    상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계;
    상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하는 단계;
    상기 서버 부하 분산 장치가 상기 해시값에 대응하여 복수의 서버들 중에서 하나를 선택하는 단계; 및
    상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계
    를 포함하는, 서버 부하 분산 처리 방법.
  2. 서버 부하 분산 장치가 클라이언트로부터 URL(uniform resource locator)를 수신하는 단계;
    상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계;
    상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수보다 큰 제1 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하는 단계;
    상기 서버 부하 분산 장치가 상기 해시값에 대응하여 복수의 서버들 중에서 하나를 선택하는 단계; 및
    상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계
    를 포함하는, 서버 부하 분산 처리 방법.
  3. 제2항에 있어서
    상기 선택하는 단계는
    획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블로부터, 상기 해시값에 대응하는 서버를 선택하는, 서버 부하 분산 처리 방법.
  4. 제3항에 있어서
    상기 서버 매핑 테이블에서 상기 획득 가능한 나머지 값들을 나누는 각 그룹의 범위가 서버의 총 개수에 따라 가변되는, 서버 부하 분산 처리 방법.
  5. 서버 부하 분산 장치가 클라이언트로부터 URL(uniform resource locator)를 수신하는 단계;
    상기 서버 부하 분산 장치가 상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 단계;
    상기 서버 부하 분산 장치가 상기 해시 함수를 적용하여 획득되는 해시 결과를 해시값으로 획득하는 단계;
    상기 서버 부하 분산 장치가 상기 해시값을 토대로, 히스토리 테이블로부터 상기 해시값에 대하여 이전에 선택되었던 서버가 있는지를 확인하는 단계;
    상기 해시값에 대하여 이전에 선택되었던 서버가 있는 경우, 상기 선택되었던 서버를 복수의 서버들 중에서 선택하는 단계; 및
    상기 서버 부하 분산 장치가 상기 선택된 서버로 상기 클라이언트를 연결시키는 단계
    를 포함하는, 서버 부하 분산 처리 방법.
  6. 제5항에 있어서
    상기 해시값에 대하여 이전에 선택되었던 서버가 없는 경우, 상기 복수의 서버들의 부하 상태를 고려하여 하나의 서버를 선택하는 단계를 더 포함하는, 서버 부하 분산 처리 방법.
  7. 제6항에 있어서
    상기 부하 상태를 고려하여 하나의 서버를 선택하는 단계는
    상기 복수의 서버들 각각의 부하 및 송출 트래픽을 토대로 하는 서버별 가용 용량을 확인하는 단계; 및
    상기 서버별 가용 용량들 중에서 가장 높은 값을 가지는 서버를 선택하는 단계
    를 포함하는, 서버 부하 분산 처리 방법.
  8. 제5항에 있어서
    상기 히스토리 테이블은 각 해시값별로 선택된 서버의 정보를 포함하는 서버 선택 히스토리가 저장되어 있는, 서버 부하 분산 처리 방법.
  9. 제1항에 있어서
    상기 선택된 서버에 대한 서비스 가능 여부를 판단하는 단계를 더 포함하고,
    상기 클라이언트를 연결시키는 단계는 상기 선택된 서버가 서비스 가능한 경우에만 상기 클라이언트를 선택된 서버로 연결시키는, 서버 부하 분산 처리 방법.
  10. 제8항에 있어서
    상기 판단하는 단계는 상기 서버의 상태가 서비스 불가능한 상태인 경우에 서비스가 가능하지 않은 것으로 판단하며,
    상기 서비스 불가능한 상태는
    서버가 물리적/소프트웨어적으로 장애가 발생해서 서비스를 수행할 수 없는 시스템 장애 상태;
    서버가 물리적/소프트웨어적으로 정상 동작이지만 이미 서비스 가용용량 전체를 서비스하고 있어서 추가적인 서비스가 어려운 서버 과부하 상태; 그리고
    서버가 물리적/소프트웨어적으로 정상 동작이지만 서비스 대상이 되는 컨텐츠가 존재하지 않아서 서비스를 할 수 없는 상태
    중 적어도 하나인, 서버 부하 분산 처리 방법.
  11. 제8항에 있어서
    상기 선택된 서버가 서비스 가능하지 않은 경우, 상기 해시 함수를 적용할 새로운 해시 소스를 생성하는 단계
    를 더 포함하고,
    상기 새로인 생성된 해시 소스에 대하여 해시 함수를 적용하여 획득되는 해시값을 토대로 서버 선택이 이루어지는, 서버 부하 분산 처리 방법.
  12. 제11항에 있어서
    상기 새로운 해시 소스를 생성하는 단계는
    상기 해시 함수를 적용하여 획득되는 해시 결과를 새로운 해시 소스로 생성하는, 서버 부하 분산 처리 방법.
  13. 제11항에 있어서
    상기 새로운 해시 소스를 생성하는 단계는
    상기 해시 함수를 적용하여 획득되는 해시 결과와 상기 URL을 포함하는 문자열을 새로운 해시 소스로 사용하는, 서버 부하 분산 처리 방법.
  14. 제1항에 있어서
    상기 클라이언트를 연결시키는 단계는
    상기 클라이언트로부터의 URL로부터 획득되는 파라미터를 상기 선택된 서버로 제공하면서 상기 파라미터에 대응하는 컨텐츠를 요청하는 단계; 및
    상기 서버로부터 상기 요청에 대응하는 응답을 수신하여 상기 클라이언트로 전달하는 단계
    를 포함하는, 서버 부하 분산 처리 방법.
  15. 제1항에 있어서
    상기 클라이언트를 연결시키는 단계는
    상기 선택된 서버의 도메인 또는 IP 정보를 포함하는 리다이렉션 URL을 상기 클라이언트로 제공하는 단계
    를 포함하는, 서버 부하 분산 처리 방법.
  16. 복수의 서버들에 대한 부하 분산을 수행하는 서버 부하 분산 장치에서,
    클라이언트로부터 URL(uniform resource locator)를 수신하는 데이터 획득부;
    상기 URL로부터 해시 소스를 선택하고, 상기 선택된 해시 소스에 대하여 미리 설정된 해시 함수를 적용시키는 함수 적용부;
    상기 해시 함수를 적용하여 획득되는 해시 결과를 토대로 하는 해시값에 따라 상기 복수의 서버들 중에서 하나를 선택하는 서버 선택부; 및
    상기 선택된 서버로 상기 클라이언트를 연결시키는 전달부
    를 포함하는, 서버 부하 분산 장치.
  17. 제16항에 있어서
    상기 서버 선택부는 상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수로 나누어서 얻어지는 나머지 값을 해시값으로 서버선택에 사용하는, 서버 부하 분산 장치.
  18. 제16항에 있어서
    상기 서버 선택부는
    획득 가능한 나머지 값들을 복수의 그룹으로 나누고, 각 나머지 값 그룹들에 대응하여 하나의 서버를 매칭시킨 서버 매칭 테이블을 더 포함하고,
    상기 해시 함수를 적용하여 획득되는 해시 결과를 서버의 총 개수보다 큰 제1 개수로 나누어서 얻어지는 나머지 값을 해시값으로 획득하고, 상기 서버 매칭 테이블로부터 상기 해시값에 대응하는 서버를 선택하는, 서버 부하 분산 장치.
  19. 제16항에 있어서
    상기 서버 선택부는
    테이블은 각 해시값별로 선택된 서버의 정보를 포함하는 서버 선택 히스토리가 저장되어 있는 히스토리 테이블을 더 포함하고,
    상기 해시 함수를 적용하여 획득되는 해시 결과를 해시값으로 하고, 상기 히스토리 테이블로부터 상기 해시값에 대하여 이전에 선택되었던 서버를 선택하는, 서버 부하 분산 장치.
  20. 제19항에 있어서
    상기 서버 선택부는
    상기 히스토리 테이블에 해시값에 대하여 이전에 선택되었던 서버가 없는 경우, 상기 복수의 서버들에 대하여 각각 부하 및 송출 트래픽을 토대로 하는 서버별 가용 용량을 확인하고, 상기 서버별 가용 용량들 중에서 가장 높은 값을 가지는 서버를 선택하는, 서버 부하 분산 장치.
  21. 제16항에 있어서
    상기 함수 적용부는
    상기 선택된 서버가 서비스 불가능한 상태인 경우, 상기 해시 함수를 적용하여 획득되는 해시 결과를 새로운 해시 소스로 사용하고 상기 해시 함수를 적용하여 새로운 해시 결과를 획득하는, 서버 부하 분산 처리 장치.
  22. 제16항에 있어서
    상기 함수 적용부는
    상기 선택된 서버가 서비스 불가능한 상태인 경우, 상기 해시 함수를 적용하여 획득되는 해시 결과와 상기 URL 전체 또는 일부를 포함하는 문자열을 새로운 해시 소스로 사용하고 상기 해시 함수를 적용하여 새로운 해시 결과를 획득하는, 서버 부하 분산 처리 장치.
  23. 제16항에 있어서
    상기 함수 적용부는
    상기 URL로부터 해시 소스를 선택하는 경우, 프로토콜, 도메인 또는 IP, 폴더, 파일명, 파라미터 중 적어도 하나의 파라미터를 사용하는 서버 부하 분산 처리 장치.
  24. 제16항에 있어서
    상기 서버 선택부에서
    클라이언트의 IP의 ISP, 지역, 국가 정보를 서버 선택에 이용하는, 서버 부하 분산 처리 장치.
  25. 제16항에 있어서
    상기 선택된 서버는
    물리적으로 한대 또는 한대 이상의 서버를 포함하는 서버그룹인, 서버 부하 분산 처리 장치.
PCT/KR2012/005726 2011-12-19 2012-07-18 해시 함수 결과를 이용한 서버 부하 분산 처리 방법 및 그 장치 WO2013094837A1 (ko)

Priority Applications (1)

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

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20110137596 2011-12-19
KR10-2011-0137596 2011-12-19
KR10-2012-0065182 2012-06-18
KR1020120065182A KR101383905B1 (ko) 2011-12-19 2012-06-18 해시 함수 결과를 이용한 서버 부하 분산 처리 방법 및 그 장치

Publications (1)

Publication Number Publication Date
WO2013094837A1 true WO2013094837A1 (ko) 2013-06-27

Family

ID=48668693

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2012/005726 WO2013094837A1 (ko) 2011-12-19 2012-07-18 해시 함수 결과를 이용한 서버 부하 분산 처리 방법 및 그 장치

Country Status (1)

Country Link
WO (1) WO2013094837A1 (ko)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015012422A1 (ko) * 2013-07-24 2015-01-29 Kim Hangjin '2차원 매트릭스 기반 분산 접속망'을 이용한 ddos 공격 대응 및 비지니스 연속성 (business continuity ) 보장 방안
CN106878415A (zh) * 2017-02-15 2017-06-20 阿里巴巴集团控股有限公司 数据消费的负载均衡方法及装置
CN110661719A (zh) * 2019-09-26 2020-01-07 杭州安恒信息技术股份有限公司 流量负载均衡方法和装置
CN110781132A (zh) * 2019-10-24 2020-02-11 深圳前海环融联易信息科技服务有限公司 文件存储的实现方法、装置、及计算机设备
CN111460510A (zh) * 2020-04-17 2020-07-28 支付宝(杭州)信息技术有限公司 基于隐私保护确定相同业务数据的方法及装置
CN111464649A (zh) * 2017-04-19 2020-07-28 贵州白山云科技股份有限公司 一种访问请求回源方法和装置
CN111683144A (zh) * 2020-06-08 2020-09-18 北京字节跳动网络技术有限公司 一种访问请求处理的方法、装置、计算机设备及存储介质
CN112328291A (zh) * 2020-12-11 2021-02-05 上海市民信箱信息服务有限公司 一种app轻应用市场软件版本管控的方法
CN112965818A (zh) * 2021-02-26 2021-06-15 平安普惠企业管理有限公司 一种服务集群单元化分组方法、装置、设备以及介质
CN112995245A (zh) * 2019-12-12 2021-06-18 中国科学院声学研究所 一种基于fpga的可配置负载均衡系统与方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030027485A (ko) * 2001-09-28 2003-04-07 주식회사 케이티 컨텐트 전달망에서 컨텐트 레벨의 컨텐트 루팅 방법 및 장치
WO2009046642A1 (fr) * 2007-10-09 2009-04-16 Huawei Technologies Co., Ltd. Procédé de distribution de données, système distribution de données et dispositifs de corrélation dans un réseau périphérique
US7774470B1 (en) * 2007-03-28 2010-08-10 Symantec Corporation Load balancing using a distributed hash
US20110035437A1 (en) * 2009-08-10 2011-02-10 Hitachi, Ltd. Gateway System and Control Method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030027485A (ko) * 2001-09-28 2003-04-07 주식회사 케이티 컨텐트 전달망에서 컨텐트 레벨의 컨텐트 루팅 방법 및 장치
US7774470B1 (en) * 2007-03-28 2010-08-10 Symantec Corporation Load balancing using a distributed hash
WO2009046642A1 (fr) * 2007-10-09 2009-04-16 Huawei Technologies Co., Ltd. Procédé de distribution de données, système distribution de données et dispositifs de corrélation dans un réseau périphérique
US20110035437A1 (en) * 2009-08-10 2011-02-10 Hitachi, Ltd. Gateway System and Control Method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015012422A1 (ko) * 2013-07-24 2015-01-29 Kim Hangjin '2차원 매트릭스 기반 분산 접속망'을 이용한 ddos 공격 대응 및 비지니스 연속성 (business continuity ) 보장 방안
CN106878415B (zh) * 2017-02-15 2020-09-01 阿里巴巴集团控股有限公司 数据消费的负载均衡方法及装置
CN106878415A (zh) * 2017-02-15 2017-06-20 阿里巴巴集团控股有限公司 数据消费的负载均衡方法及装置
CN111464649B (zh) * 2017-04-19 2022-10-21 贵州白山云科技股份有限公司 一种访问请求回源方法和装置
CN111464649A (zh) * 2017-04-19 2020-07-28 贵州白山云科技股份有限公司 一种访问请求回源方法和装置
CN110661719A (zh) * 2019-09-26 2020-01-07 杭州安恒信息技术股份有限公司 流量负载均衡方法和装置
CN110781132A (zh) * 2019-10-24 2020-02-11 深圳前海环融联易信息科技服务有限公司 文件存储的实现方法、装置、及计算机设备
CN112995245A (zh) * 2019-12-12 2021-06-18 中国科学院声学研究所 一种基于fpga的可配置负载均衡系统与方法
CN112995245B (zh) * 2019-12-12 2023-04-18 郑州芯兰德网络科技有限公司 一种基于fpga的可配置负载均衡系统与方法
CN111460510A (zh) * 2020-04-17 2020-07-28 支付宝(杭州)信息技术有限公司 基于隐私保护确定相同业务数据的方法及装置
CN111683144A (zh) * 2020-06-08 2020-09-18 北京字节跳动网络技术有限公司 一种访问请求处理的方法、装置、计算机设备及存储介质
CN111683144B (zh) * 2020-06-08 2022-06-17 北京字节跳动网络技术有限公司 一种访问请求处理的方法、装置、计算机设备及存储介质
CN112328291A (zh) * 2020-12-11 2021-02-05 上海市民信箱信息服务有限公司 一种app轻应用市场软件版本管控的方法
CN112965818A (zh) * 2021-02-26 2021-06-15 平安普惠企业管理有限公司 一种服务集群单元化分组方法、装置、设备以及介质
CN112965818B (zh) * 2021-02-26 2022-08-26 平安普惠企业管理有限公司 一种服务集群单元化分组方法、装置、设备以及介质

Similar Documents

Publication Publication Date Title
WO2013094837A1 (ko) 해시 함수 결과를 이용한 서버 부하 분산 처리 방법 및 그 장치
US11336614B2 (en) Content node network address selection for content delivery
KR101383905B1 (ko) 해시 함수 결과를 이용한 서버 부하 분산 처리 방법 및 그 장치
US8510372B2 (en) Gateway system and control method
CN106031130B (zh) 具有边缘代理的内容传送网络架构
US6850980B1 (en) Content routing service protocol
US10009271B2 (en) Routing method and network transmission apparatus
US7707287B2 (en) Virtual host acceleration system
US7685255B2 (en) System and method for prefetching uncacheable embedded objects
US8898331B2 (en) Method, network and computer program for processing a content request
US20070038637A1 (en) Optimized network cache for virus scanning by examining the magic bytes of a file
US11265395B2 (en) Data purge distribution and coherency
US20090299937A1 (en) Method and system for detecting and managing peer-to-peer traffic over a data network
US10068014B2 (en) Security information management for content delivery
RU2642833C2 (ru) Способ и устройство для обеспечения медиаресурса
WO2021072881A1 (zh) 基于对象存储的请求处理方法、装置、设备及存储介质
US10608981B2 (en) Name identification device, name identification method, and recording medium
WO2011019110A1 (ko) 콘텐츠 제공 시스템 및 방법
WO2015068929A1 (ko) 컨텐츠 중심 네트워크에서 패킷 특성을 고려하는 노드의 동작 방법 및 노드
US7359338B2 (en) Method and apparatus for transferring packets in network
US20050240609A1 (en) Method and apparatus for setting storage groups
JP2009245301A (ja) セッション管理・制御装置、方法、及び、プログラム
WO2010008192A2 (ko) 콘텐츠 전송 서비스 제공 방법 및 장치
US20040172560A1 (en) Stream server apparatus, program, and NAS device
WO2011002245A2 (ko) 요청배정장치를 이용한 상호협력캐시 방법 및 컨텐츠 제공 방법

Legal Events

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

Ref document number: 12859591

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14358125

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12859591

Country of ref document: EP

Kind code of ref document: A1