KR100566809B1 - Method for Controlling Cluster System and Computer-Readable Recording Medium Where Program Executing the Method Is Recorded - Google Patents
Method for Controlling Cluster System and Computer-Readable Recording Medium Where Program Executing the Method Is Recorded Download PDFInfo
- Publication number
- KR100566809B1 KR100566809B1 KR1020030041985A KR20030041985A KR100566809B1 KR 100566809 B1 KR100566809 B1 KR 100566809B1 KR 1020030041985 A KR1020030041985 A KR 1020030041985A KR 20030041985 A KR20030041985 A KR 20030041985A KR 100566809 B1 KR100566809 B1 KR 100566809B1
- Authority
- KR
- South Korea
- Prior art keywords
- cluster
- nodes
- node
- cluster system
- recorded
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/161—Computing infrastructure, e.g. computer clusters, blade chassis or hardware partitioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computer And Data Communications (AREA)
- Debugging And Monitoring (AREA)
Abstract
본 발명은 클러스터 시스템 제어 방법 내지 그러한 제어 방법을 수행하는 프로그램이 기록된 컴퓨터 판독 가능 기록 매체에 대한 것이다. 본 발명에 의한 클러스터 시스템 제어 방법은, 복수 개의 노드와 부하 분산 서버를 사용하여 구성한 클러스터 시스템의 제어 방법에 관한 것으로서, (1) 상기 복수 개의 노드의 IP 주소와 호스트 네임을 읽어와 기록하는 단계와, (2) 상기 IP 주소와 호스트 네임이 부여된 노드 각각의 중앙 처리 유니트의 사용량을 읽어와 기록하는 단계와, (3) 상기 기록된 중앙 처리 유니트의 사용량을 참조하여 상기 부하 분산 서버의 부하량을 변경시키는 단계와, (4) 상기 단계를 소정의 시간 간격으로 반복하는 단계를 포함한다.The present invention relates to a cluster system control method or a computer readable recording medium having recorded thereon a program for performing such a control method. The method for controlling a cluster system according to the present invention relates to a method for controlling a cluster system configured using a plurality of nodes and a load balancing server, the method comprising: (1) reading and recording IP addresses and host names of the plurality of nodes; (2) reading and recording the usage amount of the central processing unit of each node to which the IP address and the host name are assigned; and (3) loading the load balancing server by referring to the usage amount of the recorded central processing unit. Changing the step; and (4) repeating the step at predetermined time intervals.
클러스터, 실시간, 리눅스Cluster, real-time, Linux
Description
도 1은 본 발명에 의한 클러스터 시스템의 구성도를 도시한 도면.1 is a diagram showing the configuration of a cluster system according to the present invention;
도 2는 본 발명에 의한 클러스터 시스템의 제어 방법의 흐름도를 도시한 도면.2 is a flowchart illustrating a control method of a cluster system according to the present invention;
본 발명은 클러스터 시스템의 제어 방법 및 그 제어 방법이 수행되는 프로그램이 기록된 기록 매체에 관한 것으로서, 특히 복수 개의 노드를 가지고 클러스터 시스템을 구성하는 병렬 시스템의 노드 분배 제어 방법, 그리고 그러한 제어 방법을 수행하기 위한 프로그램이 기록되어 있는 컴퓨터 판독 가능 기록 매체에 관한 것이다.The present invention relates to a control method of a cluster system and a recording medium on which a program on which the control method is performed is recorded. In particular, the method of controlling a node distribution of a parallel system constituting a cluster system having a plurality of nodes, and performing such a control method A computer readable recording medium having recorded thereon a program therefor.
복잡하고 방대한 양의 연산을 수행하는 연산 장치로서 종래에는 단일의 고성능 컴퓨터 소위 수퍼 컴퓨터가 있었고, 현재 많은 연구소 내지 기관 등에서 사용되 고 있다. 그러나 이러한 수퍼 컴퓨터는 엄청난 고가이며, 그 성능도 한계에 도달하고 있는 실정이다.As a computing device that performs a complex and vast amount of operations, there has been a single high performance computer, a so-called supercomputer, and is currently used in many research institutes and institutions. However, such supercomputers are extremely expensive and their performance is reaching its limit.
이러한 단일의 고성능 수퍼 컴퓨터를 대체하는 것으로서 다수의 중앙 처리 유니트(CPU)가 하나의 문제를 협동적으로 계산하는 병렬 컴퓨팅 기술이 등장하였다. 그러나 이러한 병렬 컴퓨팅 기술이 적용된 컴퓨터 역시 고가이긴 마찬가지였다.As a replacement for this single high-performance supercomputer, parallel computing technology has emerged, in which multiple central processing units (CPUs) cooperatively calculate a problem. However, computers with this parallel computing technology were also expensive.
최근에 출시되고 있는 마이크로 프로세서들은 상당히 고성능으로 출시되고 있으며, 고속의 네트워킹 기술 역시도 크게 발전했으므로, 단일 컴퓨터들을 네트워크로 연결함으로써 새로운 개념의 병렬 컴퓨터를 구성하는 것이 가능해졌다. 특히, 리눅스 등과 같은 소스 코드가 공개된 운영 체제를 사용하게 되면 사용자 내지 네트워크 관리 전문가에 의하여 자유롭게 성능을 튜닝할 수 있어서 시스템 설계에 유리하다.Recently released microprocessors are coming out with very high performance, and high-speed networking technology has also evolved so much that it is possible to build a new concept of parallel computers by connecting them to a network. In particular, using an operating system in which source code such as Linux is open, the performance can be freely tuned by a user or a network management expert, which is advantageous for system design.
본 명세서에서 사용하는 클러스터 시스템은, 복수 개의 컴퓨터들이 서로 네트워킹이 가능하게 연결되어 있고, 외부에서 보았을 때 하나의 시스템 이미지로 보여지는 시스템을 의미한다. 클러스터를 구성하는 컴퓨터들은 "클러스터 노드" 또는 단순히 "노드"로 칭하기로 한다. 이처럼 클러스터 시스템을 구성하는 노드들은 저장 장치나 메모리 등을 공유할 수 있다. 클러스터 노드들은 근거리 통신망(LAN) 또는 원거리 통신망(WAN)을 이용하여 네트워킹 가능하도록 연결되어 있는 것이 일반적이다.The cluster system used in the present specification refers to a system in which a plurality of computers are connected to each other so as to be connected to each other and viewed as a system image when viewed from the outside. The computers that make up the cluster are referred to as "cluster nodes" or simply "nodes". In this way, the nodes constituting the cluster system can share storage devices or memory. Cluster nodes are typically connected so as to be networkable using a local area network (LAN) or a wide area network (WAN).
전술한 바와 같이 복수 개의 클러스터 노드를 연결하여 클러스터 시스템을 구성하고, 이것을 특정 용도로만 사용하는 것은 효율적이지 않다. 대표적으로 웹 서비스와 고속 연산 서비스를 제공할 수 있도록 클러스터 노드를 운영할 수 있는데, 이 때에는 웹 서비스와 고속 연산 서비스가 서로 충돌하지 않도록 각각의 클러스터 노드의 자원 사용량을 적절하게 분배해 주어야 한다.As described above, it is not efficient to connect a plurality of cluster nodes to form a cluster system and to use it only for a specific purpose. Typically, cluster nodes can be operated to provide web services and high-speed computation services. In this case, the resource usage of each cluster node should be properly distributed so that the web services and high-speed computation services do not collide with each other.
종래의 클러스터 시스템에서는, 관리자가 부하 분산 서버(Load Balancer)를 조작하여 각 클러스터 노드의 부하를 수동으로 지정하는 방식을 사용하였었다. 그러나 이러한 방식에서는, 부하 분산 서버가 각 클러스터 노드의 중앙 처리 유니트(CPU)의 실제 사용량 즉 실제 부하량을 실시간으로 체크하지 못하여, 외부로부터 웹 서비스 또는 고속 연산 수행 서비스 등의 요청이 들어왔을 때 클러스터 노드간에 적절하게 작업을 분배하지 못하는 문제점이 있었다.In a conventional cluster system, an administrator used a method of manually designating a load of each cluster node by operating a load balancer. In this method, however, the load balancer cannot check the actual usage of the central processing unit (CPU) of each cluster node in real time, so that a cluster node is received when a request such as a web service or a high speed computation service is received from the outside. There was a problem of not properly distributing work among the workers.
본 발명은 그러한 종래 기술의 문제점을 해결하고, 부하 분산 서버가 소정의 시간 간격 단위로 각 클러스터 노드의 자원 사용량을 알 수 있고, 외부로부터 작업 요청이 들어왔을 때에 상기 방법에 의해 파악된 클러스터 노드의 실제 자원 사용량 정보에 기초하여 어느 클러스터 노드에 작업을 할당할지를 결정하고 시스템을 제어할 수 있는 제어 방법, 및 그러한 제어 방법을 실행하기 위한 프로그램이 기록된 컴퓨터 판독 가능 기록 매체를 제공하는 것이다.The present invention solves such problems of the prior art, and the load balancing server can know the resource usage of each cluster node at predetermined time intervals, and when the work request from the outside comes in, A control method capable of determining which cluster node to allocate a task based on actual resource usage information and controlling a system, and a computer readable recording medium having recorded thereon a program for executing such a control method.
본 발명에 의한 클러스터 시스템 제어 방법은, 복수 개의 노드와 부하 분산 서버를 사용하여 구성한 클러스터 시스템의 제어 방법에 관한 것으로서, (1) 상기 복수 개의 노드의 IP 주소와 호스트 네임을 읽어와 기록하는 단계와, (2) 상기 IP 주소와 호스트 네임이 부여된 노드 각각의 자원 사용량을 읽어와 기록하는 단계와, (3) 상기 기록된 자원 사용량을 참조하여 상기 부하 분산 서버의 부하량을 변경시키는 단계와, (4) 상기 단계를 소정의 시간 간격으로 반복하는 단계를 포함한다.The method for controlling a cluster system according to the present invention relates to a method for controlling a cluster system configured using a plurality of nodes and a load balancing server, the method comprising: (1) reading and recording IP addresses and host names of the plurality of nodes; (2) reading and recording the resource usage of each node to which the IP address and the host name are assigned; (3) changing the load of the load balancing server with reference to the recorded resource usage; 4) repeating the above steps at predetermined time intervals.
이러한 방법에 의하면, 각 클러스터 노드의 자원 사용량을 읽어 들이고, 이러한 과정을 소정의 시간 간격으로 반복함으로써, 부하 분산 서버가 실시간에 가깝게 각각의 클러스터 노드의 사용량을 모니터링하고 이를 토대로 외부로부터의 작업 요청에 대응해 클러스터 노드를 스케쥴링할 수 있다. 그러므로 실제 클러스터 노드의 자원 사용량에 맞추어 적절하게 스케쥴링하는 것이 가능하게 되고 이로 인해 클러스터 시스템의 효율성과 안정성을 제고할 수 있게 된다.According to this method, the resource usage of each cluster node is read and the process is repeated at predetermined time intervals so that the load balancer monitors the usage of each cluster node in near real time and based on the request for work from outside. Correspondingly, you can schedule cluster nodes. Therefore, it is possible to schedule according to the resource usage of the actual cluster node, thereby improving the efficiency and stability of the cluster system.
본 발명에 의한 클러스터 노드의 제어 방법은, 새로운 서비스 요청을 접수했을 때에 변경된 부하 분산 서버의 부하량을 참조하여 소정의 룰에 따라 낮은 부하량의 노드로 서비스 처리 요청을 보내는 단계를 더 포함할 수도 있다.The method for controlling a cluster node according to the present invention may further include sending a service processing request to a node of a low load amount according to a predetermined rule with reference to the changed load balance server load amount when a new service request is received.
그리고 본 발명에 의한 클러스터 시스템은, 리눅스 기반인 것이 바람직한데, 리눅스의 소스 코드가 공개되어 있으므로 시스템 관리자 등이 자유롭게 시스템을 튜닝할 수 있으므로 실제 시스템의 환경에 맞도록 구성할 수 있게 된다.In addition, the cluster system according to the present invention is preferably Linux-based. Since the source code of Linux is disclosed, system administrators and the like can freely tune the system, so that the cluster system can be configured according to the actual system environment.
각 노드의 중앙 처리 유니트(CPU)의 사용량을 상기 자원 사용량으로 사용할 수 있다.The usage amount of the central processing unit (CPU) of each node may be used as the resource usage amount.
리눅스 기반으로 클러스터 시스템을 구성했을 때에, 소정의 시간 간격으로 반복하는 단계는, 크론(cron) 프로그램을 사용하여 수행되는 것이 바람직하다. 이 크론 프로그램을 사용하게 되면 크론탭(crontab)에 프로그램을 등록시켜서 일정 시간마다 상기 클러스터 노드의 자원 사용량 모니터링 프로그램을 실행시킬 수 있는데, 특히, 관리자가 크론탭에서 자원 사용량을 체크하는 시간을 조절할 수 있다. 즉 컴파일 후 실행파일로 구성하면 소스 코드를 알지 않는 한 추후 수정 내지 조정이 불가능한 다른 프로그램에 비해 관리의 용이성이 제고된다.When configuring a cluster system based on Linux, the step of repeating at predetermined time intervals is preferably performed using a cron program. If you use this cron program, you can register the program in the crontab and execute the resource usage monitoring program of the cluster node at a certain time. In particular, the administrator can control the time to check the resource usage in the crontab. have. In other words, if the program is compiled and compiled, it is easier to manage than other programs that cannot be modified or adjusted later unless the source code is known.
또한, 상기 클러스터 노드들은 웹 서비스와 고속 연산 서비스를 처리하는 작업을 수행하는 것일 수 있다.In addition, the cluster nodes may perform a task of processing a web service and a high speed computation service.
본 발명은, 전술한 바와 같은 제어 방법이 수행되는 프로그램이 기록된 컴퓨터 판독 가능 기록 매체도 제안하는데, 이러한 기록 매체는, 웹 서비스와 연산 서비스를 제공하는 복수 개의 노드와 부하 분산 서버를 사용하여 구성한 클러스터 시스템의 제어를 수행하는 제어 프로그램이 기록된 컴퓨터 판독 가능 기록 매체에 관한 것으로서, 상기 프로그램은 (1) 상기 복수 개의 노드의 IP 주소와 호스트 네임을 읽어와 기록하는 단계와, (2) 상기 IP 주소와 호스트 네임이 부여된 노드 각각의 자원 사용량을 읽어와 기록하는 단계와, (3) 상기 기록된 중앙 처리 유니트의 사용량을 참조하여 상기 부하 분산 서버의 부하량을 변경시키는 단계와, (4) 상기 단계를 소정의 시간 간격으로 반복하는 단계를 수행한다.The present invention also proposes a computer readable recording medium having recorded thereon a program on which the above-described control method is performed. The recording medium includes a plurality of nodes and a load balancing server that provide a web service and a computing service. A computer readable recording medium having recorded thereon a control program for performing control of a cluster system, the program comprising: (1) reading and recording IP addresses and host names of the plurality of nodes; and (2) the IP Reading and recording resource usage of each node to which an address and a host name are assigned; (3) changing a load of the load balancing server by referring to the recorded usage of the central processing unit; and (4) The step is repeated at predetermined time intervals.
이하에서는, 첨부 도면을 참조하여 본 발명의 실시예에 대해 상세히 설명하기로 한다.Hereinafter, with reference to the accompanying drawings will be described in detail an embodiment of the present invention.
도 1에는 본 발명에 의한 제어 방법이 실행되는 클러스터 시스템(1)의 블록도가 도시되어 있다.1 shows a block diagram of a
도 1에 도시된 바와 같이, 본 발명에 의한 클러스터 시스템(1)은 부하 분산 서버(10)와, 복수 개의 클러스터 노드(30-1, 30-2,..., 30-n)와, 부하 분산 서버(10)와 복수 개의 클러스터 노드(30-1, 30-2,..., 30-n)를 네트워킹 가능하게 연결하는 LAN/WAN망을 포함한다.As shown in FIG. 1, the
클러스터 시스템(1)은 외부 사용자측 단말기(100-1, 100-2, 200-1, 200-2, 200-3)와 인터넷 또는 인트라넷에 의해 연결되어 있다.The
클러스터 시스템(1)을 외부에서 보면 하나의 시스템 즉 가상 서버(2)로 보인다. 클러스터 노드(30-1, 30-2,..., 30-n)들은 클러스터 시스템(1) 내에서 실제 작업을 수행하는 실제 서버의 기능을 수행하는 것이다.The
본 발명에 의한 가상 서버(2)는 IP 터널링을 이용해서 동작하는데, IP 터널링은 부하 분산 서버(10)에서 사용자의 요청을 IP 터널을 이용해서 클러스터 노드(30-1, 30-2,..., 30-n)로 보낸다. 즉 사용자(100-1, 100-2, 200-1, 200-2, 200-3)가 서비스를 요청하면, 먼저 부하 분산 서버(10)의 외부 IP 주소 즉 가상 IP 주소로 접속하게 되고, 부하 분산 서버(10)가 사용자가 원하는 패킷의 목적지 주소와 포트 번호를 검사한다. 그렇게 검사한 내용이 소정의 가상 서버 규칙 테이블에 기재된 서비스와 일치하면 스케쥴링 알고리즘에 따라 각각의 클러스터 노드(30-1, 30-2,..., 30-n)를 선택한다. 이와 동시에 접속이 이루어진 것을 기록하는 해쉬 테이블에 새로운 접속을 추가하는데, 접속을 추가한 다음에 부하 분산 서버(1)에서 IP 데이터그램안에 패킷을 감싸 넣고 클러스터 노드(30-1, 30-2,..., 30-n)로 전송한다. 감싸진 패킷을 전송받은 클러스터 노드(30-1, 30-2,..., 30-n)는 패킷을 다 시 풀고 사용자가 요청한 서비스를 처리한 다음 최종적으로 클러스터 노드(30-1, 30-2,..., 30-n)의 라우팅 테이블에 따라 사용자에게 직접 결과를 돌려준다.The
그러나 본 발명의 권리범위가 IP 터널링 방식을 이용하는 가상 서버로 한정되는 것은 아니라는 점이 이해되어야 한다. 또한, 본 발명을 설명함에 있어서 리눅스 기반의 시스템을 설명하지만 본 발명의 권리범위가 그것에 한정되는 것도 아니라는 점이 명백히 이해되어야 한다.However, it should be understood that the scope of the present invention is not limited to the virtual server using the IP tunneling scheme. In addition, in describing the present invention, a Linux-based system is described, but it should be clearly understood that the scope of the present invention is not limited thereto.
부하 분산 서버(10)가 외부의 사용자(100-1, 100-2, 200-1, 200-2, 200-3)로부터 서비스 요청을 받으면 스케쥴링 프로세스를 거쳐 클러스터 노드(30-1, 30-2,..., 30-n)로 패킷을 보낸다. 본 발명에서는 가중치 기반 최소 접속 스케쥴링(Weighted Least-Connection Scheduling) 방식을 이용하는데, 이 방식은 각각의 클러스터 노드(30-1, 30-2,..., 30-n)에 가중치를 부여해서 가중치가 높은 노드에서 더 많은 요청을 받을 수 있도록 하는 방식이다.When the
본 발명에 의하면, 각각의 클러스터 노드(30-1, 30-2,..., 30-n)의 자원 사용량을 소정의 시간 간격으로 주기적으로 체크해서 부하 분산 서버(10)에서 사용할 가중치를 자동적으로 부여하는 방법이 제안된다.According to the present invention, the resource usage of each cluster node (30-1, 30-2, ..., 30-n) is periodically checked at predetermined time intervals to automatically determine the weight to be used in the
도 2에는 이러한 방법의 흐름도가 도시되어 있다.2 shows a flow diagram of this method.
본 발명에 의한 클러스터 시스템의 제어 방법을 수행하기 위해서는 먼저 각 클러스터 노드(30-1, 30-2,..., 30-n)의 IP 주소와 호스트 네임(hostname)을 알아야 한다. 각 노드의 IP 주소를 알기 위해서는 리눅스의 디렉토리인 "etc/hosts" 파일에서 정보를 얻어오고 이를 기록한다.(단계(S21)) 일반적으로 리눅스 시스템 의 "etc/hosts" 파일에는 각 노드를 구축하는 과정에서 각 노드의 IP와 호스트 네임이 예를 들어 아래와 같이 등록되어 있다.In order to perform the control method of the cluster system according to the present invention, an IP address and a hostname of each cluster node 30-1, 30-2, ..., 30-n must first be known. To know the IP address of each node, get information from the "etc / hosts" file, a directory in Linux, and record it (step S21). In the process, each node's IP and hostname are registered as shown below.
127.0.0.1 localhost.localdomain localhost127.0.0.1 localhost.localdomain localhost
210.125.177.xxx node01.cluster.co.kr node01210.125.177.xxx node01.cluster.co.kr node01
210.125.177.xxx node02.cluster.co.kr node02210.125.177.xxx node02.cluster.co.kr node02
210.125.177.xxx node03.cluster.co.kr node03210.125.177.xxx node03.cluster.co.kr node03
210.125.177.xxx node04.cluster.co.kr node04210.125.177.xxx node04.cluster.co.kr node04
210.125.177.xxx node05.cluster.co.kr node05210.125.177.xxx node05.cluster.co.kr node05
210.125.177.xxx node06.cluster.co.kr node06210.125.177.xxx node06.cluster.co.kr node06
상기 예에서, 127.0.0.1는 로컬 호스트 네트워크 번호로 지정되는 것이고, 이 주소는 로컬 시스템이 네트워크가 없는 환경하에서 네트워크 소프트웨어를 운영할 수 있게 해준다.In this example, 127.0.0.1 is specified as the local host network number, which allows the local system to run network software in a networkless environment.
각각의 인터넷 주소는 그와 상응되는 호스트네임을 가지고 있고 이는 사용자(100-1, 100-2, 200-1, 200-2, 200-3)에게 호스트네임으로 시스템을 인식할 수 있게 해준다. 호스트네임은 하나 이상의 별명(aliases)을 가질 수 있으며, 이 별명은 네트워크상에서 당해 호스트를 인식할 수 있는 이름이다. 본 실시예에서는 node**로 별명을 만들었다.Each Internet address has a corresponding hostname, which allows users 100-1, 100-2, 200-1, 200-2, and 200-3 to recognize the system as a hostname. A hostname can have one or more aliases, which are names that can recognize the host on the network. In this example, the alias is created as node **.
이처럼 리눅스 시스템의 "etc/hosts" 파일로부터 각 클러스터 노드의 IP 주소와 호스트네임을 얻어오는데, C++ 언어로 만든 프로그램의 수행 코드는 아래와 같을 수 있다.In this way, the IP address and hostname of each cluster node are obtained from the "etc / hosts" file of the Linux system. The execution code of the program written in C ++ language may be as follows.
ifstream real_server_name;ifstream real_server_name;
real_server_name.open("etc/hosts");real_server_name.open ("etc / hosts");
다음으로, 단계(S22)로 진행하여 노드 각각의 중앙 처리 유니트(CPU)의 사용량을 읽어온다.Next, the flow advances to step S22 to read the usage amount of the central processing unit (CPU) of each node.
리눅스를 채용한 본 발명에 있어서 각 클러스터 노드(30-1, 30-2,..., 30-n)의 중앙 처리 유니트 사용량을 얻어오기 위해서 리모트 쉘(remote shell; rsh) 명령을 사용한다. 구체적인 명령어의 일례는 다음과 같다.In the present invention employing Linux, a remote shell (rsh) command is used to obtain the central processing unit usage of each cluster node 30-1, 30-2, ..., 30-n. An example of a specific command is as follows.
rsh real_server_name ps aux │awk \'{print $3} \' > real_server_name_cpursh real_server_name ps aux │awk \ '{print $ 3} \'> real_server_name_cpu
상기 명령어에서 rsh는 명령어의 이름이고, real_server_name은 중앙 처리 유니트의 사용량을 얻어오기 위한 서버의 호스트네임이다. 그리고 ps aux │awk \'{print $3} \'는 중앙 처리 유니트의 사용량을 다른 컴퓨터로부터 받기 위한 rsh 명령어의 옵션을 의미한다. > real_server_name_cpu는 얻어온 각 클러스터 노드의 중앙 처리 유니트의 사용량을 real_server_name_cpu란 파일에 기록하라는 명령을 의미한다.In this command, rsh is the name of the command, and real_server_name is the hostname of the server to get the central processing unit usage. And ps aux | awk \ '{print $ 3} \' refers to the option of the rsh command to receive the usage of the central processing unit from another computer. > real_server_name_cpu means a command to record the usage of the central processing unit of each cluster node obtained in a file called real_server_name_cpu.
다음으로 단계(S23)로 진행하여 중앙 처리 유니트의 사용량을 참조하여 부하 분산 서버의 부하량을 변경한다.Next, the flow advances to step S23 to change the load of the load balancing server by referring to the usage of the central processing unit.
종래 기술에 있어서, 부하 분산 서버(10)에서 각 클러스터 노드에 가중치를 부여할 때에는 다음의 예와 같은 명령어를 명령어 입력창에 입력해서 수동으로 부여한다.In the related art, when weighting each cluster node in the
$IPVSADM -a -t 210.125.177.155 -r 192.168.1.5 -g -w 16$ IPVSADM -a -t 210.125.177.155 -r 192.168.1.5 -g -w 16
$IPVSADM -a -t 210.125.177.155 -r 192.168.1.6 -g -w 7$ IPVSADM -a -t 210.125.177.155 -r 192.168.1.6 -g -w 7
$IPVSADM -a -t 210.125.177.155 -r 192.168.1.7 -g -w 1$ IPVSADM -a -t 210.125.177.155 -r 192.168.1.7 -g -
즉 리눅스 시스템에서 각 노드에 가중치를 수동으로 부여하는 명령어는,In other words, the command to manually weight each node in the Linux system,
$IPVSADM -a -t [부하 분산 서버의 IP 주소] -r [노드의 IP 주소] -g -w [가중치]이다.$ IPVSADM -a -t [IP address of load balancing server] -r [node IP address] -g -w [weight].
본 발명에 있어서는 최종의 가중치 부분을 전술한 단계(S22)에서 읽어온 각 클러스터 노드의 중앙 처리 유니트 사용량을 참조해서 부여한다. 예를 들어, 고속 연산을 수행하고 있는 클러스터 노드(30-2)의 중앙 처리 유니트의 사용량이 99 %라면, 이 99 %의 가중치를 당해 노드에 적용해서 외부로부터 서비스 요청이 있을 때 그 노드로는 작업 요청을 보내지 않도록 한다.In the present invention, the final weight portion is given with reference to the central processing unit usage of each cluster node read in step S22 described above. For example, if the central processing unit of the cluster node 30-2 that is performing the high-speed operation is 99%, the weight of 99% is applied to the node to request the service from the outside. Do not send work requests.
그러나 클러스터 시스템(1)은 시간에 따라 각 클러스터 노드(30-1, 30-2,..., 30-n)의 중앙 처리 유니트의 사용량은 변경될 수 있기 때문에 본 발명에 의한 제어 방법은 소정의 시간 간격으로 전술한 단계를 반복한다.However, in the
상기 단계를 종료하면 단계(S24)로 진행해서 시간을 읽은 후 단계(S25)로 진행한다. 단계(S25)에서 소정의 시간이 경과한 것으로 판단되면 단계(S22)로 복귀해서 다시 각각의 노드의 중앙 처리 유니트의 사용량을 읽어오고 전술한 단계를 반복한다.When the above step is finished, the process proceeds to step S24, after which time is read, the process proceeds to step S25. If it is determined in step S25 that the predetermined time has elapsed, the process returns to step S22 to read the usage amount of the central processing unit of each node again and repeat the above-described steps.
단계(S25)에서 소정의 시간이 경과하지 않은 것으로 판단되면 단계(S24)로 복귀해서 미리 정해 놓은 시간 간격이 될 때까지 대기한다.If it is determined in step S25 that the predetermined time has not elapsed, the process returns to step S24 and waits until a predetermined time interval is reached.
이처럼 소정의 시간 간격으로 반복을 실행하도록 하는 것은 리눅스의 크론(cron)을 사용한다. 크론을 이용한 자동 작업 스케쥴링은 작업 내용을 위한 간단한 쉘 스크립트(shell script)를 만드는 것과, 실행 스크립트를 크론탭(crontab)을 이용해서 크론에서 자동실행 할 수 있도록 정의하는 것으로 나뉘어진다.This kind of repetition at regular intervals uses Linux's cron. Automatic task scheduling with cron is divided into creating a simple shell script for the task and defining the executable script to be automatically executed in cron using the crontab.
크론을 사용하기 위해서는 etc/crontab이란 명령을 이용한다. 다음은 /etc/crontab의 내용이다.To use cron, use the command etc / crontab. The following is the contents of / etc / crontab.
SHELL = /bin/bashSHELL = / bin / bash
PATH = /sbin:/bin:/usr/sbin:/usr/binPATH = / sbin: / bin: / usr / sbin: / usr / bin
MAILTO = rootMAILTO = root
HOME = /HOME = /
# run-parts# run-parts
01 * * * * root run-parts /etc/cron.hourly01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly42 4 1 * * root run-parts /etc/cron.monthly
* 표는 all을 뜻하는 부분으로 매번 실행한다는 의미이다.* The table means all, which means run every time.
01 * * * * 부분의 내용은 매월, 매주, 매일, 매시 01 분마다 실행하라는 의 미이다. 즉 한시간에 한 번씩 실행하라는 의미이다.The content of 01 * * * * means to run every month, every week, every day, every 01 minutes. That means run it once an hour.
run-parts /etc/cron.hourly 부분의 내용은 /etc/cron.hourly/ 디렉토리에 있는 스크립트를 실행하라는 의미이다. 즉 스크립트 파일을 /etc/cron.hourly/ 디렉토리에 넣어 두면 한 시간에 한 번씩 스크립트가 실행되게 된다.run-parts The contents of the /etc/cron.hourly section mean to run scripts in the /etc/cron.hourly/ directory. In other words, if you put the script file in the /etc/cron.hourly/ directory, the script will run once an hour.
마찬가지로 두번째 줄은 매일 4시 2분에 /etc/cron.daily/ 디렉토리에 있는 스크립트 파일을 실행하라는 의미이고, 세번째 줄은 매 일요일 4시 22분마다 스크립트 파일을 실행하라는 의미이다.Similarly, the second line means to run the script file in the /etc/cron.daily/ directory at 4:02 every day, and the third line to run the script file every 4:22 every Sunday.
크론탭에 본 발명에 의한 방법을 수행하는 프로그램을 등록시키면, 일정시간마다 프로그램을 실행시켜서 주기적으로 각 클러스터 노드(30-1, 30-2,..., 30-n)의 중앙 처리 유니트의 사용량을 체크하여 부하 분산 서버(10)를 제어하게 한다.When a program for performing the method according to the present invention is registered in the crontab, the program is executed at predetermined time intervals to periodically check the central processing unit of each cluster node 30-1, 30-2, ..., 30-n. The usage is checked to control the
이처럼 크론탭을 사용하면 관리자가 능동적으로 프로그램을 제어할 수 있게 된다. 즉 일반적인 프로그램에 의하면 일단 컴파일해서 실행파일로 변환되면 소스코드를 가지고 있지 않는 한 프로그램의 내용을 바꿀 수 없지만 크론탭을 사용하면, 관리자가 단순히 크론탭에서 중앙 처리 유니트의 사용량을 읽어오는 시간 간격을 조정하기만 하면 되므로 매우 간편하게 클러스터 시스템을 관리할 수 있게 된다.Using crontabs like this allows administrators to actively control the program. That is, according to the general program, once compiled and converted into an executable file, the contents of the program cannot be changed unless it has source code. All you have to do is make it very easy to manage your cluster systems.
전술한 클러스터 시스템의 제어 방법은 컴퓨터에서 실행 가능한 컴퓨터 프로그램에 의해 수행되는 것이 바람직하며, 그러한 컴퓨터 프로그램은 컴퓨터에서 판독 가능한 기록 매체에 기록되어 저장된다.The above-described control method of the cluster system is preferably performed by a computer program executable on a computer, and such computer program is recorded and stored in a computer-readable recording medium.
이상 본 발명의 바람직한 실시예를 첨부 도면을 참조하여 설명하였지만, 본 발명의 권리범위는 첨부한 특허청구의 범위의 기재에 의하여 정하여지며, 전술한 실시예 또는 도면에 한정되는 것으로 해석되어서는 아니된다. 또한, 특허청구의 범위에 기재되어 있는 발명의 당업자에게 자명한 개량, 변경 내지 수정도 본 발명의 권리범위에 포함됨이 명백하게 이해되어야 한다.While preferred embodiments of the present invention have been described with reference to the accompanying drawings, the scope of the present invention is defined by the description of the appended claims, and should not be construed as limited to the embodiments or drawings described above. . In addition, it should be clearly understood that improvements, changes, and modifications apparent to those skilled in the art described in the claims are included in the scope of the present invention.
본 발명에 의하면, 웹 서비스와 고속 연산 서비스를 제공하는 복수 개의 클러스터 노드들로 구성되는 클러스터 시스템을 제어함에 있어서, 각 클러스터 노드들의 자원 사용량을 실시간 내지 일정한 시간 간격으로 주기적으로 체크할 수 있고, 그렇게 체크된 클러스터 노드들의 자원 사용량을 참조하여 각 노드의 가중치를 부하 분산 서버가 조절함으로써 노드들 간의 자원 사용의 충돌없이 유기적으로 시스템을 제어하는 것이 가능하다.According to the present invention, in controlling a cluster system consisting of a plurality of cluster nodes that provide a web service and a high-speed computation service, the resource usage of each cluster node can be periodically checked in real time or at regular time intervals. The load balancing server adjusts the weight of each node with reference to the resource usage of the checked cluster nodes, and thus it is possible to control the system organically without conflicting resource usage between nodes.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020030041985A KR100566809B1 (en) | 2003-06-26 | 2003-06-26 | Method for Controlling Cluster System and Computer-Readable Recording Medium Where Program Executing the Method Is Recorded |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020030041985A KR100566809B1 (en) | 2003-06-26 | 2003-06-26 | Method for Controlling Cluster System and Computer-Readable Recording Medium Where Program Executing the Method Is Recorded |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR20-2003-0020295U Division KR200327901Y1 (en) | 2003-06-26 | 2003-06-26 | Cluster System Automatically Checking Resource Availability of Cluster Nodes |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20050001705A KR20050001705A (en) | 2005-01-07 |
KR100566809B1 true KR100566809B1 (en) | 2006-04-05 |
Family
ID=37217336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020030041985A KR100566809B1 (en) | 2003-06-26 | 2003-06-26 | Method for Controlling Cluster System and Computer-Readable Recording Medium Where Program Executing the Method Is Recorded |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100566809B1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6874031B2 (en) * | 2002-10-07 | 2005-03-29 | Qualcomm Inc. | Method and apparatus for sharing authentication session state in a global distributed network |
KR100654391B1 (en) * | 2005-04-22 | 2006-12-06 | 이광훈 | Method for Controlling Cluster System and Cluster System Comprising A Program Recorded Media Readable by A Computer Executing The Method |
KR100717216B1 (en) * | 2005-09-05 | 2007-05-11 | 주식회사 태울엔터테인먼트 | Method for Controlling Cluster System |
CN113821340A (en) * | 2021-08-27 | 2021-12-21 | 济南浪潮数据技术有限公司 | Dynamic balancing method, system, terminal and storage medium of distributed system |
-
2003
- 2003-06-26 KR KR1020030041985A patent/KR100566809B1/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
KR20050001705A (en) | 2005-01-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11539753B2 (en) | Network-accessible service for executing virtual machines using client-provided virtual machine images | |
US7818454B2 (en) | Host migration system | |
CN111324416A (en) | Application deployment in a container management system | |
US8537825B1 (en) | Lockless atomic table update | |
US8856255B2 (en) | Methods and apparatus to migrate virtual machines between distributive computing networks across a wide area network | |
US20190268270A1 (en) | Network traffic flow logging in distributed computing systems | |
US7197553B2 (en) | Network system having a virtual-service-module | |
US7146417B1 (en) | System for distributing load over multiple servers at an internet site | |
US8370481B2 (en) | Inventory management in a computing-on-demand system | |
US20190356631A1 (en) | Using network configuration analysis to improve server grouping in migration | |
US20100318609A1 (en) | Bridging enterprise networks into cloud | |
US10908940B1 (en) | Dynamically managed virtual server system | |
CN114500523B (en) | Fixed IP application publishing method based on container cloud platform | |
US11489814B1 (en) | Customized domain name resolution for virtual private clouds | |
US20200329098A1 (en) | Migrating a network service to a container-based platform | |
US10944714B1 (en) | Multi-factor domain name resolution | |
EP3977707B1 (en) | Hardware load balancer gateway on commodity switch hardware | |
CN108200211A (en) | Method, node and the inquiry server that image file is downloaded in cluster | |
US20040143648A1 (en) | Short-cut response for distributed services | |
KR100566809B1 (en) | Method for Controlling Cluster System and Computer-Readable Recording Medium Where Program Executing the Method Is Recorded | |
CN214202379U (en) | Distributed shared file system | |
KR200327901Y1 (en) | Cluster System Automatically Checking Resource Availability of Cluster Nodes | |
US11876689B1 (en) | Method and system for SLA/QoS adherence-based flex on demand in a multi-API virtual desktop infrastructure (VDI) environment | |
Broberg et al. | Task assignment with work-conserving migration | |
US11363113B1 (en) | Dynamic micro-region formation for service provider network independent edge locations |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20120302 Year of fee payment: 7 |
|
LAPS | Lapse due to unpaid annual fee |