KR102448789B1 - Method for scheduling worker in cloud computing system and apparatus using the same - Google Patents

Method for scheduling worker in cloud computing system and apparatus using the same Download PDF

Info

Publication number
KR102448789B1
KR102448789B1 KR1020190110622A KR20190110622A KR102448789B1 KR 102448789 B1 KR102448789 B1 KR 102448789B1 KR 1020190110622 A KR1020190110622 A KR 1020190110622A KR 20190110622 A KR20190110622 A KR 20190110622A KR 102448789 B1 KR102448789 B1 KR 102448789B1
Authority
KR
South Korea
Prior art keywords
worker
ready
workers
function
active
Prior art date
Application number
KR1020190110622A
Other languages
Korean (ko)
Other versions
KR20200068562A (en
Inventor
김영호
김재열
온진호
장수민
차규일
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to US16/583,504 priority Critical patent/US11175960B2/en
Publication of KR20200068562A publication Critical patent/KR20200068562A/en
Application granted granted Critical
Publication of KR102448789B1 publication Critical patent/KR102448789B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation 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/5038Allocation 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 execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Factory Administration (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

클라우드 컴퓨팅 시스템의 워커 스케줄링 방법 및 이를 위한 장치가 개시된다. 본 발명의 일실시예에 따른 워커 스케줄링 방법은 펑션(FUNCTION) 수행을 위한 워커(WORKER) 할당 요청이 발생하기 이전에, 워커 실행 준비 부하를 분산 처리하기 위해 템플릿 워커(TEMPLATE WORKER)를 사전 생성(PRE-CREATION)하는 부하 분산 1단계; 펑션 별 워커 할당 요청 주기의 변화를 고려하여 사전 워커 할당 개수를 예측하는 단계; 및 상기 템플릿 워커를 상기 사전 워커 할당 개수에 상응하는만큼 워커 업 스케일링(WORKER UP SCALING)하여 레디 워커(READY WORKER)를 사전 할당(PRE-ALLOCATION)하는 부하 분산 2단계를 포함한다.A method for scheduling a worker in a cloud computing system and an apparatus therefor are disclosed. The worker scheduling method according to an embodiment of the present invention generates a template worker (TEMPLATE WORKER) in advance to distribute the worker execution preparation load before a worker assignment request for performing a function occurs ( PRE-CREATION) load balancing step 1; estimating the number of worker assignments in advance in consideration of a change in worker assignment request period for each function; and a second step of load balancing of pre-allocating ready workers (READY WORKER) by up-scaling the template workers by the number of workers corresponding to the pre-allocated number of workers (WORKER UP SCALING).

Description

클라우드 컴퓨팅 시스템의 워커 스케줄링 방법 및 이를 위한 장치 {METHOD FOR SCHEDULING WORKER IN CLOUD COMPUTING SYSTEM AND APPARATUS USING THE SAME}Cloud computing system worker scheduling method and device therefor

본 발명은 서버리스 클라우드 컴퓨팅 환경에서의 워커 스케줄링 기술에 관한 것으로, 특히 펑션 수준의 마이크로 서비스를 제공하는 마이크로 펑션 플랫폼에서 펑션을 수행하기 위한 워커를 할당하는 기술에 관한 것이다.The present invention relates to a worker scheduling technique in a serverless cloud computing environment, and more particularly, to a technique for allocating workers to perform a function in a microfunction platform that provides a function-level microservice.

최근 구글의 딥마인드 인공지능(AI) 알파고로 인해 인공지능이 IT 분야의 핫 트렌드로 떠오르고 있다. 이런 알파고의 연산 능력은 머신러닝을 구현할 수 있는 분산형 클라우드 컴퓨팅 기반 인프라가 있기에 가능했다. 자율 주행 및 맞춤 의료에서 슈퍼 휴먼 음성 인식에 이르는 인공지능 워크로드가 클라우드에서 인기를 끌면서 딥 러닝 트레이닝, 추론, 고급 분석 및 고성능 컴퓨팅을 포함하는 거의 모든 가속화된 워크로드에 최적의 성능과 유연성을 제공할 수 있다. Recently, due to Google's Deep Mind AI (AlphaGo), artificial intelligence is emerging as a hot trend in the IT field. AlphaGo’s computational power was possible because of the distributed cloud computing-based infrastructure that can implement machine learning. Artificial intelligence workloads from autonomous driving and personalized medicine to superhuman speech recognition are gaining popularity in the cloud, providing optimal performance and flexibility for virtually any accelerated workload including deep learning training, inference, advanced analytics, and high-performance computing. can do.

클라우드 컴퓨팅이란 데이터를 실제 자신의 컴퓨터나 서버가 아닌 네트워크 상에 연결된 다른 컴퓨터에서 가상화를 통해 처리하는 기술을 말한다. 구글 딥마인드는 인공지능과 머신러닝을 연구하는 연구원들이 컴퓨팅, 저장 공간 및 네트워킹 기술을 필요할 때마다 사용할 수 있도록 구글 클라우드 플랫폼을 폭넓게 활용했다. 인공지능의 또 다른 강자 IBM의 인지컴퓨팅 시스템 왓슨도 클라우드 컴퓨팅을 기반으로 작동된다. IBM의 초기 인공지능이었던 제퍼디는 클라우드 컴퓨팅 기술이 상용화가 되지 않았던 시기에 개발되어 일반 단일 서버에서 구현됐지만, 왓슨부터는 클라우드 컴퓨팅으로 전환됐다. 실제 IBM은 엔터프라이즈 하이브리드 클라우드 서비스를 왓슨을 기반으로 연결하고 있다. Cloud computing refers to a technology that processes data through virtualization on another computer connected to the network, not on one's own computer or server. Google DeepMind made extensive use of the Google Cloud Platform to give researchers working on artificial intelligence and machine learning access to computing, storage and networking technologies whenever they needed them. IBM's cognitive computing system Watson, another powerhouse in artificial intelligence, also operates based on cloud computing. Jeopardy, which was IBM's early artificial intelligence, was developed at a time when cloud computing technology was not commercially available and implemented on a single general server. In fact, IBM is connecting enterprise hybrid cloud services based on Watson.

FaaS(Function as a Service)는 클라우드 컴퓨팅 패러다임의 발전과 이벤트 기반 컴퓨팅 모델에 대한 수요 증가로 클라우드 컴퓨팅 분야에서 널리 활용되고 있다. FaaS 컴퓨팅 플랫폼에서 펑션을 수행하는 워커는 계산 노드의 컨테이너와 같은 경량 가상 환경 인스턴스에서 펑션을 로딩하고, 해당 펑션을 실행시키고, 처리 결과를 반환하는 과정을 수행한다. FaaS (Function as a Service) is being widely used in the cloud computing field due to the development of the cloud computing paradigm and the increase in demand for an event-based computing model. A worker performing a function in the FaaS computing platform loads a function in a lightweight virtual environment instance such as a container of a compute node, executes the function, and returns the processing result.

이 때, 워커 스케줄링(Worker Scheduling)은 펑션을 수행할 최적의 자원을 가진 계산 노드를 찾고 펑션 실행 환경을 준비하는 과정으로, 다음의 세 단계로 구성된다. 첫째, 워커를 생성하기 위한 최적의 자원을 가진 계산 노드를 선택하고 할당한다. 둘째, 할당된 계산 노드에서 컨테이너와 같은 경량 가상 환경 인스턴스를 생성하고 초기화 시킨다. 마지막으로, 펑션과 관련 패키지 및 라이브러리 파일을 저장소(repository)로부터 워커 인스턴스에 적재한다. 만약, 최초 할당일 경우에는 워커를 할당하기 전에 앞의 세 단계를 모두 수행해야 한다. 하지만, 펑션을 수행하고 할당이 종료된 워커가 있는 경우, 해당 워커를 다시 사용할 수 있는데, 이 경우에는 워커 할당 응답 시간이 최소한의 비용으로 처리가 된다. At this time, worker scheduling is a process of finding a computation node with an optimal resource to perform a function and preparing a function execution environment, and consists of the following three steps. First, a computational node with optimal resources for creating a worker is selected and assigned. Second, a lightweight virtual environment instance such as a container is created and initialized in the allocated compute node. Finally, the function and related packages and library files are loaded into the worker instance from the repository. In case of initial allocation, all three steps must be performed before allocating a worker. However, if there is a worker whose assignment has been completed after executing a function, the worker can be used again. In this case, the worker assignment response time is processed at the minimum cost.

기존 FaaS 컴퓨팅 플랫폼의 스케줄러는 도 1 내지 도 2에 도시된 것처럼 2단계 워커 상태를 기반으로 워커 할당을 처리한다. 예를 들어, 워커 스케줄러에서 계산 노드 및 자원을 할당하는 작업을 수행하면, 계산 노드에서는 물리적인 워커 인스턴스를 생성 및 초기화하고 실행할 펑션을 로딩하여 준비하는 작업을 진행한다.The scheduler of the existing FaaS computing platform processes worker assignment based on the two-step worker state as shown in FIGS. 1 to 2 . For example, if the worker scheduler performs the task of allocating compute nodes and resources, the compute node creates and initializes a physical worker instance and loads and prepares functions to be executed.

이 때, 도 2는 2단계 워커 상태 기반 워커 스케줄링의 비용을 확인하기 위해 FaaS 프로토타입에서 펑션의 실행을 시험함으로써 FaaS 플랫폼상에서 펑션 실행 워커의 할당부터 펑션의 로딩까지 펑션의 실제 실행에 필요한 준비 부하를 분석한 결과에 해당한다. 도 2를 참조하면, 경량 컨테이너를 사용함에도 최초 워커 할당 시 1,750ms, 이후 동일한 노드에서 재할당시 470ms의 워커 생성 비용이 요구됨을 확인할 수 있다. 이와 같이 워커 할당 과정은 물리적인 워커 인스턴스인 경량 가상화 컨테이너의 최초 생성 및 기동에 많은 시간이 소요된다. 따라서, 워커 할당을 요청시점에 처리하는 것은 펑션 실행을 더욱 지연시키는 문제점을 갖게 된다.At this time, Figure 2 shows the preparatory load required for the actual execution of the function from the assignment of the function execution worker on the FaaS platform to the loading of the function by testing the execution of the function in the FaaS prototype to check the cost of the worker scheduling based on the state of the two-step worker. corresponds to the results of the analysis. Referring to FIG. 2 , it can be seen that, even when a lightweight container is used, a worker creation cost of 1,750 ms is required for initial worker assignment and 470 ms for reallocation in the same node thereafter. In this way, the worker assignment process takes a lot of time to initially create and start a lightweight virtualized container that is a physical worker instance. Therefore, processing worker assignment at the time of request has a problem of further delaying function execution.

즉, 2단계 워커 상태 기반의 워커 스케줄링 알고리즘은 워커 최초 생성 비용이 워커 할당에서 차지하는 비율이 너무 크고, 빠른 처리가 요구되는 단기 펑션에서 수행 시간이 증가하는 문제를 야기시킨다. 또한, 펑션 서비스 요청의 부하가 급증하거나 변동이 심한 경우, 기존 생성된 워커가 수행 종료되기 전에 연속된 할당 요청이 발생할 수 있다. 이러한 경우 요청 기반의 워커 생성 방식으로는 할당에 대한 응답 시간의 증가로 이어지고, 펑션 서비스를 위한 워커 할당의 빠른 처리가 어렵게 된다.In other words, the worker scheduling algorithm based on the two-step worker state causes a problem that the initial worker creation cost occupies too much of the worker allocation and the execution time increases for short-term functions that require fast processing. In addition, when the load of the function service request is rapidly increased or fluctuated, continuous allocation requests may occur before the previously created worker is executed. In this case, the request-based worker creation method leads to an increase in response time to assignment, and it becomes difficult to quickly process worker assignment for function services.

한국 공개 특허 제10-2016-0136489호, 2016년 11월 30일 공개(명칭: 클라우드 서비스를 위한 가상화 기반 자원 관리 방법)Korean Patent Publication No. 10-2016-0136489, published on November 30, 2016 (Title: Virtualization-based resource management method for cloud services)

본 발명의 목적은 펑션 서비스를 수행하는 컨테이너 기반의 워커를 빠르게 할당하고, 응답 비용을 최소화하기 위한 워커 스케줄링 기술을 제공하는 것이다.SUMMARY OF THE INVENTION It is an object of the present invention to provide a worker scheduling technique for quickly allocating container-based workers performing function services and minimizing response costs.

또한, 본 발명의 목적은 펑션 서비스 요청 부하 변동에 능동적으로 대응하고, 빠른 응답 시간이 요구되는 단기 펑션 서비스의 할당 지연 시간을 최소화할 수 있는 워커 스케줄링 기술을 제공하는 것이다.Another object of the present invention is to provide a worker scheduling technique capable of actively responding to a function service request load change and minimizing the allocation delay time of a short-term function service requiring a fast response time.

또한, 본 발명의 목적은 펑션 실행과 관련된 워커의 실행 준비 부하를 사전에 적절히 분산함으로써 FaaS 플랫폼이 실시간 처리 환경에 보다 적합하도록 하는 새로운 워커 스케줄링 기술을 제공하는 것이다.In addition, it is an object of the present invention to provide a new worker scheduling technology that makes the FaaS platform more suitable for a real-time processing environment by properly distributing the execution preparation load of workers related to function execution in advance.

또한, 본 발명의 목적은 워커의 할당 작업을 요구 발생 이전에 2단계의 사전 할당 방식으로 분산 처리하고, 서비스에 필요한 워커를 펑션의 요청 주기와 수행 시간을 이용하여 사전에 할당함으로써 워커 할당 요청에 대한 스케줄링 비용을 최소화하는 것이다.In addition, it is an object of the present invention to distribute worker assignment tasks in a two-step pre-allocation method before request generation, and to allocate workers required for service in advance using the function request period and execution time to respond to worker assignment requests. to minimize scheduling costs.

또한, 본 발명의 목적은 자원 격리형 가상 클라우드 인프라 서비스를 필요로 하는 시스템, 다기관 의료 지능 특화형 학습 및 진단 공유 플랫폼에 적용할 수 있는 워커 할당 비용이 대폭적으로 개선된 워커 스케줄러를 제공하는 것이다. In addition, it is an object of the present invention to provide a worker scheduler with significantly improved worker allocation cost that can be applied to a system requiring a resource-isolated virtual cloud infrastructure service and a multi-institutional medical intelligence specialized learning and diagnosis sharing platform.

상기한 목적을 달성하기 위한 본 발명에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 펑션(FUNCTION) 수행을 위한 워커(WORKER) 할당 요청이 발생하기 이전에, 워커 실행 준비 부하를 분산 처리하기 위해 템플릿 워커(TEMPLATE WORKER)를 사전 생성(PRE-CREATION)하는 부하 분산 1단계; 펑션 별 워커 할당 요청 주기의 변화를 고려하여 사전 워커 할당 개수를 예측하는 단계; 및 상기 템플릿 워커를 상기 사전 워커 할당 개수에 상응하는만큼 워커 업 스케일링(WORKER UP SCALING)하여 레디 워커(READY WORKER)를 사전 할당(PRE-ALLOCATION)하는 부하 분산 2단계를 포함한다.In a worker scheduling method of a cloud computing system according to the present invention for achieving the above object, before a worker assignment request for performing a function occurs, a template worker ( 1st step of load balancing to pre-create (PRE-CREATION) TEMPLATE WORKER; estimating the number of worker assignments in advance in consideration of a change in worker assignment request period for each function; and a second step of load balancing of pre-allocating ready workers (READY WORKER) by up-scaling the template workers by the number of workers corresponding to the pre-allocated number of workers (WORKER UP SCALING).

이 때, 펑션 수행을 위한 워커 할당 요청이 발생한 경우에 상기 레디 워커를 액티브 워커(ACTIVE WORKER)로 할당하고, 펑션 서비스 요청 부하를 고려하여 할당이 해제된 레디 워커의 상태를 변경하는 단계를 더 포함할 수 있다.At this time, when a worker assignment request for performing a function occurs, allocating the ready worker as an active worker, and changing the status of the de-allocated ready worker in consideration of the function service request load. can do.

이 때, 상기 사전 할당된 레디 워커 중 기설정된 유휴 기간 동안 사용되지 않는 레디워커를 워커 다운 스케일링(WORKER DOWN SCALING)하여 상기 템플릿 워커로 초기화하는 단계를 더 포함할 수 있다.At this time, the step of initializing the pre-allocated ready workers to the worker down-scaling (WORKER DOWN SCALING) a ready worker that is not used during a preset idle period may further include the step of initializing as the template worker.

이 때, 상기 템플릿 워커는 모든 펑션에서 공통으로 사용할 수 있도록 기본 이미지와 자원 용량에 상응하게 구성된 임시 워커에 상응할 수 있다.In this case, the template worker may correspond to a temporary worker configured to correspond to the basic image and resource capacity to be commonly used by all functions.

이 때, 상기 레디 워커는 펑션 수행을 위한 자원 정보의 설정 및 자원 할당이 완료된 펑션 실행 준비 상태의 워커에 상응할 수 있다.In this case, the ready worker may correspond to a worker in a function execution preparation state in which the resource information setting and resource allocation for performing the function have been completed.

이 때, 상기 레디 워커의 상태는 자원 할당 및 펑션 파일의 로딩이 완료된 액티브 레디(ACTIVE READY) 상태 및 자원이 할당되지 않았지만 펑션 파일의 로딩이 완료된 인액티브 레디(INACTIVE READY) 상태 중 어느 하나에 해당할 수 있다.At this time, the state of the ready worker corresponds to any one of an active-ready state in which resource allocation and loading of the function file are completed, and an inactive-ready state in which the resource is not allocated but loading of the function file is completed. can do.

이 때, 액티브 워커 사용 비율(ACTIVE WORKER USAGE RATIO)이 기설정된 액티브 상위 기준 값을 초과하는 경우, 상기 템플릿 워커를 상기 레디 워커로 변경하는 레디 워커 업 스케일링(READY WORKER UP SCALING)을 수행하는 단계; 및 상기 액티브 워커 사용 비율이 기설정된 액티브 하위 기준 값 미만일 경우, 상기 액티브 레디 상태의 레디 워커를 상기 인액티브 레디 상태로 변경시키는 단계를 더 포함할 수 있다.At this time, when the active worker usage ratio (ACTIVE WORKER USAGE RATIO) exceeds a preset active upper reference value, performing ready worker up-scaling (READY WORKER UP SCALING) to change the template worker to the ready worker; and when the active worker usage ratio is less than a preset active lower reference value, changing the active-ready ready-worker to the inactive-ready state.

이 때, 액티브 워커 사용 비율은 상기 액티브 레디 상태의 레디 워커와 상기 액티브 워커를 합한 워커들 중 상기 액티브 워커의 비율에 상응할 수 있다.In this case, the active worker usage ratio may correspond to a ratio of the active worker among workers in which the active worker and the ready worker in the active-ready state are combined.

이 때, 인액티브 워커 비율(INACTIVE WORKER RATIO)이 기설정된 인액티브 상위 기준값을 초과하는 경우, 상기 인액티브 레디 상태의 레디 워커를 상기 템플릿 워커로 변경하는 레디 워커 다운 스케일링(READY WORKER DOWN SCALING)을 수행하는 단계를 더 포함할 수 있다.At this time, if the inactive worker ratio (INACTIVE WORKER RATIO) exceeds a preset inactive upper reference value, the ready worker in the inactive ready state is changed to the template worker ready worker down scaling (READY WORKER DOWN SCALING) It may further include the step of performing.

이 때, 상기 템플릿 워커의 개수가 최대 생성 가능 워커 수 대비 기설정된 허용 한계 이하일 경우, 백그라운드에서 템플릿 워커 업 스케일링(TEMPLATE WORKER UP SCALING)을 수행하여 상기 템플릿 워커를 추가 생성하는 단계를 더 포함할 수 있다.At this time, if the number of template workers is less than a preset allowable limit compared to the maximum number of workers that can be created, performing TEMPLATE WORKER UP SCALING in the background to additionally create the template workers. have.

이 때, 상기 펑션 별 워커 할당 요청 주기는 펑션 별 단위 시간 동안에 할당 요구되는 워커의 개수를 기반으로 산출되고, 상기 사전 워커 할당 개수는 상기 펑션 별 단위 시간 동안에 요구되는 워커의 개수에서 상기 액티브 레디 상태인 레디 워커와 상기 액티브 워커의 개수를 뺀 값에 상응할 수 있다.At this time, the worker allocation request period for each function is calculated based on the number of workers required to be allocated during the unit time for each function, and the number of pre-allocated workers is the number of workers required for the unit time for each function in the active-ready state It may correspond to a value obtained by subtracting the number of in-ready workers and the active workers.

이 때, 펑션 별 단위 시간 동안에 요구되는 워커의 개수는 펑션을 실행하는 워커의 평균 실행 시간을 상기 펑션 별 워커 할당 요청 주기로 나눈 값에 상응할 수 있다.In this case, the number of workers required during the unit time for each function may correspond to a value obtained by dividing the average execution time of the workers executing the function by the worker assignment request period for each function.

또한, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치는, 펑션(FUNCTION) 수행을 위한 워커(WORKER) 할당 요청이 발생하기 이전에, 워커 실행 준비 부하를 분산 처리하기 위해 템플릿 워커(TEMPLATE WORKER)를 사전 생성(PRE-CREATION)하고, 펑션 별 워커 할당 요청 주기의 변화를 고려하여 사전 워커 할당 개수를 예측하고, 상기 템플릿 워커를 상기 사전 워커 할당 개수에 상응하는만큼 워커 업 스케일링(WORKER UP SCALING)하여 레디 워커(READY WORKER)를 사전 할당(PRE-ALLOCATION)하는 프로세서; 및 펑션 수행을 위한 워커를 관리하는 워커 풀(WORKER POOL)을 저장하는 메모리를 포함한다.In addition, the worker scheduling apparatus of the cloud computing system according to an embodiment of the present invention, before a worker assignment request for performing a function occurs, a template worker ( TEMPLATE WORKER) is created in advance (PRE-CREATION), the number of pre-worker assignments is predicted in consideration of the change in the worker assignment request period for each function, and the template workers are up-scaled by the number of workers corresponding to the pre-worker assignments (WORKER) UP SCALING) to pre-allocate a ready worker (READY WORKER) (PRE-ALLOCATION); and a memory for storing a worker pool (WORKER POOL) that manages a worker for performing a function.

이 때, 프로세서는 상기 펑션 수행을 위한 워커 할당 요청이 발생한 경우에 상기 레디 워커를 액티브 워커(ACTIVE WORKER)로 할당하고, 펑션 서비스 요청 부하를 고려하여 할당이 해제된 레디 워커의 상태를 변경할 수 있다.In this case, the processor allocates the ready worker as an active worker when a worker assignment request for performing the function occurs, and considers the function service request load. Can change the status of the released ready worker. .

이 때, 프로세서는 상기 사전 할당된 레디 워커 중 기설정된 유휴 기간 동안 사용되지 않는 레디워커를 워커 다운 스케일링(WORKER DOWN SCALING)하여 상기 템플릿 워커로 초기화할 수 있다.In this case, the processor may initialize a ready worker not used for a preset idle period among the pre-allocated ready workers as the template worker by WORKER DOWN SCALING.

이 때, 템플릿 워커는 모든 펑션에서 공통으로 사용할 수 있도록 기본 이미지와 자원 용량에 상응하게 구성된 임시 워커에 상응할 수 있다.In this case, the template worker may correspond to a temporary worker configured to correspond to the basic image and resource capacity so that all functions can use it in common.

이 때, 레디 워커는 펑션 수행을 위한 자원 정보의 설정 및 자원 할당이 완료된 펑션 실행 준비 상태의 워커에 상응할 수 있다.In this case, the ready worker may correspond to a worker in a function execution preparation state in which the resource information setting and resource allocation for performing the function have been completed.

이 때, 레디 워커의 상태는 자원 할당 및 펑션 파일의 로딩이 완료된 액티브 레디(ACTIVE READY) 상태 및 자원이 할당되지 않았지만 펑션 파일의 로딩이 완료된 인액티브 레디(INACTIVE READY) 상태 중 어느 하나에 해당할 수 있다.At this time, the status of the ready worker may correspond to any one of an active ready (ACTIVE READY) state in which resource allocation and loading of the function file are completed, and an INACTIVE READY state in which the loading of the function file is completed although the resource is not allocated. can

이 때, 프로세서는 액티브 워커 사용 비율(ACTIVE WORKER USAGE RATIO)이 기설정된 액티브 상위 기준 값을 초과하는 경우, 상기 템플릿 워커를 상기 레디 워커로 변경하는 레디 워커 업 스케일링(READY WORKER UP SCALING)을 수행하고, 상기 액티브 워커 사용 비율이 기설정된 액티브 하위 기준 값 미만일 경우, 상기 액티브 레디 상태의 레디 워커를 상기 인액티브 레디 상태로 변경시킬 수 있다.At this time, when the active worker usage ratio (ACTIVE WORKER USAGE RATIO) exceeds a preset active upper reference value, the processor performs READY WORKER UP SCALING to change the template worker to the ready worker, and , when the active worker usage ratio is less than a preset active low reference value, the ready worker in the active-ready state may be changed to the in-active-ready state.

이 때, 액티브 워커 사용 비율은 상기 액티브 레디 상태의 레디 워커와 상기 액티브 워커를 합한 워커들 중 상기 액티브 워커의 비율에 상응할 수 있다.In this case, the active worker usage ratio may correspond to a ratio of the active worker among workers in which the active worker and the ready worker in the active-ready state are combined.

이 때, 프로세서는 인액티브 워커 비율(INACTIVE WORKER RATIO)이 기설정된 인액티브 상위 기준값을 초과하는 경우, 상기 인액티브 레디 상태의 레디 워커를 상기 템플릿 워커로 변경하는 레디 워커 다운 스케일링(READY WORKER DOWN SCALING)을 수행할 수 있다.At this time, when the inactive worker ratio (INACTIVE WORKER RATIO) exceeds a preset inactive upper reference value, the processor changes the ready worker in the inactive ready state to the template worker. Ready worker down scaling (READY WORKER DOWN SCALING) ) can be done.

이 때, 프로세서는 상기 템플릿 워커의 개수가 최대 생성 가능 워커 수 대비 기설정된 허용 한계 이하일 경우, 백그라운드에서 템플릿 워커 업 스케일링(TEMPLATE WORKER UP SCALING)을 수행하여 상기 템플릿 워커를 추가 생성할 수 있다.In this case, when the number of template workers is less than or equal to a preset allowable limit compared to the maximum number of workers that can be created, the processor may additionally create the template workers by performing TEMPLATE WORKER UP SCALING in the background.

이 때, 펑션 별 워커 할당 요청 주기는 펑션 별 단위 시간 동안에 할당 요구되는 워커의 개수를 기반으로 산출되고, 상기 사전 워커 할당 개수는 상기 펑션 별 단위 시간 동안에 요구되는 워커의 개수에서 상기 액티브 레디 상태인 레디 워커와 상기 액티브 워커의 개수를 뺀 값에 상응할 수 있다.At this time, the worker allocation request period for each function is calculated based on the number of workers required to be allocated during the unit time for each function, and the number of pre-allocated workers is the number of workers required for the unit time for each function in the active-ready state. It may correspond to a value obtained by subtracting the number of ready workers and the active workers.

이 때, 펑션 별 단위 시간 동안에 요구되는 워커의 개수는 펑션을 실행하는 워커의 평균 실행 시간을 상기 펑션 별 워커 할당 요청 주기로 나눈 값에 상응할 수 있다.In this case, the number of workers required during the unit time for each function may correspond to a value obtained by dividing the average execution time of the workers executing the function by the worker assignment request period for each function.

본 발명에 따르면, 펑션 서비스를 수행하는 컨테이너 기반의 워커를 빠르게 할당하고, 응답 비용을 최소화하기 위한 워커 스케줄링 기술을 제공할 수 있다.According to the present invention, it is possible to provide a worker scheduling technique for quickly allocating a container-based worker performing a function service and minimizing a response cost.

또한, 본 발명은 펑션 서비스 요청 부하 변동에 능동적으로 대응하고, 빠른 응답 시간이 요구되는 단기 펑션 서비스의 할당 지연 시간을 최소화할 수 있는 워커 스케줄링 기술을 제공할 수 있다.In addition, the present invention can provide a worker scheduling technique capable of actively responding to a function service request load change and minimizing the allocation delay time of a short-term function service requiring a fast response time.

또한, 본 발명은 펑션 실행과 관련된 워커의 실행 준비 부하를 사전에 적절히 분산함으로써 FaaS 플랫폼이 실시간 처리 환경에 보다 적합하도록 하는 새로운 워커 스케줄링 기술을 제공할 수 있다.In addition, the present invention can provide a new worker scheduling technology that makes the FaaS platform more suitable for a real-time processing environment by properly distributing the execution preparation load of workers related to function execution in advance.

또한, 본 발명은 워커의 할당 작업을 요구 발생 이전에 2단계의 사전 할당 방식으로 분산 처리하고, 서비스에 필요한 워커를 펑션의 요청 주기와 수행 시간을 이용하여 사전에 할당함으로써 워커 할당 요청에 대한 스케줄링 비용을 최소화할 수 있다.In addition, the present invention provides scheduling for worker assignment requests by distributing worker assignment tasks in a two-step pre-allocation method prior to request generation, and pre-allocating workers required for service using the function request period and execution time. cost can be minimized.

또한, 본 발명은 자원 격리형 가상 클라우드 인프라 서비스를 필요로 하는 시스템, 다기관 의료 지능 특화형 학습 및 진단 공유 플랫폼에 적용할 수 있는 워커 할당 비용이 대폭적으로 개선된 워커 스케줄러를 제공할 수 있다.In addition, the present invention can provide a worker scheduler with significantly improved worker allocation cost that can be applied to a system requiring a resource-isolated virtual cloud infrastructure service and a multi-institutional medical intelligence specialized learning and diagnosis sharing platform.

도 1 내지 도 2는 2단계 워커 할당 상태 전이 및 수행 비용 분석의 일 예를 나타낸 도면이다.
도 3은 본 발명에 따른 마이크로 펑션 서비스 플랫폼 시스템의 일 예를 나타낸 도면이다.
도 4는 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법을 나타낸 동작 흐름도이다.
도 5 내지 도 6은 본 발명에 따른 3단계 워커 할당 상태 전이 및 수행 비용 분석의 일 예를 나타낸 도면이다.
도 7은 본 발명에 따른 워커 풀의 일 예를 나타낸 도면이다.
도 8은 본 발명에 따른 워커 인스턴스 전이의 일 예를 나타낸 도면이다.
도 9는 본 발명에 따른 워커 상태 전이의 일 예를 나타낸 도면이다.
도 10은 본 발명에 따른 단위 시간 구간의 일 예를 나타낸 도면이다.
도 11은 본 발명에 따른 레디 워커 스케일링 시점의 일 예를 나타낸 도면이다.
도 12 내지 도 14는 본 발명에 따른 레디 워커 업 스케일링 과정의 일 예를 나타낸 도면이다.
도 15는 본 발명의 일실시예에 따른 워커 스케줄링 방법을 상세하게 나타낸 동작 흐름도이다.
도 16은 본 발명의 일실시예에 따른 템플릿 워커 업 스케일링 과정을 상세하게 나타낸 동작 흐름도이다.
도 17은 본 발명의 일실시예에 따른 액티브 워커 사용 비율에 따라 레디 워커 업 스케일링을 수행하는 과정을 나타낸 동작 흐름도이다.
도 18은 본 발명의 일실시예에 따른 레디 워커 업 스케일링 과정을 상세하게 나타낸 동작 흐름도이다.
도 19는 본 발명의 일실시예에 따른 템플릿 워커 업 스케일링 과정을 상세하게 나타낸 동작 흐름도이다.
도 20은 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치를 나타낸 블록도이다.
도 21은 본 발명에 따른 마이크로 펑션 서비스 플랫폼과 워커 스케줄러 내부 컴포넌트의 일 예를 상세하게 나타낸 블록도이다.
1 to 2 are diagrams illustrating an example of two-step worker allocation state transition and execution cost analysis.
3 is a diagram illustrating an example of a micro-function service platform system according to the present invention.
4 is an operation flowchart illustrating a worker scheduling method of a cloud computing system according to an embodiment of the present invention.
5 to 6 are diagrams illustrating an example of a three-step worker allocation state transition and execution cost analysis according to the present invention.
7 is a diagram illustrating an example of a worker pool according to the present invention.
8 is a diagram illustrating an example of worker instance transition according to the present invention.
9 is a diagram illustrating an example of worker state transition according to the present invention.
10 is a diagram illustrating an example of a unit time section according to the present invention.
11 is a diagram illustrating an example of a ready-walker scaling time point according to the present invention.
12 to 14 are diagrams illustrating an example of a ready-walker up-scaling process according to the present invention.
15 is a detailed operation flowchart illustrating a method for scheduling a worker according to an embodiment of the present invention.
16 is a detailed operation flowchart illustrating a template walker up-scaling process according to an embodiment of the present invention.
17 is an operation flowchart illustrating a process of performing up-scaling of a ready-walker according to an active worker usage ratio according to an embodiment of the present invention.
18 is a detailed operation flowchart illustrating a ready-walker up-scaling process according to an embodiment of the present invention.
19 is a detailed operation flowchart illustrating a template walker up-scaling process according to an embodiment of the present invention.
20 is a block diagram illustrating a worker scheduling apparatus of a cloud computing system according to an embodiment of the present invention.
21 is a detailed block diagram illustrating an example of a micro-function service platform and worker scheduler internal components according to the present invention.

본 발명을 첨부된 도면을 참조하여 상세히 설명하면 다음과 같다. 여기서, 반복되는 설명, 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능, 및 구성에 대한 상세한 설명은 생략한다. 본 발명의 실시형태는 당 업계에서 평균적인 지식을 가진 자에게 본 발명을 보다 완전하게 설명하기 위해서 제공되는 것이다. 따라서, 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다.The present invention will be described in detail with reference to the accompanying drawings as follows. Here, repeated descriptions, well-known functions that may unnecessarily obscure the gist of the present invention, and detailed descriptions of configurations will be omitted. The embodiments of the present invention are provided in order to more completely explain the present invention to those of ordinary skill in the art. Accordingly, the shapes and sizes of elements in the drawings may be exaggerated for clearer description.

이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

도 3은 본 발명에 따른 마이크로 펑션 서비스 플랫폼 시스템의 일 예를 나타낸 도면이다.3 is a diagram illustrating an example of a micro-function service platform system according to the present invention.

도 3을 참조하면, 본 발명에 따른 펑션 서비스가 제공되는 서버리스 컴퓨팅 플랫폼 시스템은 클라이언트(Client)(310), 서버리스 컴퓨팅 플랫폼(Serverless Computing Platform)(320), 레파지토리(Repository)(330) 및 계산 노드(Node)(340)로 구성된다. Referring to Figure 3, the serverless computing platform system provided with the function service according to the present invention is a client (Client) 310, a serverless computing platform (Serverless Computing Platform) 320, a repository (Repository) (330) and It is composed of a computation node (Node) 340 .

클라이언트(310)는 응용 프로그램 또는 웹 콘솔로 펑션 서비스를 서버리스 컴퓨팅 플랫폼(320)에 요청하고 결과를 전송받는 펑션 서비스의 소비자이다. 펑션 파일 및 관련 라이브러리, 패키지는 레파지토리(330)에 저장 및 관리될 수 있다.The client 310 is a consumer of the function service that requests the function service from the serverless computing platform 320 through an application program or a web console and receives the result. The function file and related libraries and packages may be stored and managed in the repository 330 .

계산 노드(340)는 물리적인 컴퓨팅 자원인 CPU, 메모리 등을 할당받은 워커(341, 342)라는 컨테이너 인스턴스를 이용하여 펑션이 실제 수행되는 물리적인 자원을 의미할 수 있다.The calculation node 340 may refer to a physical resource in which a function is actually performed using container instances called workers 341 and 342 to which physical computing resources such as CPU and memory are allocated.

이 때, 서버리스 컴퓨팅 플랫폼 시스템에서 호출에 의한 펑션 서비스의 수행은 다음과 같은 절차에 의해 이루어질 수 있다.In this case, in the serverless computing platform system, the function service by calling may be performed by the following procedure.

먼저, 클라이언트(310)에서 서버리스 컴퓨팅 플랫폼(320)에 RestAPI 등의 인터페이스를 통해 펑션 서비스 요청을 호출할 수 있다. First, a function service request may be called from the client 310 to the serverless computing platform 320 through an interface such as RestAPI.

이 후, 서버리스 컴퓨팅 플랫폼(320)에서는 레파지토리(330)에서 호출된 펑션을 검색할 수 있다.Thereafter, the serverless computing platform 320 may search for a function called from the repository 330 .

이 후, 서버리스 컴퓨팅 플랫폼(320)에서는 펑션 수행을 위해 요구되는 자원 정보와 현재 할당 상태 정보를 이용하여 워커(341, 342)를 할당할 수 있다. Thereafter, the serverless computing platform 320 may allocate workers 341 and 342 using resource information required to perform a function and current allocation state information.

이 후, 계산 노드(340)로 할당된 워커(341, 342)에 수행할 펑션과 수행에 필요한 라이브러리와 패키지를 로딩하는 배포 작업을 수행할 수 있다. After that, it is possible to perform a distribution operation of loading a function to be performed on the workers 341 and 342 assigned to the computation node 340 and a library and package necessary for execution.

이 후, 워커(341, 342)에서는 펑션을 수행하고, 펑션 서비스 처리에 대한 결과를 서버리스 컴퓨팅 플랫폼(320)을 통해 클라이언트(310)로 전달할 수 있다.Thereafter, the workers 341 and 342 may perform a function and transmit a result of the function service processing to the client 310 through the serverless computing platform 320 .

도 4는 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법을 나타낸 동작 흐름도이다.4 is an operation flowchart illustrating a worker scheduling method of a cloud computing system according to an embodiment of the present invention.

도 4를 참조하면, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 펑션(FUNCTION) 수행을 위한 워커(WORKER) 할당 요청이 발생하기 이전에, 워커 실행 준비 부하를 분산 처리하기 위해 템플릿 워커(TEMPLATE WORKER)를 사전 생성(PRE-CREATION)한다(S410).Referring to FIG. 4 , in the method for scheduling a worker in a cloud computing system according to an embodiment of the present invention, before a worker assignment request for performing a function occurs, in order to distribute the worker execution preparation load. A template worker (TEMPLATE WORKER) is pre-created (PRE-CREATION) (S410).

이 때, 본 발명에서는 2단계 워커 인스턴스 기반 워커 스케줄링의 워커 최초 할당 및 부하 변동에 따른 응답 수행 시간이 큰 문제를 해결하기 위해 2단계 사전 워커 할당을 통한 3단계 워커 인스턴스 기반 워커 스케줄링 알고리즘을 제안하고자 한다.At this time, the present invention proposes a three-step worker instance-based worker scheduling algorithm through two-step pre-worker assignment in order to solve the problem of large response time due to the initial assignment of workers and load changes in the two-step worker instance-based worker scheduling. do.

먼저, 워커(worker)는 마이크로 펑션을 수행하는 계산 노드의 컨테이너 객체에 대응하는 상위 수준의 논리적인 자원에 해당하는 것으로, 펑션 실행을 위한 할당 단계에서 실제 물리 노드의 컴퓨팅 자원을 할당받을 수 있다. 이 때, 본 발명의 일실시예에 따른 워커는 스케줄러 할당 및 스케일링의 기본 단위에 해당할 수 있으며, 도 5에 도시된 것과 같이 3단계로 분류될 수 있다. First, a worker corresponds to a higher-level logical resource corresponding to a container object of a computation node performing a micro-function, and may be allocated a computing resource of an actual physical node in the allocation step for executing the function. In this case, the worker according to an embodiment of the present invention may correspond to a basic unit of scheduler allocation and scaling, and may be classified into three stages as shown in FIG. 5 .

도 5 내지 도 6을 참조하면, 템플릿 워커(510)는 모든 펑션에서 공통으로 사용할 수 있도록 기본 이미지와 자원 용량에 상응하게 구성된 중간 단계의 임시 워커에 상응할 수 있다. 본 발명에서 템플릿 워커는, 도 6에 도시된 것과 같이, 워커 할당 및 초기화 수행 시간의 분산을 통한 빠른 워커 할당 처리 및 부하 변동 처리를 지원하는 사전 할당(pre creation)을 위해 활용될 수 있다. 5 to 6 , the template worker 510 may correspond to an intermediate temporary worker configured to correspond to a basic image and resource capacity to be commonly used by all functions. In the present invention, as shown in FIG. 6 , the template worker may be utilized for pre-creation that supports quick worker allocation processing and load change processing through distribution of worker allocation and initialization execution times.

이러한, 템플릿 워커(510)를 생성하는 과정은 2단계 워커 인스턴스 기반 워커 스케줄링에서 많은 수행 시간을 필요로 하는 워커 생성 과정에 해당하는 것이지만, 워커 할당 요청 시에 생성되는 것이 아니라 워커 스케줄링이 최초 시작되거나 템플릿 워커 개수가 일정 비율 이하로 떨어지면 수행될 수 있다. 즉, 본 발명에서는 워커 할당 및 초기화 과정에서 70~80%의 수행 시간을 갖는 워커 생성 과정을 템플릿 워커 생성 단계에서 이루어지게 할 수 있다. The process of creating the template worker 510 corresponds to the process of creating a worker that requires a lot of execution time in the two-step worker instance-based worker scheduling, but it is not created when a worker assignment request is made, but when worker scheduling is first started or It can be executed when the number of template workers falls below a certain percentage. That is, in the present invention, the worker creation process having 70 to 80% of the execution time in the worker assignment and initialization process can be made in the template worker creation step.

이 때, 템플릿 워커의 개수가 최대 생성 가능 워커 수 대비 기설정된 허용 한계 이하일 경우, 백그라운드에서 템플릿 워커 업 스케일링(template worker up scaling)을 수행하여 템플릿 워커를 추가 생성할 수 있다. At this time, if the number of template workers is less than the preset allowable limit compared to the maximum number of workers that can be created, template workers can be additionally created by performing template worker up-scaling in the background.

예를 들어, 템플릿 워커 업 스케일링은 시스템의 전체 계산 노드에 의한 최대 생성 가능 워커 수의 20% 정도씩 템플릿 워커를 생성하도록 수행될 수 있다. 이 때, 템플릿 워커 업 스케일링은 백그라운드에서 수행되고, 펑션을 실행하는 워커들과 상관없이 사전 생성되는 임시 워커이므로 펑션 실행을 지연시키거나 부하를 제공하지 않도록 효율적으로 동작할 수 있다. For example, template worker upscaling can be performed to create template workers by about 20% of the maximum number of workers that can be created by the total number of compute nodes in the system. At this time, the template worker upscaling is performed in the background, and since it is a temporary worker that is created in advance regardless of workers executing the function, it can operate efficiently so as not to delay the execution of the function or provide a load.

따라서, 일반적인 워커 할당 요청 시에는 사전에 생성된 템플릿 워커를 자원 정보 설정 및 펑션 로딩을 통해 레디 워커로 변경시키는 과정만 수행하면 되므로, 15~20% 정도의 수행 비용만으로 워커 할당 요청에 대한 응답을 수행할 수 있다.Therefore, when making a general worker assignment request, you only need to perform the process of changing the template worker created in advance to a ready worker through resource information setting and function loading. can be done

또한, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 펑션 별 워커 할당 요청 주기의 변화를 고려하여 사전 워커 할당 개수를 예측한다(S420).In addition, the worker scheduling method of the cloud computing system according to an embodiment of the present invention predicts the number of worker assignments in advance in consideration of the change in the worker assignment request period for each function ( S420 ).

이 때, 본 발명은 펑션 서비스 요청 부하에 능동적으로 대응하는 워커 스케줄링 기술에 관한 것으로, 워커 할당 요청이 아니라 요청 주기의 변화를 통해 펑션을 실행할 워커를 관리하기 위한 워커 스케일링 여부를 결정할 수 있다. In this case, the present invention relates to a worker scheduling technique that actively responds to a function service request load, and it is possible to determine whether to scale a worker to manage a worker who will execute a function through a change in the request period rather than a worker assignment request.

예를 들어, 펑션 수행 시간에 비해 워커 할당 요청 주기가 짧아지는 경우, 워커 스케일링을 통해 펑션을 실행할 수 있는 준비 상태에 워커를 동적으로 증가시킬 수 있다. 이를 위해 펑션의 수행 시간과 펑션 서비스 요청 주기를 이용하여 스케일링에 필요한 워커의 수, 즉 사전 워커 할당 개수를 산출할 수 있고, 할당 준비된 워커와 실제 수행중인 워커의 비율을 통해 워커 스케일링이 필요한 시점을 결정할 수 있다. For example, if the worker assignment request cycle is shorter than the function execution time, the worker can be dynamically increased in the ready state to execute the function through worker scaling. To this end, the number of workers required for scaling, that is, the number of workers allocated in advance, can be calculated using the execution time of the function and the function service request period. can decide

이와 같은 방법의 워커 스케일링을 통해, 펑션을 수행하기 위한 워커를 사전에 준비함으로써 워커 할당 요청에 대한 응답 시간을 개선 할 수 있다.Through this method of worker scaling, it is possible to improve the response time to a worker assignment request by preparing a worker to perform a function in advance.

이 때, 펑션 별 워커 할당 요청 주기는 펑션 별 단위 시간 동안에 할당 요구되는 워커의 개수를 기반으로 산출될 수 있다.In this case, the worker assignment request period for each function may be calculated based on the number of workers required to be assigned during the unit time for each function.

예를 들어, 도 10을 참조하면, 펑션 별 워커 할당 요청 주기(Tf)는 동적 슬라이딩 윈도우(Dynamic flexible Sliding Window, DSW)를 기반으로 산출될 수 있다. 이 때, 도 10에 도시된 동적 슬라이딩 윈도우(1020)는 펑션 별 단위 시간을 의미하는 단위 시간 구간(△t)를 나타낼 수 있고, 펑션 별 워커 할당 요청 주기는 단위 시간 구간(△t) 내의 워커 할당 요청(1010)의 개수에 의해 산출될 수 있다.For example, referring to FIG. 10 , the worker assignment request period Tf for each function may be calculated based on a dynamic flexible sliding window (DSW). At this time, the dynamic sliding window 1020 shown in FIG. 10 may represent a unit time period Δt that means a unit time for each function, and the worker assignment request period for each function is a worker within the unit time period Δt. It may be calculated by the number of allocation requests 1010 .

이 때, 단위 시간 구간(△t)은 펑션 별로 동적으로 유연하게 변화될 수 있다. 즉, 워커 할당 요청(1010)이 많으면 동적 슬라이딩 윈도우에 의한 단위 시간 구간(△t)을 절반으로 줄일 수 있고, 단위 시간 구간(△t) 동안에 워커 할당 요청(1010)이 존재하지 않으면 해당 구간을 2배씩 증가시킬 수 있다. 이 때, 단위 시간 구간(△t)의 최대 값은 단기 수행 펑션의 timeout 값에 상응할 수 있다.In this case, the unit time period Δt may be dynamically and flexibly changed for each function. That is, if there are many worker allocation requests 1010, the unit time period Δt by the dynamic sliding window can be reduced by half, and if there is no worker allocation request 1010 during the unit time period Δt, the corresponding period It can be increased by two times. In this case, the maximum value of the unit time period Δt may correspond to the timeout value of the short-term execution function.

또한, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 템플릿 워커를 사전 워커 할당 개수에 상응하는만큼 워커 업 스케일링(WORKER UP SCALING)하여 레디 워커(READY WORKER)를 사전 할당(PRE-ALLOCATION)한다(S430).In addition, the worker scheduling method of the cloud computing system according to an embodiment of the present invention pre-allocates the ready worker (READY WORKER) by up-scaling the template worker by the worker up-scaling corresponding to the number of pre-allocated workers (PRE-) ALLOCATION) (S430).

도 5 내지 도 6을 참조하면, 레디 워커(520)는 펑션 수행을 위한 자원 정보의 설정 및 자원 할당이 완료된 펑션 실행 준비 상태의 워커에 상응할 수 있다. 즉, 레디 워커는 펑션에 할당이 이루어지는 단계의 워커로, 실제 수행되는 펑션이 로딩된 실행 준비 단계의 워커에 상응할 수 있다. 5 to 6 , the ready worker 520 may correspond to a worker in a function execution preparation state in which resource information setting and resource allocation for function execution have been completed. That is, the ready worker is a worker in the stage where assignment is made to the function, and may correspond to the worker in the execution preparation stage in which the actually executed function is loaded.

또한, 도 5에 도시된 액티브 워커(530)는 스케줄러에 의해 할당이 완료된 후에 펑션을 실제 수행하는 워커에 상응하는 것으로, 후에 설명할 레디 워커(520)가 액티브 런(active run) 상태일 때의 워커를 의미할 수도 있다.In addition, the active worker 530 shown in FIG. 5 corresponds to a worker that actually performs a function after allocation by the scheduler is completed, and the ready worker 520, which will be described later, is in an active run state. It can also mean walker.

이 때, 도 5에 도시된 본 발명의 워커들은 워커 인스턴스 타입 별로 별도의 리스트를 구성할 수 있고, 모든 리스트들은 도 7에 도시된 것과 같이 하나의 워커 풀(worker pool)로 관리될 수 있다. In this case, the workers of the present invention shown in FIG. 5 may configure a separate list for each worker instance type, and all lists may be managed as one worker pool as shown in FIG. 7 .

이 때, 도 7을 참조하면, 본 발명의 일실시예에 따른 워커 풀은 워커 스케줄러 또는 워커 스케줄링 장치의 기동 시에 생성될 수 있으며, 초기에는 템플릿 워커 리스트(710)만 존재할 수 있다. At this time, referring to FIG. 7 , a worker pool according to an embodiment of the present invention may be created when a worker scheduler or a worker scheduling device is started, and only the template worker list 710 may initially exist.

이 때, 각 계산 노드에 구비된 노드 에이전트의 노드 등록 요청에 의해 노드의 구성 및 자원 정보가 등록될 수 있다. 또한, 노드의 자원 정보 중 메모리 용량에 의해 계산 노드에 생성 가능한 템플릿 워커의 개수가 정해질 수 있고, 최초에는 노드에서 생성 가능한 전체 워커 수의 30% 정도에 해당하는 템플릿 워커를 생성하여 워커 풀에 추가할 수 있다.In this case, the configuration and resource information of the node may be registered by the node registration request of the node agent provided in each computation node. In addition, the number of template workers that can be created in the computation node can be determined by the memory capacity among the resource information of the node. At first, template workers corresponding to about 30% of the total number of workers that can be created in the node are created and added to the worker pool. can be added

또한, 도 4에는 도시하지 아니하였으나, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 펑션 수행을 위한 워커 할당 요청에 따라 레디 워커를 액티브 워커(active worker)로 할당하고, 펑션 서비스 요청 부하를 고려하여 할당이 해제된 레디 워커의 상태를 변경할 수 있다.In addition, although not shown in FIG. 4 , the method for scheduling a worker in the cloud computing system according to an embodiment of the present invention allocates a ready worker as an active worker according to a worker assignment request for performing a function, and provides a function service The status of the deallocated ready worker can be changed in consideration of the request load.

예를 들어, 도 7을 참조하면, 템플릿 워커 리스트(710)에 포함된 템플릿 워커(TWK)는 펑션 수행을 위한 워커 할당 요청에 의해 레디 워커로 변경될 수 있다. For example, referring to FIG. 7 , the template worker (TWK) included in the template worker list 710 may be changed to a ready worker according to a worker assignment request for performing a function.

이 때, 레디 워커의 상태는 자원 할당 및 펑션 파일의 로딩이 완료된 액티브 레디(Active Ready) 상태 및 자원이 할당되지 않았지만 펑션 파일의 로딩이 완료된 인액티브 레디(Inactive Ready) 상태 중 어느 하나에 해당할 수 있다. At this time, the state of the ready worker may correspond to either an active ready state in which resource allocation and loading of the function file are completed, and an inactive ready state in which the resource is not allocated but loading of the function file is completed. can

즉, 액티브 레디 상태는 워커가 할당된 상태는 아니지만 펑션 서비스 요청 부하 상황을 고려했을 때에 레디(ready) 상태로 유지되어야 하는 대기 상태의 워커 인스턴스 상태를 의미할 수 있고, 인액티브 레디 상태는 할당 해제된 레디 워커가 완전히 필요없는 상태가 되기 이전까지 유지하기 위한 워커 인스턴스 상태를 의미할 수 있다. That is, the active-ready state may refer to a state of a worker instance in a standby state that is not assigned to a worker, but must be maintained in a ready state when considering the function service request load situation, and the inactive-ready state is deallocated. It may mean the state of a worker instance to maintain until the ready-made worker becomes completely unnecessary.

예를 들어, 템플릿 워커에서 레디 워커로 변경되는 수행 시간 비용은 템플릿 워커가 생성되는 비용에 비해서는 상대적으로 낮다고 볼 수 있지만, 여전히 10~15% 정도의 수행 시간이 요구된다. 그러나, 레디 워커의 Active와 Inactive의 상태 변화는, 단순히 도 7에 도시된 액티브 레디 리스트(730)와 인액티브 레디 리스트(720) 및 상태 플래그를 변경하는 작업으로 수행 시간이 거의 요구되지 않는다. For example, the execution time cost of changing from a template worker to a ready worker is relatively low compared to the cost of creating a template worker, but it still requires 10 to 15% of the execution time. However, changing the active and inactive states of the ready worker simply changes the active-ready list 730 and the inactive-ready list 720 and the state flag shown in FIG. 7 , and requires little execution time.

즉, 본 발명에서는 펑션에 대한 할당 요청 시 템플릿 워커에서 레디 워커로 변경되는 상황을 최소화하기 위해, 레디 워커로 생성된 워커에 대해서는 워커가 사용되지 않는 상황에서도 유지하는 lazy deallocation방식을 적용함으로써 워커 할당 비용을 최소화할 수 있다.That is, in the present invention, in order to minimize the situation in which the template worker is changed to a ready worker when an assignment request for a function is made, the lazy deallocation method that maintains the worker created as a ready worker even when the worker is not used is applied to allocate workers. cost can be minimized.

이 때, 본 발명에서는 지원하는 시스템 자원의 사용 현황, 워커 가용 현황 및 워커 할당 요청 부하 변동에 반응하는 워커 스케일링(worker scaling)을 통해 선제적인 워커 할당 및 해제를 수행함으로써 실제 워커 할당 요청에 대한 수행 비용을 최소화하도록 워커 인스턴스를 변경하고 관리할 수 있다. At this time, in the present invention, the actual worker assignment request is performed by preemptively assigning and releasing workers through worker scaling that responds to changes in the usage status of supported system resources, worker availability status, and worker assignment request load changes. You can change and manage worker instances to minimize costs.

이 때, 본 발명의 일실시예에 따른 워커 스케일링은 특정 조건이나 상황을 만족하는 경우에 다수의 워커를 생성, 변경 또는 삭제하는 처리 과정을 의미할 수 있다. In this case, worker scaling according to an embodiment of the present invention may refer to a process of creating, changing, or deleting a plurality of workers when a specific condition or situation is satisfied.

예를 들어, 도 8을 참조하면, 본 발명의 일실시예에 따른 워커 스케일링은 다수의 템플릿 워커를 생성하거나 삭제하는 템플릿 워커 스케일링(Template worker scaling)과 다수의 템플릿 워커를 레디 워커로 변경하는 레디 워커 업 스케일링(Ready worker up scaling) 그리고 레디 워커를 다시 템플릿 워커로 변경하는 레디 워커 다운 스케일링(Ready worker down scaling)으로 구분될 수 있다.For example, referring to FIG. 8 , worker scaling according to an embodiment of the present invention is a template worker scaling that creates or deletes a plurality of template workers and a ready-made worker that changes a plurality of template workers to a ready worker It can be divided into ready worker up scaling and ready worker down scaling, which changes a ready worker back to a template worker.

이 때, 템플릿 워커 스케일링은, 전체 워커 할당 비용의 70~80%에 해당하는 워커의 전체 생성 비용을 상쇄하기 위해 템플릿 워커에 대한 사전 할당(up scaling)이나 할당 해제(down scaling)을 처리하는 과정에 상응할 수 있다. 이 때, 템플릿 워커는 모든 워커가 공통적으로 사용할 수 있는 이미지와 최소 자원이 할당된 워커를 의미할 수 있으며, 시스템의 템플릿 워커 가용율이 한계점 이하가 되면 템플릿 워커 스케일링에 의해 템플릿 워커가 사전 할당될 수 있다. 이 때, 최초의 템플릿 워커는 워커 풀이 생성된 이후에 전체 시스템에서 생성 가능한 워커의 20% 정도로 생성될 수 있다. 예를 들어, 템플릿 워커 스케일링은 계산 노드의 템플릿 워커를 생성 또는 삭제함으로써 워커 풀에서 관리하는 템플릿 워커 리스트(Template worker list)에서 템플릿 워커를 추가하거나 제거할 수 있다.At this time, template worker scaling is a process of pre-allocation (up-scaling) or de-allocation (down-scaling) of template workers to offset the total creation cost of workers, which is 70-80% of the total worker allocation cost can correspond to At this time, the template worker may mean a worker to which an image and minimum resources that all workers can use in common are allocated. can At this time, after the worker pool is created, the first template worker can be created in about 20% of the workers that can be created in the entire system. For example, template worker scaling can add or remove template workers from the template worker list managed by the worker pool by creating or deleting template workers of the compute node.

이 때, 레디 워커 업 스케일링은 펑션 서비스 요청에 선제적으로 대응하여 레디 워커 수를 증가시키는 과정에 상응할 수 있다. 이 때, 레디 워커 업 스케줄링은 워커 할당 요청에 대해 빠른 응답 및 수행 시간을 보장하기 위해 펑션 할당 요청 주기를 기반으로 수행될 수 있다. 예를 들어, 템플릿 워커를 펑션 수행이 가능한 레디 워커로 변경하고 레디 워커 리스트(Ready worker list)에 추가하는 작업을 수행할 수 있다. In this case, the ready worker up-scaling may correspond to a process of increasing the number of ready workers by preemptively responding to a function service request. In this case, the ready worker up-scheduling may be performed based on the function assignment request cycle in order to guarantee a quick response and execution time to the worker assignment request. For example, you can change a template worker to a ready worker that can perform functions and add it to the ready worker list.

이 때, 레디 워커 다운 스케일링은 특정 펑션에 할당되어 장기간 사용되지 않는 인액티브 레디(inactive ready) 상태의 레디 워커를 초기화시킴으로써 다른 펑션 할당 요청에서 사용할 수 있는 템플릿 워커로 변경하는 과정에 상응할 수 있다. 예를 들어, 인액티브 레디 상태의 레디 워커에 대해서 펑션의 자원 설정 및 로딩 정보를 초기화하여 템플릿 워커로 변경하고, 변경된 템플릿 워커를 템플릿 워커 리스트에 추가할 수 있다. At this time, ready worker downscaling may correspond to the process of changing to a template worker that can be used in other function assignment requests by initializing the ready worker in an inactive ready state that is assigned to a specific function and not used for a long time. . For example, for a ready worker in an inactive-ready state, resource setting and loading information of a function may be initialized to be changed to a template worker, and the changed template worker may be added to the template worker list.

이 때, 본 발명의 일실시예에 따른 워커 스케줄링 방법은 워커 스케일링, 워커 할당 및 해제 과정에서 도 9에 도시된 것과 같이 다양한 워커의 상태를 관리할 수 있고, 펑션 실행에 의한 요청이나 조건의 변화에 의해 워커의 상태를 변화시킬 수도 있다. In this case, the worker scheduling method according to an embodiment of the present invention can manage various worker states as shown in FIG. 9 in the process of worker scaling, worker assignment and release, and change requests or conditions due to function execution can also change the state of the worker.

예를 들어, 도 5를 참조하면, 워커의 5가지 상태 중 엠티(Empty) 상태는 의미 그대로 워커가 존재하지 않는 상태를 나타낼 수 있다. For example, referring to FIG. 5 , an empty state among five states of a worker may indicate a state in which a worker does not exist as it is.

또한, 도 5에 도시된 퀄리파이드(Qualified) 상태는 워커가 기본 이미지로 생성된 상태를 의미하는 것으로, 템플릿 워커를 의미할 수 있고, 자원 할당은 이뤄지지 않고 노드에 물리적인 컨테이너만 생성된 상태를 의미할 수도 있다. 이러한 상태의 템플릿 워커들은 템플릿 워커 스케일링에 의해 생성되거나 레디 워커 다운 스케일링에 의해 인액티브 레디 상태의 레디 워커를 템플릿 워커로 변경하여 생성될 수 있다. In addition, the qualified (Qualified) state shown in FIG. 5 means a state in which a worker is created as a base image, which may mean a template worker, and a state in which only a physical container is created in a node without resource allocation. may mean Template workers in this state may be created by template worker scaling or by changing a ready worker in an inactive-ready state to a template worker by down-scaling a ready-walker.

또한, 도 5에 도시된 인액티브 레디(Inactive ready) 상태는 펑션에 할당되어 사용되었던 레디 워커가 가질 수 있는 상태에 해당하는 것으로, 자원의 할당은 이뤄지지 않았지만 펑션은 로딩된 상태를 의미할 수 있다.In addition, the inactive ready state shown in FIG. 5 corresponds to a state that a ready worker that has been allocated and used for a function can have, and although resource allocation is not made, the function may mean a loaded state. .

즉, 템플릿 워커 스케일링에 의해 워커 할당 비용의 상당 부분을 선행적으로 처리할 수 있지만, 템플릿 워커와 레디 워커의 변경 과정에서도 15~20%에 해당하는 수행 비용이 발생하므로 여전히 워커 할당의 응답 시간 지연 문제가 해결되지 않을 수 있다. 그러나 인액티브 레디 상태의 레디 워커를 액티브 레디 상태로 변경시키는 과정에서는 별다른 비용이 발생하지 않으므로, 현재는 사용되고 있지 않은 레디 워커를 바로 템플릿 워커로 변경하지 않고 Inactive 상태로 유지시킴으로써 워커 할당 요청에 대한 빠른 응답을 회신할 수 있다. In other words, a significant portion of the worker allocation cost can be preemptively handled by template worker scaling, but 15-20% of the execution cost is incurred even in the process of changing template workers and ready workers, so the response time of worker allocation is still delayed The problem may not be resolved. However, since there is no cost in the process of changing a ready worker from an inactive-ready state to an active-ready state, a quick response to worker assignment requests is made by maintaining an inactive state without changing the currently unused ready worker to a template worker. reply can be returned.

또한, 액티브 레디(Active ready) 상태는 자원 할당 및 펑션 파일의 로딩이 완료되어 펑션 수행이 가능한 상태를 의미할 수 있다. 이 때, 레디 워커 업 스케일링을 통해 템플릿 워커를 레디 워커로 변경하거나, 인액티브 레디 상태의 레디 워커 상태를 변경하여 액티브 레디 상태의 레디 워커를 생성할 수 있다. In addition, the active ready state may mean a state in which resource allocation and loading of the function file are completed, so that the function can be performed. At this time, a template worker can be changed to a ready worker through ready worker upscaling, or a ready worker in an active ready state can be created by changing the ready worker state in an inactive ready state.

또한, 액티브 런(Active run) 상태는 워커에서 펑션을 실제로 수행하고 있는 상태를 의미하는 것으로, 액티브 레디 상태의 레디 워커에 대해서 워커 할당의 요청에 의해 액티브 런 상태로 변경될 수 있다. In addition, the active run state refers to a state in which the worker is actually executing a function, and may be changed to the active run state by a request of worker assignment for a ready worker in the active-ready state.

이와 같이 워커 할당 단계의 워커 생성 및 초기화를 나누어 별도의 작업으로 처리함으로써 워커 할당 작업의 응답 시간 지연 오버헤드를 감소시킬 수 있다. 즉, 워커 할당 단계에서 대부분의 시간이 소요되는 워커 생성 과정을 워커 할당 요청 시점이 아닌 사전에 미리 준비함으로써 워커 할당 시간을 현저하게 감소시킬 수 있다. As described above, by dividing worker creation and initialization in the worker allocation phase and processing them as separate tasks, the response time delay overhead of the worker allocation operation can be reduced. That is, the worker allocation time can be significantly reduced by preparing the worker creation process, which takes most of the time in the worker allocation step, in advance rather than at the time of the worker allocation request.

예를 들어, 도 12 내지 도 14를 참조하면, 본 발명의 일실시예에 따른 워커 스케줄링 장치에서 외부 컴포넌트의 RestAPI 요청 처리 및 내부 컴포넌트 요청 처리를 주관하는 워커 제어 모듈(1210)은 워커 할당이 요청(Fa)에 대해 응답 속도를 높이기 위한 워커 사전 할당을 위해 워커 스케일러 모듈(1220)로 워커 스케일링을 요청할 수 있다. 이 때, 워커 스케일러 모듈(1220)은 워커 할당 요청 주기를 기반으로 사전 워커 할당 개수를 예측할 수 있다. 만약, 예측된 사전 워커 할당 개수가 5개인 상태에서, 펑션(Fa)에 할당된 인액티브 레디 상태의 레디 워커(1340)가 3개 존재한다고 가정하면, 도 13 내지 도 14에 도시된 것처럼 템플릿 워커(1310) 2개를 액티브 레디 상태의 레디 워커(1320)로 변경함으로써 사전 워커 할당 개수에 상응하도록 액티브 워커(1330)를 할당할 수 있다. For example, referring to FIGS. 12 to 14 , in the worker scheduling apparatus according to an embodiment of the present invention, the worker control module 1210 that manages the RestAPI request processing of the external component and the internal component request processing requests the worker assignment For (Fa), worker scaling may be requested to the worker scaler module 1220 for worker pre-allocation to increase response speed. In this case, the worker scaler module 1220 may predict the number of worker assignments in advance based on the worker assignment request period. If it is assumed that there are three ready workers 1340 in the inactive-ready state assigned to the function Fa in the state where the predicted number of assigned pre-workers is 5, as shown in FIGS. 13 to 14, template workers By changing the two 1310s to the ready workers 1320 in the active-ready state, the active workers 1330 may be allocated to correspond to the pre-allocated number of workers.

즉, 인액티브 레디 상태의 레디 워커를 액티브 레디 상태의 레디 워커로 변경하는 active transit을 통해 최소의 비용으로 할당 가능 상태의 레디 워커를 먼저 준비할 수 있다. 이 후, active transit을 통해 사전 워커 할당이 충족되지 않는 경우에는 템플릿 워커를 레디 워커로 변경하는 레디 워커 업 스케일링 과정이 수행될 수 있다.That is, through active transit, which changes a ready worker in an inactive-ready state to a ready-walker in an active-ready state, it is possible to prepare a ready-worker in an allocable state first at a minimum cost. After that, if the prior worker assignment is not satisfied through active transit, a ready worker upscaling process of changing a template worker to a ready worker may be performed.

이 때, 사전 워커 할당 개수는 펑션 별 단위 시간 동안에 요구되는 워커의 개수에서 액티브 레디 상태인 레디 워커와 액티브 런 상태인 워커의 개수를 뺀 값에 상응할 수 있다.In this case, the number of pre-allocated workers may correspond to a value obtained by subtracting the number of active-ready ready workers and active-running workers from the number of workers required for a unit time for each function.

예를 들어, 펑션 실행에 필요한 워커를 관리하기 위해 워커 스케일링(worker scaling) 요청이 발생하면 워커의 평균 실행 시간(Tx)과 워커 할당 요청 주기(Tf)를 기반으로 단위 시간 구간(△t) 동안에 요구되는 워커의 개수인, SI(Scaling Index)값을 계산할 수 있다.For example, when a worker scaling request occurs to manage the workers required to execute a function, it is executed during the unit time period (Δt) based on the average execution time of the worker (Tx) and the worker allocation request period (Tf). It is possible to calculate the SI (Scaling Index) value, which is the number of required workers.

이 때, 펑션 별 단위 시간 동안에 요구되는 워커의 개수는 펑션을 실행하는 워커의 평균 실행 시간(Tx)을 펑션 별 워커 할당 요청 주기(Tf)로 나눈 값에 상응할 수 있다. 예를 들어, 평균 실행 시간(Tx)은 워커 종료 시에 Fn executor에 의해 기록된 실행 시간의 평균 값으로 사용될 수 있다. In this case, the number of workers required during the unit time for each function may correspond to a value obtained by dividing the average execution time (Tx) of the workers executing the function by the worker assignment request period (Tf) for each function. For example, the average execution time (Tx) may be used as the average value of the execution times recorded by the Fn executor at worker termination.

이 때, 워커 스케일링이 요구되는 워커의 개수(Incremental Count, IC)는 현재 대기 중인 레디 워커와 현재 펑션을 실행 중인 워커를 제외하고 추가로 요구되는 사전 워커 할당 개수를 의미할 수 있다. 따라서, IC는, [수학식 1]과 같이, SI 값에서 현재 액티브 레디 상태인 레디 워커의 개수와 현재 액티브 런 상태인 워커의 개수를 뺀 값에 상응할 수 있다.In this case, the number of workers for which worker scaling is required (Incremental Count, IC) may mean the number of pre-allocated workers additionally required except for the currently waiting ready worker and the worker currently executing the function. Accordingly, the IC may correspond to a value obtained by subtracting the number of workers currently in an active-ready state and the number of workers in an active-run state from the SI value, as shown in Equation (1).

[수학식 1][Equation 1]

ICt = (Txt-1 / Tft) - (Nrw + Naw)IC t = (Tx t-1 / Tf t) - (N rw + N aw )

이 때, 수학식의 (Txt-1 / Tft)는 단위 시간 구간(△t) 동안에 요구되는 워커의 개수인 SIt를 의미할 수 있고, Nrw와 Naw는 각각 현재 액티브 레디 상태인 레디 워커의 개수와 현재 액티브 런 상태인 워커의 개수를 의미할 수 있다.At this time, (Tx t-1 / Tf t) of the equation may mean SI t , which is the number of workers required during the unit time period (Δt), and N rw and N aw are each of the current active-ready state. It may mean the number of ready workers and the number of workers currently in an active run state.

또한, 도 4에는 도시하지 아니하였으나, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 액티브 워커 사용 비율(active worker usage ratio)이 기설정된 액티브 상위 기준 값을 초과하는 경우, 템플릿 워커를 레디 워커로 변경하는 레디 워커 업 스케일링(ready worker up scaling)을 수행할 수 있다. In addition, although not shown in FIG. 4 , in the method for scheduling a worker in a cloud computing system according to an embodiment of the present invention, when an active worker usage ratio exceeds a preset active upper reference value, the template worker You can perform ready worker upscaling by changing to a ready worker.

또한, 도 4에는 도시하지 아니하였으나, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 액티브 워커 사용 비율이 기설정된 액티브 하위 기준 값 이하일 경우, 액티브 레디 상태의 레디 워커를 인액티브 레디 상태로 변경시킬 수 있다.In addition, although not shown in FIG. 4 , the worker scheduling method of the cloud computing system according to an embodiment of the present invention sets the active-ready-ready-ready worker in the inactive-ready state when the active worker usage ratio is less than or equal to a preset active low reference value. state can be changed.

이 때, 액티브 워커 사용 비율(active worker usage ratio)은 액티브 레디 상태의 레디 워커와 액티브 워커를 합한 워커들 중 액티브 워커의 비율에 상응할 수 있다. 즉, 현재 자원이 할당된 액티브 상태의 전체 워커들(active ready + active run) 중 실제로 펑션을 수행하고 있는 액티브 런(active run) 상태의 워커의 비율 값을 의미할 수 있다. At this time, the active worker usage ratio (active worker usage ratio) may correspond to the ratio of active workers among workers in the active-ready state and active workers combined. That is, it may mean a ratio value of workers in an active run state that are actually performing a function among all workers in an active state to which resources are currently allocated (active ready + active run).

예를 들어, 도 11을 참조하면, 기설정된 액티브 상위 기준 값(1110)에 상응하는 액티브 런 상태의 워커 비율 값이 80%에 상응하고, 기설정된 액티브 하위 기준 값(1120)에 상응하는 액티브 런 상태의 워커 비율 값이 20%라고 가정할 수 있다. For example, referring to FIG. 11 , the worker ratio value of the active run state corresponding to the preset active upper reference value 1110 corresponds to 80%, and the active run corresponding to the preset active lower reference value 1120 . We can assume that the state's worker percentage value is 20%.

이 때, 측정된 액티브 워커 사용 비율이 기설정된 액티브 상위 기준 값(1110)을 초과하면, 레디 워커 업 스케일링을 수행할 수 있다. 즉, 액티브 워커 사용 비율이 80%를 초과하는 경우에는 대부분의 워커가 펑션 실행에 할당되어 있으므로, 추가적인 워커의 준비가 필요한 상태로 판단하고 레디 워커 업 스케일링을 수행할 수 있다. In this case, when the measured active worker usage ratio exceeds a preset active upper reference value 1110, ready-walker up-scaling may be performed. That is, when the active worker usage ratio exceeds 80%, most workers are allocated to function execution, so it is determined that additional worker preparation is necessary and ready worker upscaling can be performed.

또한, 측정된 액티브 워커 사용 비율이 기설정된 액티브 하위 기준 값(1120) 이하이면, Inactive transit을 수행할 수 있다. 이 때, Inactive transit은 액티브 레디 상태의 레디 워커에 할당된 자원을 해제함으로써 레디 워커의 상태를 인액티브 레디 상태로 변경시키는 과정에 해당할 수 있다. In addition, when the measured active worker usage ratio is less than or equal to the preset active lower reference value 1120, an inactive transit may be performed. In this case, the inactive transit may correspond to a process of changing the state of the ready worker to the inactive-ready state by releasing the resources allocated to the ready-worker in the active-ready state.

또한, 도 4에는 도시하지 아니하였으나, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 워커 다운 스케일링을 기반으로 기설정된 유휴 시간 동안 사용되지 않는 레디 워커를 템플릿 워커로 초기화할 수 있다.In addition, although not shown in FIG. 4 , in the method for scheduling a worker in a cloud computing system according to an embodiment of the present invention, a ready worker that is not used for a preset idle time can be initialized as a template worker based on the worker downscaling. .

예를 들어, 기설정된 유휴 시간을 IdleTime이라고 가정하면, 펑션에 할당된 인액티브 상태의 레디 워커들 중 IdleTime동안 펑션 수행에 사용되지 않은 워커에 대해 레디 워커 다운 스케일링을 수행하여 템플릿 워커로 변경할 수 있다. For example, assuming that the preset idle time is IdleTime, among the ready workers in the inactive state assigned to the function, the ready worker downscaling is performed on the worker that is not used to perform the function during IdleTime, and it can be changed to a template worker. .

또한, 도 4에는 도시하지 아니하였으나, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 인액티브 워커 비율(inactive worker ratio)이 기설정된 인액티브 상위 기준 값을 초과하는 경우, 인액티브 레디 상태의 레디 워커를 템플릿 워커로 변경하는 레디 워커 다운 스케일링(ready worker down scaling)을 수행할 수 있다. In addition, although not shown in FIG. 4 , the worker scheduling method of the cloud computing system according to an embodiment of the present invention is inactive when an inactive worker ratio exceeds a preset inactive upper reference value. Ready worker down scaling can be performed by changing a ready worker in a ready state to a template worker.

이 때, 인액티브 워커 비율(inactive worker ratio)은 펑션에 할당된 레디 워커 중 펑션 수행 후 자원 할당이 해제된 인액티브 레디 상태의 레디 워커의 비율 값을 의미한다. 예를 들어, 기설정된 인액티브 상위 기준 값이 80%라고 가정한다면, 인액티브 워커 비율이 80%를 초과하는 경우, 할당된 워커에서 펑션 수행이 적어지는 단계인 것으로 판단하고 사용되지 않는 레디 워커를 템플릿 워커로 변환하는 레디 워커 다운 스케일링을 수행할 수 있다. At this time, the inactive worker ratio (inactive worker ratio) means the ratio value of the ready workers in the inactive-ready state in which the resource allocation is released after performing the function among the ready workers allocated to the function. For example, if it is assumed that the preset inactive upper reference value is 80%, if the inactive worker ratio exceeds 80%, it is determined that the assigned worker is in a stage in which function execution is reduced, and unused ready workers are selected. Ready worker downscaling to convert to template worker can be done.

이 때, 도 4에는 도시하지 아니하였으나, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법은 상술한 워커 스케줄링 과정에서 발생하는 다양한 정보를 별도의 저장 모듈에 저장할 수 있다. At this time, although not shown in FIG. 4 , the method for scheduling a worker in a cloud computing system according to an embodiment of the present invention may store various information generated in the above-described worker scheduling process in a separate storage module.

이와 같은 워커 스케줄링 방법을 이용함으로써 펑션 서비스를 수행하는 컨테이너 기반의 워커를 빠르게 할당하고, 응답 비용을 최소화할 수 있다. By using such a worker scheduling method, it is possible to quickly allocate container-based workers that perform function services and minimize response costs.

또한, 펑션 서비스 요청 부하 변동에 능동적으로 대응하고, 빠른 응답 시간이 요구되는 단기 펑션 서비스의 할당 지연 시간을 최소화할 수 있으며, 펑션 실행과 관련된 워커의 실행 준비 부하를 사전에 적절히 분산함으로써 FaaS 플랫폼이 실시간 처리 환경에 보다 적합하도록 할 수 있다. In addition, it is possible to actively respond to function service request load fluctuations, to minimize the allocation delay time for short-term function services that require a fast response time, and to properly distribute the execution load of workers related to function execution in advance so that the FaaS platform It can be made more suitable for a real-time processing environment.

또한, 이와 같은 워커 스케줄링 방법을 다수의 의료기관에서 공유된 클라우드 인프라를 기반으로 하는 의료 인공 지능 진단/학습 클라우드 플랫폼에 적용함으로써 진단 서비스와 같은 우선적인 작업을 효율적으로 지원할 수 있는 스케줄링이 가능할 수 있다. In addition, by applying such a worker scheduling method to a medical AI diagnosis/learning cloud platform based on a cloud infrastructure shared by multiple medical institutions, scheduling that can efficiently support a priority task such as a diagnosis service may be possible.

도 15는 본 발명의 일실시예에 따른 워커 스케줄링 방법을 상세하게 나타낸 동작 흐름도이다.15 is a detailed operation flowchart illustrating a method for scheduling a worker according to an embodiment of the present invention.

도 15를 참조하면, 본 발명의 일실시예에 따른 워커 스케줄링 방법은 워커 스케줄링 장치가, 펑션 실행을 위한 워커 할당을 요청받으면, 워커 할당이 요청된 요청 시간 정보를 기록할 수 있다(S1510).Referring to FIG. 15 , in the method for scheduling a worker according to an embodiment of the present invention, when the apparatus for scheduling a worker receives a request for worker assignment for executing a function, the worker assignment request time information may be recorded ( S1510 ).

이 때, 요청 시간 정보는 펑션의 수행 시간 정보와 함께 사전 할당이 요구되는 워커의 개수를 예측하여 산출하는데 사용될 수 있다. In this case, the request time information may be used to predict and calculate the number of workers required to be pre-allocated together with the execution time information of the function.

이 후, 워커 스케줄링 장치는 해당 워커 할당 요청이 펑션에 대한 최초의 워커 할당 요청인지 여부를 판단할 수 있다(S1515).Thereafter, the worker scheduling apparatus may determine whether the worker assignment request is the first worker assignment request for the function (S1515).

단계(S1515)의 판단결과 해당 워커 할당 요청이 펑션에 대한 최초의 워커 할당 요청이 아니면, 워커 풀에서 관리되는 액티브 레디 리스트를 기반으로 요청된 만큼의 액티브 레디 워커를 탐색하고(S1520) 할당 가능한 레디 워커가 존재하는지 여부를 판단할 수 있다(S1525).As a result of the determination of step (S1515), if the corresponding worker assignment request is not the first worker assignment request for the function, search for as many active ready workers as requested based on the active ready list managed in the worker pool (S1520) and assignable ready It may be determined whether a worker exists (S1525).

단계(S1525)의 판단결과 워커 할당 요청에 상응하는 만큼 할당 가능한 레디 워커가 존재하면, 워커 풀의 액티브 레디 리스트에서 레디 워커를 할당 대상으로 선택할 수 있다(S1530).As a result of the determination of step (S1525), if there are ready workers that can be allocated as many as corresponding to the worker allocation request, a ready worker can be selected as an assignment target from the active-ready list of the worker pool (S1530).

이 후, 선택된 레디 워커를 액티브 런(active run) 상태로 변경하고, 할당에 대한 정보를 메타데이터에 반영할 수 있다(S1540). Thereafter, the selected ready worker may be changed to an active run state, and information about allocation may be reflected in metadata (S1540).

이 후, 선택된 워커의 정보를 할당 요청에 대한 응답으로 전달할 수 있다(S1550).Thereafter, information on the selected worker may be transmitted in response to the allocation request (S1550).

또한, 단계(S1515)의 판단결과 해당 워커 할당 요청이 펑션에 대한 최초의 할당 요청이면, 레디 워커 업 스케일링을 통해 액티브 레디 상태의 레디 워커를 사전 할당한 뒤(S1560), 워커 풀에 생성된 리스트들을 주기적으로 탐색하여 할당 가능한 액티브 레디 상태의 레디 워커를 할당 대상 워커로 선택할 수 있다(S1570).In addition, if it is determined in step S1515 that the corresponding worker assignment request is the first assignment request for a function, the ready worker in the active-ready state is pre-allocated through the ready-worker upscaling (S1560), and the list created in the worker pool A ready worker in an allocable active-ready state may be selected as an assignment target worker by periodically searching for them (S1570).

이 때, 펑션에 대한 최초의 할당 요청인 경우에는 아직 워커 풀(worker pool)에 할당 가능한 액티브 레디 상태의 레디 워커가 존재하지 않는다는 것을 의미할 수 있다. 따라서, 펑션에 대한 최초의 할당 요청이 발생한 경우, 백그라운드 작업에 기반한 레디 워커 업 스케일링을 통해 기본 할당 개수만큼의 템플릿 워커를 액티브 레디 상태의 레디 워커로 런칭시키는 사전 할당을 수행할 수 있다.In this case, in the case of the first allocation request for a function, it may mean that there is no active-ready ready worker that can be allocated to the worker pool yet. Therefore, when the first allocation request for a function occurs, pre-allocation of launching template workers as many as the basic allocation number as ready workers in an active-ready state can be performed through ready-worker upscaling based on background tasks.

이 때, 본 발명에서는 단계(S1560)와 같이 레디 워커 업 스케일링을 통해 액티브 레디 상태의 레디 워커를 사전 할당한 경우, 도 16에 도시된 것처럼 템플릿 워커의 개수가 기설정된 허용 한계 이하가 되었는지 여부를 검사할 수 있다(S1605).At this time, in the present invention, if the ready workers in the active-ready state are pre-allocated through the ready-walker up-scaling as in step S1560, as shown in FIG. can be inspected (S1605).

단계(S1605)의 판단결과 워커 풀에서 관리하는 템플릿 워커의 개수가 기설정된 허용 한계 이하이면, 템플릿 워커 스케일링을 통해 템플릿 워커를 추가로 생성하여 할당할 수 있다(S1610). If it is determined in step S1605 that the number of template workers managed by the worker pool is less than or equal to a preset allowable limit, template workers may be additionally created and allocated through template worker scaling (S1610).

예를 들어, 템플릿 워커는 최대 생성 가능 워커 수의 20%만큼 생성되어 추가 할당될 수 있고, 템플릿 워커 스케일링은 백그라운드 작업으로 수행될 수 있다. For example, template workers may be created by 20% of the maximum number of workers that can be created and additionally allocated, and template worker scaling may be performed as a background task.

도 16과 같은 과정을 통해, 시스템에는 워커 할당 단계에서 처리 시간이 가장 많이 걸리는 워커의 생성 및 초기화를 워커 할당 요청 이전에 수행 가능할 수 있다.Through the process shown in FIG. 16 , the system may be able to perform creation and initialization of a worker, which takes the longest processing time in the worker assignment step, before the worker assignment request.

이 때, 단계(S1605)의 판단결과 판단결과 워커 풀에서 관리하는 템플릿 워커의 개수가 기설정된 허용 한계 이하가 아니면, 추가 작업을 수행하지 않고 종료할 수 있다. In this case, if the number of template workers managed by the worker pool is not less than the preset allowable limit as a result of the determination in step S1605, it may be terminated without performing an additional operation.

또한, 단계(S1525)의 판단결과 워커 할당 요청에 상응하는 만큼 할당 가능한 레디 워커가 존재하지 않으면, 레디 워커 업 스케일링을 통해 액티브 레디 상태의 레디 워커를 추가로 사전 할당한 뒤(S1560), 워커 풀에 생성된 리스트들을 주기적으로 탐색하여 할당 가능한 액티브 레디 상태의 레디 워커를 할당 대상 워커로 선택할 수 있다(S1570). 이후, 단계(S1540)부터 단계(S1550)까지의 과정을 수행하여 워커 할당 작업을 완료할 수 있다. In addition, as a result of the determination of step S1525, if there are no ready workers that can be allocated as much as the worker allocation request, after pre-allocating the ready workers in the active-ready state through ready-walker upscaling (S1560), the worker pool A ready worker in an allocable active-ready state may be selected as an assignment target worker by periodically searching the lists created in . Thereafter, the process from step S1540 to step S1550 may be performed to complete the worker assignment task.

또한, 본 발명에서는 단계(S1540)에 의한 워커 할당으로 액티브 런 상태에 해당하는 액티브 워커가 증가하는 경우, 도 17에 도시된 것처럼 액티브 워커 사용 비율이 기설정된 액티브 상위 기준값을 초과하는지 여부를 검사할 수 있다(S1705).In addition, in the present invention, when the number of active workers corresponding to the active run state increases due to the worker assignment in step S1540, as shown in FIG. 17 , it is checked whether the active worker usage ratio exceeds a preset active upper reference value. Can be (S1705).

단계(S1705)의 판단결과 액티브 워커 사용 비율이 기설정된 액티브 상위 기준값을 초과하면, 레디 워커 업 스케일링을 통해 레디 워커를 추가로 사전 할당할 수 있다(S1710).If it is determined in step S1705 that the active worker usage ratio exceeds a preset active upper reference value, ready workers may be additionally pre-allocated through ready-walker upscaling (S1710).

도 17과 같은 과정을 통해 레디 워커를 추가로 사전 할당해 둠으로써 워커 할당 요청이 왔을 경우에 레디 워커를 즉시 할당해 줄 수 있다. By additionally pre-allocating ready workers through the process shown in FIG. 17, when a worker assignment request is received, ready workers can be assigned immediately.

도 18은 본 발명의 일실시예에 따른 레디 워커 업 스케일링 과정을 상세하게 나타낸 동작 흐름도이다.18 is a detailed operation flowchart illustrating a ready-walker up-scaling process according to an embodiment of the present invention.

도 18을 참조하면, 본 발명의 일실시예에 따른 레디 워커 업 스케일링 과정은 펑션 수행을 위한 최초의 워커 할당을 수행하거나 또는 액티브 워커 사용 비율이 기설정된 상위 기준값을 초과하여 레디 워커 업 스케일링 요청이 발생하면(S1810), 레디 워커 업 스케일링이 필요한 사전 워커 할당 개수(Incremental Count, IC)를 구하기 위해 워커 할당 요청 주기(Tf)를 계산할 수 있다(S1820).Referring to FIG. 18, the ready-walker up-scaling process according to an embodiment of the present invention performs the first worker assignment for performing a function or the active worker usage ratio exceeds a preset upper reference value, so the ready-walker up-scaling request is When it occurs (S1810), it is possible to calculate the worker allocation request period (Tf) in order to obtain the number of pre-allocation workers (Incremental Count, IC) requiring ready-walker upscaling (S1820).

이 때, 워커 할당 요청 주기(Tf)는 현재 시간을 기준으로 하는 단위 시간 구간(△t) 동안에 기록된 워커 할당 요청의 개수, 즉 펑션 요청 개수를 통해 산출될 수 있다. In this case, the worker assignment request period Tf may be calculated based on the number of worker assignment requests recorded during the unit time period Δt based on the current time, that is, the number of function requests.

이 후, 펑션을 실행하는 워커의 평균 실행 시간(Tx)을 워커 할당 요청 주기(Tf)로 나누어 펑션 서비스를 위해 필요한 워커의 개수(Scaling Index, SI)를 계산할 수 있다(S1830).Thereafter, the number of workers (Scaling Index, SI) required for the function service may be calculated by dividing the average execution time (Tx) of the workers executing the function by the worker assignment request period (Tf) (S1830).

이 때, 평균 실행 시간(Tx)은 워커가 종료됨에 따라 기록되는 실행 시간의 평균 값에 상응할 수 있다. In this case, the average execution time Tx may correspond to an average value of execution times recorded as the worker terminates.

이 후, 펑션 수행에 필요한 워커 개수(SI)에서 현재 해당 펑션에 할당된 Active 상태의 워커의 개수를 빼서 사전 워커 할당 개수(IC)를 계산할 수 있다(S1840).Thereafter, the number of workers allocated in advance (IC) may be calculated by subtracting the number of workers in the active state currently allocated to the corresponding function from the number of workers (SI) required to perform the function (S1840).

이 때, Active 상태의 워커는 액티브 레디 상태의 레디 워커와 액티브 런 상태인 액티브 워커를 의미할 수 있다. In this case, the worker in the active state may mean a ready worker in an active-ready state and an active worker in an active run state.

이 후, 워커 풀의 인액티브 레디 리스트(inactive ready list)에 할당 가능한 워커가 존재하는지 여부를 판단할 수 있다(S1845).Thereafter, it may be determined whether there is an allocable worker in an inactive ready list of the worker pool ( S1845 ).

이 때, 인액티브 레디 리스트의 레디 워커들은 펑션에 대한 수행 종료 후 자원 할당만 해제된 상태의 워커이므로, 자원의 할당만 이루어지면 바로 액티브 레디 상태의 레디 워커로써 사용될 수 있다. 따라서, 본 발명에서는 인액티브 레디 상태의 레디 워커를 액티브 레디 상태의 레디 워커로 변경시키는 active transit을 통해 최소의 비용으로 할당 가능 상태의 워커를 준비할 수 있다. At this time, since the ready workers of the inactive ready list are workers in a state in which only resource allocation is released after the execution of the function is terminated, they can be used as ready workers in the active ready state as soon as resource allocation is made. Therefore, in the present invention, it is possible to prepare a worker in an allocable state at a minimum cost through an active transit that changes a ready worker in an inactive-ready state to a ready-walker in an active-ready state.

단계(S1845)의 판단결과 인액티브 레디 리스트에 할당 가능한 워커가 존재하면, Active transit을 통해 해당 워커의 상태를 액티브 레디 상태로 변경하고(S1850), 사전 워커 할당 개수(IC)만큼 워커가 모두 사전 할당되었는지 여부를 판단할 수 있다(S1855).As a result of the determination of step (S1845), if there is an assignable worker in the inactive-ready list, the state of the worker is changed to the active-ready state through the active transit (S1850), and all the workers are pre-assigned by the number of pre-allocated workers (IC). It may be determined whether or not the assignment has been made (S1855).

단계(S1855)의 판단결과 사전 워커 할당 개수(IC)만큼 워커가 사전 할당되었으면 레디 워커 업 스케일링을 종료할 수 있다.As a result of the determination of step S1855, if workers are pre-allocated as much as the number of pre-allocated workers (IC), the ready-walker up-scaling may be terminated.

즉, Active transit을 통해 사전 워커 할당 개수(IC)만큼의 워커를 모두 할당하였다면, 레디 워커 업 스케일링이 종료될 수 있다. That is, if all the workers as many as the number of pre-allocated workers (IC) are allocated through active transit, the ready worker upscaling may be terminated.

그러나, 단계(S1845)의 판단결과 인액티브 레디 리스트에 할당 가능한 워커가 존재하지 않거나, 또는 단계(S1855)의 판단결과 사전 워커 할당 개수(IC)만큼 워커가 사전 할당되지 않았으면, 단계(S1860) 내지 단계(S1890)과 같이 템플릿 워커를 런칭하여 레디 워커로 변경하는 레디 워커 업 스케일링 과정이 수행될 수 있다. However, if there is no worker assignable to the inactive ready list as a result of the determination of step S1845, or if the number of pre-allocated workers is not pre-allocated as a result of the determination of step S1855 (IC), step S1860 A ready worker upscaling process of launching a template worker and changing it to a ready worker may be performed as in step S1890.

먼저, 본 발명의 일실시예에 따른 워커 스케줄링 장치는 계산 노드에 구비된 노드 에이전트로 펑션 수행을 위한 환경 정보와 펑션 저장 정보를 요청할 수 있다(S1860).First, the worker scheduling apparatus according to an embodiment of the present invention may request environment information and function storage information for performing a function from a node agent provided in a computation node (S1860).

이 후, 컨테이너 관리기를 통해 펑션 실행 환경 정보를 파라미터로 템플릿 워커를 런칭하여 레디 워커로 변경할 수 있다(S1870).Thereafter, the template worker can be launched using the function execution environment information as a parameter through the container manager and changed to the ready worker (S1870).

이 때, 노드 에이전트는 컨테이너 관리기 또는 경량 가상 인스턴스 관리기를 기반으로 하여 펑션 실행 환경 정보를 파라미터로 워커를 런칭하는 작업을 수행할 수 있다. In this case, the node agent may perform the task of launching the worker based on the container manager or the lightweight virtual instance manager using the function execution environment information as a parameter.

이 후, 런칭된 템플릿 워커의 저장소에 펑션 파일을 다운로딩하고, 펑션 실행을 위한 전처리 작업을 수행함으로써 레디 워커의 준비가 완료될 수 있다(S1880).Thereafter, the ready worker can be prepared by downloading the function file to the storage of the launched template worker and performing a pre-processing task for executing the function (S1880).

이 후, 준비된 레디 워커의 상태를 액티브 레디 상태로 변경하고, 해당 레디 워커의 할당 정보를 반영함으로써 사전 워커 할당 개수(IC)에 상응하는 액티브 레디 상태의 레디 워커가 준비되면 레디 워커 업 스케일링이 종료될 수 있다(S1890).After that, the ready worker upscaling is terminated when the ready worker in the active ready state corresponding to the pre-allocated number of workers (IC) is ready by changing the state of the prepared ready worker to the active ready state and reflecting the allocation information of the corresponding ready worker. can be (S1890).

도 19는 본 발명의 일실시예에 따른 템플릿 워커 업 스케일링 과정을 상세하게 나타낸 동작 흐름도이다.19 is a detailed operation flowchart illustrating a template walker up-scaling process according to an embodiment of the present invention.

도 19를 참조하면, 본 발명의 일실시예에 따른 템플릿 워커 업 스케일링 과정은, 계산 노드가 최초로 등록되거나 레디 워커 업 스케일링에 의해 시스템의 가용 템플릿 워커의 개수가 기설정된 허용 한계 이하가 되는 경우, 워커 스케줄링 장치에 의해 백그라운드에서 템플릿 워커 업 스케일링이 요청될 수 있다(S1910).Referring to FIG. 19 , in the template worker upscaling process according to an embodiment of the present invention, when a calculation node is first registered or the number of template workers available in the system by ready worker upscaling becomes less than or equal to a preset allowable limit, Template worker upscaling may be requested in the background by the worker scheduling device (S1910).

이 후, 워커 스케줄링 장치는 템플릿 워커 업 스케일링이 필요한 대상 노드를 선택하고, 대상 노드에 생성하기 위한 템플릿 워커 개수를 산출할 수 있다(S1920).Thereafter, the worker scheduling apparatus may select a target node requiring template worker upscaling and calculate the number of template workers to be generated in the target node ( S1920 ).

예를 들어, 템플릿 워커 생성 개수는 대상 노드에서 생성 가능한 워커 개수의 20%에 상응하게 산출될 수 있다. For example, the number of template workers generated may be calculated to correspond to 20% of the number of workers that can be created in the target node.

이 후, 워커 스케줄링 장치가 대상 노드의 노드 에이전트에게 템플릿 워커 생성 개수를 파라미터로 하여 템플릿 워커 생성을 위한 정보를 요청하면(S1930), 노드 에이전트는 컨테이너 관리기 또는 경량 가상 인스턴스 관리기를 통해 템플릿 워커의 인스턴스인 컨테이너를 생성할 수 있다(S1940).After that, when the worker scheduling device requests information for template worker creation from the node agent of the target node with the number of template workers created as a parameter (S1930), the node agent sends an instance of the template worker through the container manager or lightweight virtual instance manager. An in-container may be created (S1940).

이 후, 워커 스케줄링 장치는 생성된 템플릿 워커의 상태를 Qualified로 변경하여 워커 풀의 템플릿 워커 리스트에 추가하고(S1950), 해당 워커의 생성 정보를 반영할 수 있다. Thereafter, the worker scheduling apparatus may change the state of the created template worker to Qualified, add it to the template worker list of the worker pool (S1950), and reflect creation information of the worker.

이 후, 도 19에는 도시하지 아니하였으나, 모든 계산 노드에 대한 템플릿 워커 생성이 완료되었는지 여부를 확인한 뒤, 템플릿 워커를 생성할 계산 노드가 존재하면 단계(S1910)부터 단계(S1950)까지의 과정을 노드 별로 반복적으로 수행할 수 있다. 이 후, 모든 계산 노드에 대해 템플릿 워커의 생성이 완료되면 템플릿 워커 업 스케일링이 종료될 수 있다.After that, although not shown in FIG. 19, after checking whether the template worker creation for all the calculation nodes has been completed, if there is a calculation node for generating the template worker, the process from step S1910 to step S1950 is performed It can be performed repeatedly for each node. After that, when the creation of template workers for all computation nodes is completed, template worker upscaling may be terminated.

도 20은 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치를 나타낸 블록도이다.20 is a block diagram illustrating a worker scheduling apparatus of a cloud computing system according to an embodiment of the present invention.

도 20을 참조하면, 본 발명의 일실시예에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치는 프로세서(2010) 및 메모리(2020)를 포함한다. Referring to FIG. 20 , a worker scheduling apparatus of a cloud computing system according to an embodiment of the present invention includes a processor 2010 and a memory 2020 .

프로세서(2010)는 펑션(FUNCTION) 수행을 위한 워커(WORKER) 할당 요청이 발생하기 이전에, 워커 실행 준비 부하를 분산 처리하기 위해 템플릿 워커(TEMPLATE WORKER)를 사전 생성(PRE-CREATION)한다.The processor 2010 pre-creates (PRE-CREATION) a template worker (TEMPLATE WORKER) to distribute the worker execution preparation load before a worker assignment request for performing a function (FUNCTION) occurs.

이 때, 본 발명에서는 2단계 워커 인스턴스 기반 워커 스케줄링의 워커 최초 할당 및 부하 변동에 따른 응답 수행 시간이 큰 문제를 해결하기 위해 2단계 사전 워커 할당을 통한 3단계 워커 인스턴스 기반 워커 스케줄링 알고리즘을 제안하고자 한다.At this time, the present invention proposes a three-step worker instance-based worker scheduling algorithm through two-step pre-worker assignment in order to solve the problem of large response time due to the initial assignment of workers and load changes in the two-step worker instance-based worker scheduling. do.

먼저, 워커(worker)는 마이크로 펑션을 수행하는 계산 노드의 컨테이너 객체에 대응하는 상위 수준의 논리적인 자원에 해당하는 것으로, 펑션 실행을 위한 할당 단계에서 실제 물리 노드의 컴퓨팅 자원을 할당받을 수 있다. 이 때, 본 발명의 일실시예에 따른 워커는 스케줄러 할당 및 스케일링의 기본 단위에 해당할 수 있으며, 도 5에 도시된 것과 같이 3단계로 분류될 수 있다. First, a worker corresponds to a higher-level logical resource corresponding to a container object of a computation node performing a micro-function, and may be allocated a computing resource of an actual physical node in the allocation step for executing the function. In this case, the worker according to an embodiment of the present invention may correspond to a basic unit of scheduler allocation and scaling, and may be classified into three stages as shown in FIG. 5 .

도 5 내지 도 6을 참조하면, 템플릿 워커(510)는 모든 펑션에서 공통으로 사용할 수 있도록 기본 이미지와 자원 용량에 상응하게 구성된 중간 단계의 임시 워커에 상응할 수 있다. 본 발명에서 템플릿 워커는, 도 6에 도시된 것과 같이, 워커 할당 및 초기화 수행 시간의 분산을 통한 빠른 워커 할당 처리 및 부하 변동 처리를 지원하는 사전 할당(pre creation)을 위해 활용될 수 있다. 5 to 6 , the template worker 510 may correspond to an intermediate temporary worker configured to correspond to a basic image and resource capacity to be commonly used by all functions. In the present invention, as shown in FIG. 6 , the template worker may be utilized for pre-creation that supports quick worker allocation processing and load change processing through distribution of worker allocation and initialization execution times.

이러한, 템플릿 워커(510)를 생성하는 과정은 2단계 워커 인스턴스 기반 워커 스케줄링에서 많은 수행 시간을 필요로 하는 워커 생성 과정에 해당하는 것이지만, 워커 할당 요청 시에 생성되는 것이 아니라 워커 스케줄링이 최초 시작되거나 템플릿 워커 개수가 일정 비율 이하로 떨어지면 수행될 수 있다. 즉, 본 발명에서는 워커 할당 및 초기화 과정에서 70~80%의 수행 시간을 갖는 워커 생성 과정을 템플릿 워커 생성 단계에서 이루어지게 할 수 있다. The process of creating the template worker 510 corresponds to the process of creating a worker that requires a lot of execution time in the two-step worker instance-based worker scheduling, but it is not created when a worker assignment request is made, but when worker scheduling is first started or It can be executed when the number of template workers falls below a certain percentage. That is, in the present invention, the worker creation process having 70 to 80% of the execution time in the worker assignment and initialization process can be made in the template worker creation step.

이 때, 템플릿 워커의 개수가 최대 생성 가능 워커 수 대비 기설정된 허용 한계 이하일 경우, 백그라운드에서 템플릿 워커 업 스케일링(template worker up scaling)을 수행하여 템플릿 워커를 추가 생성할 수 있다. At this time, if the number of template workers is less than the preset allowable limit compared to the maximum number of workers that can be created, template workers can be additionally created by performing template worker up-scaling in the background.

예를 들어, 템플릿 워커 업 스케일링은 시스템의 전체 계산 노드에 의한 최대 생성 가능 워커 수의 20% 정도씩 템플릿 워커를 생성하도록 수행될 수 있다. 이 때, 템플릿 워커 업 스케일링은 백그라운드에서 수행되고, 펑션을 실행하는 워커들과 상관없이 사전 생성되는 임시 워커이므로 펑션 실행을 지연시키거나 부하를 제공하지 않도록 효율적으로 동작할 수 있다. For example, template worker upscaling can be performed to create template workers by about 20% of the maximum number of workers that can be created by the total number of compute nodes in the system. At this time, the template worker upscaling is performed in the background, and since it is a temporary worker that is created in advance regardless of workers executing the function, it can operate efficiently so as not to delay the execution of the function or provide a load.

따라서, 일반적인 워커 할당 요청 시에는 사전에 생성된 템플릿 워커를 자원 정보 설정 및 펑션 로딩을 통해 레디 워커로 변경시키는 과정만 수행하면 되므로, 15~20% 정도의 수행 비용만으로 워커 할당 요청에 대한 응답을 수행할 수 있다.Therefore, when making a general worker assignment request, you only need to perform the process of changing the template worker created in advance to a ready worker through resource information setting and function loading. can be done

또한, 프로세서(2010)는 펑션 별 워커 할당 요청 주기의 변화를 고려하여 사전 워커 할당 개수를 예측한다.Also, the processor 2010 predicts the number of worker assignments in advance in consideration of the change in the worker assignment request period for each function.

이 때, 본 발명은 펑션 서비스 요청 부하에 능동적으로 대응하는 워커 스케줄링 기술에 관한 것으로, 워커 할당 요청이 아니라 요청 주기의 변화를 통해 펑션을 실행할 워커를 관리하기 위한 워커 스케일링 여부를 결정할 수 있다. In this case, the present invention relates to a worker scheduling technique that actively responds to a function service request load, and it is possible to determine whether to scale a worker to manage a worker who will execute a function through a change in the request period rather than a worker assignment request.

예를 들어, 펑션 수행 시간에 비해 워커 할당 요청 주기가 짧아지는 경우, 워커 스케일링을 통해 펑션을 실행할 수 있는 준비 상태에 워커를 동적으로 증가시킬 수 있다. 이를 위해 펑션의 수행 시간과 펑션 서비스 요청 주기를 이용하여 스케일링에 필요한 워커의 수, 즉 사전 워커 할당 개수를 산출할 수 있고, 할당 준비된 워커와 실제 수행중인 워커의 비율을 통해 워커 스케일링이 필요한 시점을 결정할 수 있다. For example, if the worker assignment request cycle is shorter than the function execution time, the worker can be dynamically increased in the ready state to execute the function through worker scaling. To this end, the number of workers required for scaling, that is, the number of workers allocated in advance, can be calculated using the execution time of the function and the function service request period. can decide

이와 같은 방법의 워커 스케일링을 통해, 펑션을 수행하기 위한 워커를 사전에 준비함으로써 워커 할당 요청에 대한 응답 시간을 개선 할 수 있다.Through this method of worker scaling, it is possible to improve the response time to a worker assignment request by preparing a worker to perform a function in advance.

이 때, 펑션 별 워커 할당 요청 주기는 펑션 별 단위 시간 동안에 할당 요구되는 워커의 개수를 기반으로 산출될 수 있다.In this case, the worker assignment request period for each function may be calculated based on the number of workers required to be assigned during the unit time for each function.

예를 들어, 도 10을 참조하면, 펑션 별 워커 할당 요청 주기(Tf)는 동적 슬라이딩 윈도우(Dynamic flexible Sliding Window, DSW)를 기반으로 산출될 수 있다. 이 때, 도 10에 도시된 동적 슬라이딩 윈도우(1020)는 펑션 별 단위 시간을 의미하는 단위 시간 구간(△t)를 나타낼 수 있고, 펑션 별 워커 할당 요청 주기는 단위 시간 구간(△t) 내의 워커 할당 요청(1010)의 개수에 의해 산출될 수 있다. For example, referring to FIG. 10 , the worker assignment request period Tf for each function may be calculated based on a dynamic flexible sliding window (DSW). At this time, the dynamic sliding window 1020 shown in FIG. 10 may represent a unit time period Δt that means a unit time for each function, and the worker assignment request period for each function is a worker within the unit time period Δt. It may be calculated by the number of allocation requests 1010 .

이 때, 단위 시간 구간(△t)은 펑션 별로 동적으로 유연하게 변화될 수 있다. 즉, 워커 할당 요청(1010)이 많으면 동적 슬라이딩 윈도우에 의한 단위 시간 구간(△t)을 절반으로 줄일 수 있고, 단위 시간 구간(△t) 동안에 워커 할당 요청(1010)이 존재하지 않으면 해당 구간을 2배씩 증가시킬 수 있다. 이 때, 단위 시간 구간(△t)의 최대 값은 단기 수행 펑션의 timeout 값에 상응할 수 있다.In this case, the unit time period Δt may be dynamically and flexibly changed for each function. That is, if there are many worker allocation requests 1010, the unit time period Δt by the dynamic sliding window can be reduced by half, and if there is no worker allocation request 1010 during the unit time period Δt, the corresponding period It can be increased by two times. In this case, the maximum value of the unit time period Δt may correspond to the timeout value of the short-term execution function.

또한, 프로세서(2010)는 템플릿 워커를 사전 워커 할당 개수에 상응하는만큼 워커 업 스케일링(WORKER UP SCALING)하여 레디 워커(READY WORKER)를 사전 할당(PRE-ALLOCATION)한다.In addition, the processor 2010 pre-allocates the ready worker (READY WORKER) by up-scaling the template worker by the worker up-scaling corresponding to the number of pre-allocated workers (PRE-ALLOCATION).

도 5 내지 도 6을 참조하면, 레디 워커(520)는 펑션 수행을 위한 자원 정보의 설정 및 자원 할당이 완료된 펑션 실행 준비 상태의 워커에 상응할 수 있다. 즉, 레디 워커는 펑션에 할당이 이루어지는 단계의 워커로, 실제 수행되는 펑션이 로딩된 실행 준비 단계의 워커에 상응할 수 있다. 5 to 6 , the ready worker 520 may correspond to a worker in a function execution preparation state in which resource information setting and resource allocation for function execution have been completed. That is, the ready worker is a worker in the stage where assignment is made to the function, and may correspond to the worker in the execution preparation stage in which the actually executed function is loaded.

또한, 도 5에 도시된 액티브 워커(530)는 스케줄러에 의해 할당이 완료된 후에 펑션을 실제 수행하는 워커에 상응하는 것으로, 후에 설명할 레디 워커(520)가 액티브 런(active run) 상태일 때의 워커를 의미할 수도 있다.In addition, the active worker 530 shown in FIG. 5 corresponds to a worker that actually performs a function after allocation by the scheduler is completed, and the ready worker 520, which will be described later, is in an active run state. It can also mean walker.

이 때, 도 5에 도시된 본 발명의 워커들은 워커 인스턴스 타입 별로 별도의 리스트를 구성할 수 있고, 모든 리스트들은 도 7에 도시된 것과 같이 하나의 워커 풀(worker pool)로 관리될 수 있다. In this case, the workers of the present invention shown in FIG. 5 may configure a separate list for each worker instance type, and all lists may be managed as one worker pool as shown in FIG. 7 .

이 때, 도 7을 참조하면, 본 발명의 일실시예에 따른 워커 풀은 워커 스케줄러 또는 워커 스케줄링 장치의 기동 시에 생성될 수 있으며, 초기에는 템플릿 워커 리스트(710)만 존재할 수 있다. At this time, referring to FIG. 7 , a worker pool according to an embodiment of the present invention may be created when a worker scheduler or a worker scheduling device is started, and only the template worker list 710 may initially exist.

이 때, 각 계산 노드에 구비된 노드 에이전트의 노드 등록 요청에 의해 노드의 구성 및 자원 정보가 등록될 수 있다. 또한, 노드의 자원 정보 중 메모리 용량에 의해 계산 노드에 생성 가능한 템플릿 워커의 개수가 정해질 수 있고, 최초에는 노드에서 생성 가능한 전체 워커 수의 30% 정도에 해당하는 템플릿 워커를 생성하여 워커 풀에 추가할 수 있다.In this case, the configuration and resource information of the node may be registered by the node registration request of the node agent provided in each computation node. In addition, the number of template workers that can be created in the computation node can be determined by the memory capacity among the resource information of the node. At first, template workers corresponding to about 30% of the total number of workers that can be created in the node are created and added to the worker pool. can be added

또한, 프로세서(2010)는 펑션 수행을 위한 워커 할당 요청에 따라 레디 워커를 액티브 워커(active worker)로 할당하고, 펑션 서비스 요청 부하를 고려하여 할당이 해제된 레디 워커의 상태를 변경할 수 있다.In addition, the processor 2010 may allocate a ready worker as an active worker according to a worker assignment request for performing a function, and change the state of the released ready worker in consideration of the function service request load.

예를 들어, 도 7을 참조하면, 템플릿 워커 리스트(710)에 포함된 템플릿 워커(TWK)는 펑션 수행을 위한 워커 할당 요청에 의해 레디 워커로 변경될 수 있다. For example, referring to FIG. 7 , the template worker (TWK) included in the template worker list 710 may be changed to a ready worker according to a worker assignment request for performing a function.

이 때, 레디 워커의 상태는 자원 할당 및 펑션 파일의 로딩이 완료된 액티브 레디(Active Ready) 상태 및 자원이 할당되지 않았지만 펑션 파일의 로딩이 완료된 인액티브 레디(Inactive Ready) 상태 중 어느 하나에 해당할 수 있다. At this time, the state of the ready worker may correspond to either an active ready state in which resource allocation and loading of the function file are completed, and an inactive ready state in which the resource is not allocated but loading of the function file is completed. can

즉, 액티브 레디 상태는 워커가 할당된 상태는 아니지만 펑션 서비스 요청 부하 상황을 고려했을 때에 레디(ready) 상태로 유지되어야 하는 대기 상태의 워커 인스턴스 상태를 의미할 수 있고, 인액티브 레디 상태는 할당 해제된 레디 워커가 완전히 필요없는 상태가 되기 이전까지 유지하기 위한 워커 인스턴스 상태를 의미할 수 있다. That is, the active-ready state may refer to a state of a worker instance in a standby state that is not assigned to a worker, but must be maintained in a ready state when considering the function service request load situation, and the inactive-ready state is deallocated. It may mean the state of a worker instance to maintain until the ready-made worker becomes completely unnecessary.

예를 들어, 템플릿 워커에서 레디 워커로 변경되는 수행 시간 비용은 템플릿 워커가 생성되는 비용에 비해서는 상대적으로 낮다고 볼 수 있지만, 여전히 10~15% 정도의 수행 시간이 요구된다. 그러나, 레디 워커의 Active와 Inactive의 상태 변화는, 단순히 도 7에 도시된 액티브 레디 리스트(730)와 인액티브 레디 리스트(720) 및 상태 플래그를 변경하는 작업으로 수행 시간이 거의 요구되지 않는다. For example, the execution time cost of changing from a template worker to a ready worker is relatively low compared to the cost of creating a template worker, but it still requires 10 to 15% of the execution time. However, changing the active and inactive states of the ready worker simply changes the active-ready list 730 and the inactive-ready list 720 and the state flag shown in FIG. 7 , and requires little execution time.

즉, 본 발명에서는 펑션에 대한 할당 요청 시 템플릿 워커에서 레디 워커로 변경되는 상황을 최소화하기 위해, 레디 워커로 생성된 워커에 대해서는 워커가 사용되지 않는 상황에서도 유지하는 lazy deallocation방식을 적용함으로써 워커 할당 비용을 최소화할 수 있다.That is, in the present invention, in order to minimize the situation in which the template worker is changed to a ready worker when an assignment request for a function is made, the lazy deallocation method that maintains the worker created as a ready worker even when the worker is not used is applied to allocate workers. cost can be minimized.

이 때, 본 발명에서는 지원하는 시스템 자원의 사용 현황, 워커 가용 현황 및 워커 할당 요청 부하 변동에 반응하는 워커 스케일링(worker scaling)을 통해 선제적인 워커 할당 및 해제를 수행함으로써 실제 워커 할당 요청에 대한 수행 비용을 최소화하도록 워커 인스턴스를 변경하고 관리할 수 있다. At this time, in the present invention, the actual worker assignment request is performed by preemptively assigning and releasing workers through worker scaling that responds to changes in the usage status of supported system resources, worker availability status, and worker assignment request load changes. You can change and manage worker instances to minimize costs.

이 때, 본 발명의 일실시예에 따른 워커 스케일링은 특정 조건이나 상황을 만족하는 경우에 다수의 워커를 생성, 변경 또는 삭제하는 처리 과정을 의미할 수 있다. In this case, worker scaling according to an embodiment of the present invention may refer to a process of creating, changing, or deleting a plurality of workers when a specific condition or situation is satisfied.

예를 들어, 도 8을 참조하면, 본 발명의 일실시예에 따른 워커 스케일링은 다수의 템플릿 워커를 생성하거나 삭제하는 템플릿 워커 스케일링(Template worker scaling)과 다수의 템플릿 워커를 레디 워커로 변경하는 레디 워커 업 스케일링(Ready worker up scaling) 그리고 레디 워커를 다시 템플릿 워커로 변경하는 레디 워커 다운 스케일링(Ready worker down scaling)으로 구분될 수 있다.For example, referring to FIG. 8 , worker scaling according to an embodiment of the present invention is a template worker scaling that creates or deletes a plurality of template workers and a ready-made worker that changes a plurality of template workers to a ready worker It can be divided into ready worker up scaling and ready worker down scaling, which changes a ready worker back to a template worker.

이 때, 템플릿 워커 스케일링은, 전체 워커 할당 비용의 70~80%에 해당하는 워커의 전체 생성 비용을 상쇄하기 위해 템플릿 워커에 대한 사전 할당(up scaling)이나 할당 해제(down scaling)을 처리하는 과정에 상응할 수 있다. 이 때, 템플릿 워커는 모든 워커가 공통적으로 사용할 수 있는 이미지와 최소 자원이 할당된 워커를 의미할 수 있으며, 시스템의 템플릿 워커 가용율이 한계점 이하가 되면 템플릿 워커 스케일링에 의해 템플릿 워커가 사전 할당될 수 있다. 이 때, 최초의 템플릿 워커는 워커 풀이 생성된 이후에 전체 시스템에서 생성 가능한 워커의 20% 정도로 생성될 수 있다. 예를 들어, 템플릿 워커 스케일링은 계산 노드의 템플릿 워커를 생성 또는 삭제함으로써 워커 풀에서 관리하는 템플릿 워커 리스트(Template worker list)에서 템플릿 워커를 추가하거나 제거할 수 있다.At this time, template worker scaling is a process of pre-allocation (up-scaling) or de-allocation (down-scaling) of template workers to offset the total creation cost of workers, which is 70-80% of the total worker allocation cost can correspond to At this time, the template worker may mean a worker to which an image and minimum resources that all workers can use in common are allocated. can At this time, after the worker pool is created, the first template worker can be created in about 20% of the workers that can be created in the entire system. For example, template worker scaling can add or remove template workers from the template worker list managed by the worker pool by creating or deleting template workers of the compute node.

이 때, 레디 워커 업 스케일링은 펑션 서비스 요청에 선제적으로 대응하여 레디 워커 수를 증가시키는 과정에 상응할 수 있다. 이 때, 레디 워커 업 스케줄링은 워커 할당 요청에 대해 빠른 응답 및 수행 시간을 보장하기 위해 펑션 할당 요청 주기를 기반으로 수행될 수 있다. 예를 들어, 템플릿 워커를 펑션 수행이 가능한 레디 워커로 변경하고 레디 워커 리스트(Ready worker list)에 추가하는 작업을 수행할 수 있다. In this case, the ready worker up-scaling may correspond to a process of increasing the number of ready workers by preemptively responding to a function service request. In this case, the ready worker up-scheduling may be performed based on the function assignment request cycle in order to guarantee a quick response and execution time to the worker assignment request. For example, you can change a template worker to a ready worker that can perform functions and add it to the ready worker list.

이 때, 레디 워커 다운 스케일링은 특정 펑션에 할당되어 장기간 사용되지 않는 인액티브 레디(inactive ready) 상태의 레디 워커를 초기화시킴으로써 다른 펑션 할당 요청에서 사용할 수 있는 템플릿 워커로 변경하는 과정에 상응할 수 있다. 예를 들어, 인액티브 레디 상태의 레디 워커에 대해서 펑션의 자원 설정 및 로딩 정보를 초기화하여 템플릿 워커로 변경하고, 변경된 템플릿 워커를 템플릿 워커 리스트에 추가할 수 있다. At this time, ready worker downscaling may correspond to the process of changing to a template worker that can be used in other function assignment requests by initializing the ready worker in an inactive ready state that is assigned to a specific function and not used for a long time. . For example, for a ready worker in an inactive-ready state, resource setting and loading information of a function may be initialized to be changed to a template worker, and the changed template worker may be added to the template worker list.

이 때, 본 발명의 일실시예에 따른 프로세서는 워커 스케일링, 워커 할당 및 해제 과정에서 도 9에 도시된 것과 같이 다양한 워커의 상태를 관리할 수 있고, 펑션 실행에 의한 요청이나 조건의 변화에 의해 워커의 상태를 변화시킬 수도 있다. At this time, the processor according to an embodiment of the present invention can manage the states of various workers as shown in FIG. 9 in the process of worker scaling, worker assignment and release, and by changing a request or condition by executing a function. It can also change the state of the walker.

예를 들어, 도 5를 참조하면, 워커의 5가지 상태 중 엠티(Empty) 상태는 의미 그대로 워커가 존재하지 않는 상태를 나타낼 수 있다. For example, referring to FIG. 5 , an empty state among five states of a worker may indicate a state in which a worker does not exist as it is.

또한, 도 5에 도시된 퀄리파이드(Qualified) 상태는 워커가 기본 이미지로 생성된 상태를 의미하는 것으로, 템플릿 워커를 의미할 수 있고, 자원 할당은 이뤄지지 않고 노드에 물리적인 컨테이너만 생성된 상태를 의미할 수도 있다. 이러한 상태의 템플릿 워커들은 템플릿 워커 스케일링에 의해 생성되거나 레디 워커 다운 스케일링에 의해 인액티브 레디 상태의 레디 워커를 템플릿 워커로 변경하여 생성될 수 있다. In addition, the qualified (Qualified) state shown in FIG. 5 means a state in which a worker is created as a base image, which may mean a template worker, and a state in which only a physical container is created in a node without resource allocation. may mean Template workers in this state may be created by template worker scaling or by changing a ready worker in an inactive-ready state to a template worker by down-scaling a ready-walker.

또한, 도 5에 도시된 인액티브 레디(Inactive ready) 상태는 펑션에 할당되어 사용되었던 레디 워커가 가질 수 있는 상태에 해당하는 것으로, 자원의 할당은 이뤄지지 않았지만 펑션은 로딩된 상태를 의미할 수 있다.In addition, the inactive ready state shown in FIG. 5 corresponds to a state that a ready worker that has been allocated and used for a function can have, and although resource allocation is not made, the function may mean a loaded state. .

즉, 템플릿 워커 스케일링에 의해 워커 할당 비용의 상당 부분을 선행적으로 처리할 수 있지만, 템플릿 워커와 레디 워커의 변경 과정에서도 15~20%에 해당하는 수행 비용이 발생하므로 여전히 워커 할당의 응답 시간 지연 문제가 해결되지 않을 수 있다. 그러나 인액티브 레디 상태의 레디 워커를 액티브 레디 상태로 변경시키는 과정에서는 별다른 비용이 발생하지 않으므로, 현재는 사용되고 있지 않은 레디 워커를 바로 템플릿 워커로 변경하지 않고 Inactive 상태로 유지시킴으로써 워커 할당 요청에 대한 빠른 응답을 회신할 수 있다. In other words, a significant portion of the worker allocation cost can be preemptively handled by template worker scaling, but 15-20% of the execution cost is incurred even in the process of changing template workers and ready workers, so the response time of worker allocation is still delayed The problem may not be resolved. However, since there is no cost in the process of changing a ready worker from an inactive-ready state to an active-ready state, a quick response to worker assignment requests is made by maintaining an inactive state without changing the currently unused ready worker to a template worker. reply can be returned.

또한, 액티브 레디(Active ready) 상태는 자원 할당 및 펑션 파일의 로딩이 완료되어 펑션 수행이 가능한 상태를 의미할 수 있다. 이 때, 레디 워커 업 스케일링을 통해 템플릿 워커를 레디 워커로 변경하거나, 인액티브 레디 상태의 레디 워커 상태를 변경하여 액티브 레디 상태의 레디 워커를 생성할 수 있다. In addition, the active ready state may mean a state in which resource allocation and loading of the function file are completed, so that the function can be performed. At this time, a template worker can be changed to a ready worker through ready worker upscaling, or a ready worker in an active ready state can be created by changing the ready worker state in an inactive ready state.

또한, 액티브 런(Active run) 상태는 워커에서 펑션을 실제로 수행하고 있는 상태를 의미하는 것으로, 액티브 레디 상태의 레디 워커에 대해서 워커 할당의 요청에 의해 액티브 런 상태로 변경될 수 있다. In addition, the active run state refers to a state in which the worker is actually executing a function, and may be changed to the active run state by a request of worker assignment for a ready worker in the active-ready state.

이와 같이 워커 할당 단계의 워커 생성 및 초기화를 나누어 별도의 작업으로 처리함으로써 워커 할당 작업의 응답 시간 지연 오버헤드를 감소시킬 수 있다. 즉, 워커 할당 단계에서 대부분의 시간이 소요되는 워커 생성 과정을 워커 할당 요청 시점이 아닌 사전에 미리 준비함으로써 워커 할당 시간을 현저하게 감소시킬 수 있다. As described above, by dividing worker creation and initialization in the worker allocation phase and processing them as separate tasks, the response time delay overhead of the worker allocation operation can be reduced. That is, the worker allocation time can be significantly reduced by preparing the worker creation process, which takes most of the time in the worker allocation step, in advance rather than at the time of the worker allocation request.

예를 들어, 도 12 내지 도 14를 참조하면, 본 발명의 일실시예에 따른 워커 스케줄링 장치에서 외부 컴포넌트의 RestAPI 요청 처리 및 내부 컴포넌트 요청 처리를 주관하는 워커 제어 모듈(1210)은 워커 할당이 요청(Fa)에 대해 응답 속도를 높이기 위한 워커 사전 할당을 위해 워커 스케일러 모듈(1220)로 워커 스케일링을 요청할 수 있다. 이 때, 워커 스케일러 모듈(1220)은 워커 할당 요청 주기를 기반으로 사전 워커 할당 개수를 예측할 수 있다. 만약, 예측된 사전 워커 할당 개수가 5개인 상태에서, 펑션(Fa)에 할당된 인액티브 레디 상태의 레디 워커(1340)가 3개 존재한다고 가정하면, 도 13 내지 도 14에 도시된 것처럼 템플릿 워커(1310) 2개를 액티브 레디 상태의 레디 워커(1320)로 변경함으로써 사전 워커 할당 개수에 상응하도록 액티브 워커(1330)를 할당할 수 있다. For example, referring to FIGS. 12 to 14 , in the worker scheduling apparatus according to an embodiment of the present invention, the worker control module 1210 that manages the RestAPI request processing of the external component and the internal component request processing requests the worker assignment For (Fa), worker scaling may be requested to the worker scaler module 1220 for worker pre-allocation to increase response speed. In this case, the worker scaler module 1220 may predict the number of worker assignments in advance based on the worker assignment request period. If it is assumed that there are three ready workers 1340 in the inactive-ready state assigned to the function Fa in the state where the predicted number of assigned pre-workers is 5, as shown in FIGS. 13 to 14, template workers By changing the two 1310s to the ready workers 1320 in the active-ready state, the active workers 1330 may be allocated to correspond to the pre-allocated number of workers.

즉, 인액티브 레디 상태의 레디 워커를 액티브 레디 상태의 레디 워커로 변경하는 active transit을 통해 최소의 비용으로 할당 가능 상태의 레디 워커를 먼저 준비할 수 있다. 이 후, active transit을 통해 사전 워커 할당이 충족되지 않는 경우에는 템플릿 워커를 레디 워커로 변경하는 레디 워커 업 스케일링 과정이 수행될 수 있다.That is, through active transit, which changes a ready worker in an inactive-ready state to a ready-walker in an active-ready state, it is possible to prepare a ready-worker in an allocable state first at a minimum cost. After that, if the prior worker assignment is not satisfied through active transit, a ready worker upscaling process of changing a template worker to a ready worker may be performed.

이 때, 사전 워커 할당 개수는 펑션 별 단위 시간 동안에 요구되는 워커의 개수에서 액티브 레디 상태인 레디 워커와 액티브 런 상태인 워커의 개수를 뺀 값에 상응할 수 있다.In this case, the number of pre-allocated workers may correspond to a value obtained by subtracting the number of active-ready ready workers and active-running workers from the number of workers required for a unit time for each function.

예를 들어, 펑션 실행에 필요한 워커를 관리하기 위해 워커 스케일링(worker scaling) 요청이 발생하면 워커의 평균 실행 시간(Tx)과 워커 할당 요청 주기(Tf)를 기반으로 단위 시간 구간(△t) 동안에 요구되는 워커의 개수인, SI(Scaling Index)값을 계산할 수 있다.For example, when a worker scaling request occurs to manage the workers required to execute a function, it is executed during the unit time period (Δt) based on the average execution time of the worker (Tx) and the worker allocation request period (Tf). It is possible to calculate the SI (Scaling Index) value, which is the number of required workers.

이 때, 펑션 별 단위 시간 동안에 요구되는 워커의 개수는 펑션을 실행하는 워커의 평균 실행 시간(Tx)을 펑션 별 워커 할당 요청 주기(Tf)로 나눈 값에 상응할 수 있다. 예를 들어, 평균 실행 시간(Tx)은 워커 종료 시에 Fn executor에 의해 기록된 실행 시간의 평균 값으로 사용될 수 있다. In this case, the number of workers required during the unit time for each function may correspond to a value obtained by dividing the average execution time (Tx) of the workers executing the function by the worker assignment request period (Tf) for each function. For example, the average execution time (Tx) may be used as the average value of the execution times recorded by the Fn executor at worker termination.

이 때, 워커 스케일링이 요구되는 워커의 개수(Incremental Count, IC)는 현재 대기 중인 레디 워커와 현재 펑션을 실행 중인 워커를 제외하고 추가로 요구되는 사전 워커 할당 개수를 의미할 수 있다. 따라서, IC는, [수학식 1]과 같이, SI 값에서 현재 액티브 레디 상태인 레디 워커의 개수와 현재 액티브 런 상태인 워커의 개수를 뺀 값에 상응할 수 있다.In this case, the number of workers for which worker scaling is required (Incremental Count, IC) may mean the number of pre-allocated workers additionally required except for the currently waiting ready worker and the worker currently executing the function. Accordingly, the IC may correspond to a value obtained by subtracting the number of workers currently in an active-ready state and the number of workers in an active-run state from the SI value, as shown in Equation (1).

[수학식 1][Equation 1]

ICt = (Txt-1 / Tft) - (Nrw + Naw)IC t = (Tx t-1 / Tf t) - (N rw + N aw )

이 때, 수학식의 (Txt-1 / Tft)는 단위 시간 구간(△t) 동안에 요구되는 워커의 개수인 SIt를 의미할 수 있고, Nrw와 Naw는 각각 현재 액티브 레디 상태인 레디 워커의 개수와 현재 액티브 런 상태인 워커의 개수를 의미할 수 있다.At this time, (Tx t-1 / Tf t) of the equation may mean SI t , which is the number of workers required during the unit time period (Δt), and N rw and N aw are each of the current active-ready state. It may mean the number of ready workers and the number of workers currently in an active run state.

또한, 프로세서(2010)는 액티브 워커 사용 비율(active worker usage ratio)이 기설정된 액티브 상위 기준 값을 초과하는 경우, 템플릿 워커를 레디 워커로 변경하는 레디 워커 업 스케일링(ready worker up scaling)을 수행할 수 있다. In addition, when the active worker usage ratio exceeds a preset active upper reference value, the processor 2010 performs ready worker up-scaling to change the template worker to the ready worker. can

또한, 프로세서(2010)는 액티브 워커 사용 비율이 기설정된 액티브 하위 기준 값 이하일 경우, 액티브 레디 상태의 레디 워커를 인액티브 레디 상태로 변경시킬 수 있다.Also, when the active worker usage ratio is less than or equal to a preset active low reference value, the processor 2010 may change the ready worker in the active-ready state to the in-active-ready state.

이 때, 액티브 워커 사용 비율(active worker usage ratio)은 액티브 레디 상태의 레디 워커와 액티브 워커를 합한 워커들 중 액티브 워커의 비율에 상응할 수 있다. 즉, 현재 자원이 할당된 액티브 상태의 전체 워커들(active ready + active run) 중 실제로 펑션을 수행하고 있는 액티브 런(active run) 상태의 워커의 비율 값을 의미할 수 있다. At this time, the active worker usage ratio (active worker usage ratio) may correspond to the ratio of active workers among workers in the active-ready state and active workers combined. That is, it may mean a ratio value of workers in an active run state that are actually performing a function among all workers in an active state to which resources are currently allocated (active ready + active run).

예를 들어, 도 11을 참조하면, 기설정된 액티브 상위 기준 값(1110)에 상응하는 액티브 런 상태의 워커 비율 값이 80%에 상응하고, 기설정된 액티브 하위 기준 값(1120)에 상응하는 액티브 런 상태의 워커 비율 값이 20%라고 가정할 수 있다. For example, referring to FIG. 11 , the worker ratio value of the active run state corresponding to the preset active upper reference value 1110 corresponds to 80%, and the active run corresponding to the preset active lower reference value 1120 . We can assume that the state's worker percentage value is 20%.

이 때, 측정된 액티브 워커 사용 비율이 기설정된 액티브 상위 기준 값(1110)을 초과하면, 레디 워커 업 스케일링을 수행할 수 있다. 즉, 액티브 워커 사용 비율이 80%를 초과하는 경우에는 대부분의 워커가 펑션 실행에 할당되어 있으므로, 추가적인 워커의 준비가 필요한 상태로 판단하고 레디 워커 업 스케일링을 수행할 수 있다. In this case, when the measured active worker usage ratio exceeds a preset active upper reference value 1110, ready-walker up-scaling may be performed. That is, when the active worker usage ratio exceeds 80%, most workers are allocated to function execution, so it is determined that additional worker preparation is necessary and ready worker upscaling can be performed.

또한, 측정된 액티브 워커 사용 비율이 기설정된 액티브 하위 기준 값(1120) 이하이면, Inactive transit을 수행할 수 있다. 이 때, Inactive transit은 액티브 레디 상태의 레디 워커에 할당된 자원을 해제함으로써 레디 워커의 상태를 인액티브 레디 상태로 변경시키는 과정에 해당할 수 있다. In addition, when the measured active worker usage ratio is less than or equal to the preset active lower reference value 1120, an inactive transit may be performed. In this case, the inactive transit may correspond to a process of changing the state of the ready worker to the inactive-ready state by releasing the resources allocated to the ready-worker in the active-ready state.

또한, 프로세서(2010)는 워커 다운 스케일링을 기반으로 기설정된 유휴 시간 동안 사용되지 않는 레디 워커를 템플릿 워커로 초기화할 수 있다.Also, the processor 2010 may initialize a ready worker not used for a preset idle time as a template worker based on the worker downscaling.

예를 들어, 기설정된 유휴 시간을 IdleTime이라고 가정하면, 펑션에 할당된 인액티브 상태의 레디 워커들 중 IdleTime동안 펑션 수행에 사용되지 않은 워커에 대해 레디 워커 다운 스케일링을 수행하여 템플릿 워커로 변경할 수 있다. For example, assuming that the preset idle time is IdleTime, among the ready workers in the inactive state assigned to the function, the ready worker downscaling is performed on the worker that is not used to perform the function during IdleTime, and it can be changed to a template worker. .

또한, 프로세서(2010)는 인액티브 워커 비율(inactive worker ratio)이 기설정된 인액티브 상위 기준 값을 초과하는 경우, 인액티브 레디 상태의 레디 워커를 템플릿 워커로 변경하는 레디 워커 다운 스케일링(ready worker down scaling)을 수행할 수 있다. In addition, the processor 2010, when the inactive worker ratio (inactive worker ratio) exceeds a preset inactive upper reference value, ready worker down scaling (ready worker down) to change the inactive-ready ready worker to the template worker scaling) can be performed.

이 때, 인액티브 워커 비율(inactive worker ratio)은 펑션에 할당된 레디 워커 중 펑션 수행 후 자원 할당이 해제된 인액티브 레디 상태의 레디 워커의 비율 값을 의미한다. 예를 들어, 기설정된 인액티브 상위 기준 값이 80%라고 가정한다면, 인액티브 워커 비율이 80%를 초과하는 경우, 할당된 워커에서 펑션 수행이 적어지는 단계인 것으로 판단하고 사용되지 않는 레디 워커를 템플릿 워커로 변환하는 레디 워커 다운 스케일링을 수행할 수 있다. At this time, the inactive worker ratio (inactive worker ratio) means the ratio value of the ready workers in the inactive-ready state in which the resource allocation is released after performing the function among the ready workers allocated to the function. For example, if it is assumed that the preset inactive upper reference value is 80%, if the inactive worker ratio exceeds 80%, it is determined that the assigned worker is in a stage in which function execution is reduced, and unused ready workers are selected. Ready worker downscaling to convert to template worker can be done.

메모리(2020)는 펑션 수행을 위한 워커를 관리하는 워커 풀(WORKER POOL)을 저장한다.The memory 2020 stores a worker pool that manages a worker for performing a function.

또한, 메모리(2020)는 상술한 바와 같이 본 발명의 실시예에 따른 워커 스케줄링을 위한 기능을 지원할 수 있다. 이 때, 메모리(2020)는 별도의 대용량 스토리지로 동작할 수 있고, 동작 수행을 위한 제어 기능을 포함할 수도 있다.In addition, the memory 2020 may support a function for scheduling a worker according to an embodiment of the present invention as described above. In this case, the memory 2020 may operate as a separate mass storage and may include a control function for performing an operation.

한편, 워커 스케줄링 장치는 메모리가 탑재되어 그 장치 내에서 정보를 저장할 수 있다. 일 구현예의 경우, 메모리는 컴퓨터로 판독 가능한 매체이다. 일 구현 예에서, 메모리는 휘발성 메모리 유닛일 수 있으며, 다른 구현예의 경우, 메모리는 비휘발성 메모리 유닛일 수도 있다. 일 구현예의 경우, 저장장치는 컴퓨터로 판독 가능한 매체이다. 다양한 서로 다른 구현 예에서, 저장장치는 예컨대 하드디스크 장치, 광학디스크 장치, 혹은 어떤 다른 대용량 저장장치를 포함할 수도 있다.On the other hand, the worker scheduling device may be equipped with a memory to store information in the device. For one implementation, the memory is a computer-readable medium. In one implementation, the memory may be a volatile memory unit, and in another implementation, the memory may be a non-volatile memory unit. In one embodiment, the storage device is a computer-readable medium. In various different implementations, the storage device may include, for example, a hard disk device, an optical disk device, or some other mass storage device.

이와 같은 워커 스케줄링 장치를 통해 펑션 서비스를 수행하는 컨테이너 기반의 워커를 빠르게 할당하고, 응답 비용을 최소화할 수 있다. Through such a worker scheduling device, it is possible to quickly allocate a container-based worker that performs a function service and minimize the response cost.

또한, 펑션 서비스 요청 부하 변동에 능동적으로 대응하고, 빠른 응답 시간이 요구되는 단기 펑션 서비스의 할당 지연 시간을 최소화할 수 있으며, 펑션 실행과 관련된 워커의 실행 준비 부하를 사전에 적절히 분산함으로써 FaaS 플랫폼이 실시간 처리 환경에 보다 적합하도록 할 수 있다. In addition, it is possible to actively respond to function service request load fluctuations, to minimize the allocation delay time for short-term function services that require a fast response time, and to properly distribute the execution load of workers related to function execution in advance so that the FaaS platform It can be made more suitable for a real-time processing environment.

도 21은 본 발명에 따른 마이크로 펑션 서비스 플랫폼과 워커 스케줄러 내부 컴포넌트의 일 예를 상세하게 나타낸 블록도이다.21 is a detailed block diagram illustrating an example of a micro-function service platform and worker scheduler internal components according to the present invention.

도 21을 참조하면, 본 발명에 따른 워커 스케줄러(2140)는 컴퓨팅 노드 또는 계산 노드(2151~2153)에 구비된 노드 에이전트(Node agent) 컴포넌트에 의해 등록된 자원을 노드 에이전트 컴포넌트의 도움없이 자체적으로 관리함으로써 펑션 실행에 필요한 워커를 할당할 수 있다. Referring to FIG. 21 , the worker scheduler 2140 according to the present invention transfers the resources registered by the node agent component provided in the computing node or the computing nodes 2151 to 2153 by itself without the help of the node agent component. By managing it, you can allocate workers required to execute the function.

이 때, 워커 스케줄러(2140)는 외부 컴포넌트의 RestAPI 요청 처리 및 내부 컴포넌트 요청 처리를 주관하는 워커 제어 모듈(Worker controller)을 메인으로 동작할 수 있다.In this case, the worker scheduler 2140 may mainly operate a worker controller that manages the RestAPI request processing of the external component and the internal component request processing.

또한, 워커 스케줄러(2140)는 실행 초기에 노드 에이전트 컴포넌트를 기반으로 펑션 수행을 위해 사용되는 자원을 자원 할당 모듈(Resource allocator)에 등록할 수 있고, 워커 할당 전에 자원을 자체적으로 차감하거나, 워커 해제 후에 다시 증감시킬 수 있다. In addition, the worker scheduler 2140 may register the resource used for performing the function based on the node agent component at the initial stage of execution in the resource allocator, and deduct the resource by itself before allocating the worker, or release the worker It can be increased or decreased again later.

또한, 워커 스케줄러(2140)는 API gateway(2110)의 워커 할당 요청에 대한 응답 속도를 높이기 위해 사전에 워커를 할당해서 관리할 수 있다. In addition, the worker scheduler 2140 may allocate and manage workers in advance in order to increase the response speed to the worker assignment request of the API gateway 2110 .

예를 들어, 워커 스케줄러(2140)는 워커의 기동 부하를 감소시키기 위해 워커 스케일러 모듈(Worker scaler)을 통해 요구된 수 이상의 워커를 선 할당할 수 있는데, 이를 위해 워커 풀 매니저 모듈(Worker pool manager)이 노트 에이전트 컴포넌트로 미리 정의된 복수 개의 워커들의 기동과 종료를 요구할 수 있다. For example, the worker scheduler 2140 may pre-allocate more than a required number of workers through a worker scaler module in order to reduce the starting load of the workers. For this, a worker pool manager module This note agent component can request startup and shutdown of a plurality of predefined workers.

이와 같이 사전에 할당된 워커들은 워커 풀 매니저 모듈에 의해 각 인스턴스 타입 별로 별도의 리스트로 되어 관리될 수 있다. In this way, the pre-allocated workers can be managed as a separate list for each instance type by the worker pool manager module.

이 때, 워커 스케일러 모듈은 워커 풀 매니저 모듈에 의해 관리되는 워커들을 펑션 요청 부하에 따라 자동적으로 확장하거나 축소하는 역할을 수행할 수 있다. 이 때, 워커 스케일러 모듈은 펑션 수행 요청 부하에 반응하여 워커 풀 매니저 모듈이 관리하는 워커의 상태와 개수를 동적으로 조정하는 워커 스케일링(worker scaling)을 수행할 수 있다. In this case, the worker scaler module may play a role of automatically expanding or reducing the workers managed by the worker pool manager module according to the function request load. At this time, the worker scaler module can perform worker scaling that dynamically adjusts the state and number of workers managed by the worker pool manager module in response to the load requesting the function execution.

이 때, 워커 스케일러 모듈에 의해 수행되는 워커의 사전 할당은 2단계로 이루어질 수 있다. 먼저, 1단계 사전 할당은 워커 실행을 위한 공통 기본 이미지와 기본 자원 용량으로 구성된 템플릿 워커(Template worker)를 생성하는 과정으로, 워커 스케일러 모듈에서 템플릿 워커 스케일링(Template worker scaling)에 의해 처리될 수 있다. 이 후, 2단계 사전 할당은 1단계에서 생성된 템플릿 워커를 실제로 펑션을 수행하기 위한 레디 워커(Ready worker)로 변경하는 과정으로, 워커 스케일러 모듈에서 레디 워커 업 스케일링(Ready worker up scaling)에 의해 처리될 수 있다. In this case, pre-allocation of workers performed by the worker scaler module may be performed in two steps. First, step 1 pre-allocation is the process of creating a template worker composed of a common base image and base resource capacity for worker execution, which can be handled by template worker scaling in the worker scaler module. . After that, step 2 pre-allocation is a process of changing the template worker created in step 1 to a ready worker to actually perform a function. can be processed.

또한, 워커 스케줄러(2140)에서는 상기와 같은 동작을 제어하기 위해 WS metadata라는 DB 테이블을 통해 운영 정보를 관리할 수도 있다. In addition, the worker scheduler 2140 may manage operation information through a DB table called WS metadata to control the above operation.

이상에서와 같이 본 발명에 따른 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법 및 이를 위한 장치는 상기한 바와 같이 설명된 실시예들의 구성과 방법이 한정되게 적용될 수 있는 것이 아니라, 상기 실시예들은 다양한 변형이 이루어질 수 있도록 각 실시예들의 전부 또는 일부가 선택적으로 조합되어 구성될 수도 있다.As described above, the configuration and method of the embodiments described above may not be limitedly applicable to the method and apparatus for scheduling a worker in the cloud computing system according to the present invention, but various modifications may be made to the embodiments. All or part of each embodiment may be selectively combined and configured.

310: 클라이언트 320: 서버리스 컴퓨팅 플랫폼
330: 레파지토리 340, 2151~2153: 계산 노드
341, 342: 워커 510, 1310: 템플릿 워커
520: 레디 워커 530, 1330: 액티브 워커
710: 템플릿 워커 리스트 720: 인액티브 레디 리스트
730: 액티브 레디 리스트 1110: 기설정된 액티브 상위 기준 값
1120: 기설정된 액티브 하위 기준 값
1210: 워커 제어 모듈 1220: 워커 스케일러 모듈
1320: 액티브 레디 상태의 레디 워커
1330: 인액티브 레디 상태의 레디 워커
2010: 프로세서 2020: 메모리
2110: API GATEWAY 2120: Fn NAMAGER
2130: Fn EXECUTOR 2140: 워커 스케줄러
310: client 320: serverless computing platform
330: repository 340, 2151-2153: compute node
341, 342: workers 510, 1310: template workers
520: ready walker 530, 1330: active worker
710: template worker list 720: inactive ready list
730: active ready list 1110: preset active upper reference value
1120: preset active lower reference value
1210: walker control module 1220: walker scaler module
1320: ready-walker in active-ready state
1330: Ready walker in inactive ready state
2010: Processor 2020: Memory
2110: API GATEWAY 2120: Fn NAMAGER
2130: Fn EXECUTOR 2140: worker scheduler

Claims (20)

펑션(FUNCTION) 수행을 위한 워커(WORKER) 할당 요청이 발생하기 이전에, 워커 실행 준비 부하를 분산 처리하기 위해 템플릿 워커(TEMPLATE WORKER)를 사전 생성(PRE-CREATION)하는 부하 분산 1단계;
펑션 별 워커 할당 요청 주기의 변화를 고려하여 사전 워커 할당 개수를 예측하는 단계; 및
상기 템플릿 워커를 상기 사전 워커 할당 개수에 상응하는만큼 워커 업 스케일링(WORKER UP SCALING)하여 레디 워커(READY WORKER)를 사전 할당(PRE-ALLOCATION)하는 부하 분산 2단계
를 포함하고,
상기 워커 실행 준비 부하는 상기 부하 분산 1단계와 상기 부하 분산 2단계를 통해 분산되는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
Load balancing step 1 of pre-creating (PRE-CREATION) a template worker (TEMPLATE WORKER) in order to distribute the load ready for worker execution before a worker assignment request for performing a function (FUNCTION) occurs;
estimating the number of worker assignments in advance in consideration of a change in worker assignment request period for each function; and
Load balancing step 2 of pre-allocating ready workers (READY WORKER) by up-scaling the template workers by the number of workers allocated in advance (WORKER UP SCALING)
including,
The worker scheduling method of the cloud computing system, characterized in that the worker execution preparation load is distributed through the first load balancing step and the second load balancing step.
청구항 1에 있어서,
상기 펑션 수행을 위한 워커 할당 요청이 발생한 경우에 상기 레디 워커를 액티브 워커(ACTIVE WORKER)로 할당하고, 펑션 서비스 요청 부하를 고려하여 할당이 해제된 레디 워커의 상태를 변경하는 단계를 더 포함하는 것을 특징으로 하는 클라우드 컴퓨터 시스템의 워커 스케줄링 방법.
The method according to claim 1,
When a worker assignment request for performing the function occurs, allocating the ready worker as an active worker, and changing the status of the de-allocated ready worker in consideration of the function service request load A method for scheduling workers in a cloud computer system, characterized in that it is
청구항 1에 있어서,
상기 사전 할당된 레디 워커 중 기설정된 유휴 기간 동안 사용되지 않는 레디워커를 워커 다운 스케일링(WORKER DOWN SCALING)하여 상기 템플릿 워커로 초기화하는 단계를 더 포함하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
The method according to claim 1,
Worker scheduling method of the cloud computing system, characterized in that it further comprises the step of initializing the template worker by scaling down a worker that is not used for a preset idle period among the pre-allocated ready workers.
청구항 1에 있어서,
상기 템플릿 워커는 모든 펑션에서 공통으로 사용할 수 있도록 기본 이미지와 자원 용량에 상응하게 구성된 임시 워커에 상응하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
The method according to claim 1,
The template worker is a worker scheduling method of a cloud computing system, characterized in that it corresponds to a temporary worker configured to correspond to a basic image and resource capacity so that all functions can use it in common.
청구항 2에 있어서,
상기 레디 워커는 펑션 수행을 위한 자원 정보의 설정 및 자원 할당이 완료된 펑션 실행 준비 상태의 워커에 상응하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
3. The method according to claim 2,
The ready worker is a worker scheduling method of a cloud computing system, characterized in that it corresponds to a worker in a function execution preparation state in which the resource information setting and resource allocation for performing the function have been completed.
청구항 5에 있어서,
상기 레디 워커의 상태는
자원 할당 및 펑션 파일의 로딩이 완료된 액티브 레디(ACTIVE READY) 상태 및 자원이 할당되지 않았지만 펑션 파일의 로딩이 완료된 인액티브 레디(INACTIVE READY) 상태 중 어느 하나에 해당하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
6. The method of claim 5,
The status of the ready worker is
A cloud computing system, characterized in that it corresponds to any one of an active-ready state in which the resource allocation and loading of the function file are completed, and an inactive-ready state in which the resource is not allocated but the loading of the function file is completed How to schedule workers.
청구항 6에 있어서,
액티브 워커 사용 비율(ACTIVE WORKER USAGE RATIO)이 기설정된 액티브 상위 기준 값을 초과하는 경우, 상기 템플릿 워커를 상기 레디 워커로 변경하는 레디 워커 업 스케일링(READY WORKER UP SCALING)을 수행하는 단계; 및
상기 액티브 워커 사용 비율이 기설정된 액티브 하위 기준 값 미만일 경우, 상기 액티브 레디 상태의 레디 워커를 상기 인액티브 레디 상태로 변경시키는 단계를 더 포함하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
7. The method of claim 6,
When the active worker usage ratio (ACTIVE WORKER USAGE RATIO) exceeds a preset active upper reference value, performing a ready worker up-scaling (READY WORKER UP SCALING) to change the template worker to the ready worker; and
When the active worker usage ratio is less than a preset active lower reference value, the worker scheduling method of the cloud computing system, characterized in that it further comprises the step of changing the active-ready ready worker to the inactive-ready state.
청구항 7에 있어서,
상기 액티브 워커 사용 비율은
상기 액티브 레디 상태의 레디 워커와 상기 액티브 워커를 합한 워커들 중 상기 액티브 워커의 비율에 상응하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
8. The method of claim 7,
The active worker usage ratio is
A worker scheduling method of a cloud computing system, characterized in that it corresponds to a ratio of the active worker among workers in the active worker in the active-ready state and the active worker.
청구항 6에 있어서,
인액티브 워커 비율(INACTIVE WORKER RATIO)이 기설정된 인액티브 상위 기준값을 초과하는 경우, 상기 인액티브 레디 상태의 레디 워커를 상기 템플릿 워커로 변경하는 레디 워커 다운 스케일링(READY WORKER DOWN SCALING)을 수행하는 단계를 더 포함하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
7. The method of claim 6,
When the inactive worker ratio (INACTIVE WORKER RATIO) exceeds a preset inactive upper reference value, performing a ready-walker down-scaling (READY WORKER DOWN SCALING) to change the inactive-ready ready worker to the template worker Worker scheduling method of the cloud computing system, characterized in that it further comprises.
청구항 1에 있어서,
상기 템플릿 워커의 개수가 최대 생성 가능 워커 수 대비 기설정된 허용 한계 이하일 경우, 백그라운드에서 템플릿 워커 업 스케일링(TEMPLATE WORKER UP SCALING)을 수행하여 상기 템플릿 워커를 추가 생성하는 단계를 더 포함하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
The method according to claim 1,
When the number of template workers is less than a preset allowable limit compared to the maximum number of workers that can be created, performing TEMPLATE WORKER UP SCALING in the background to further create the template workers A method of scheduling workers in a cloud computing system.
청구항 6에 있어서,
상기 펑션 별 워커 할당 요청 주기는 펑션 별 단위 시간 동안에 할당 요구되는 워커의 개수를 기반으로 산출되고,
상기 사전 워커 할당 개수는 상기 펑션 별 단위 시간 동안에 요구되는 워커의 개수에서 상기 액티브 레디 상태인 레디 워커와 상기 액티브 워커의 개수를 뺀 값에 상응하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
7. The method of claim 6,
The worker assignment request period for each function is calculated based on the number of workers required to be assigned during a unit time for each function,
The number of pre-allocated workers corresponds to a value obtained by subtracting the number of ready workers and the active workers in the active-ready state from the number of workers required for a unit time for each function.
청구항 11에 있어서,
상기 펑션 별 단위 시간 동안에 요구되는 워커의 개수는
펑션을 실행하는 워커의 평균 실행 시간을 상기 펑션 별 워커 할당 요청 주기로 나눈 값에 상응하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 방법.
12. The method of claim 11,
The number of workers required during the unit time for each function is
A worker scheduling method for a cloud computing system, characterized in that it corresponds to a value obtained by dividing an average execution time of a worker executing a function by a worker assignment request period for each function.
펑션(FUNCTION) 수행을 위한 워커(WORKER) 할당 요청이 발생하기 이전에, 워커 실행 준비 부하를 분산 처리하기 위해 템플릿 워커(TEMPLATE WORKER)를 사전 생성(PRE-CREATION)하고, 펑션 별 워커 할당 요청 주기의 변화를 고려하여 사전 워커 할당 개수를 예측하고, 상기 템플릿 워커를 상기 사전 워커 할당 개수에 상응하는만큼 워커 업 스케일링(WORKER UP SCALING)하여 레디 워커(READY WORKER)를 사전 할당(PRE-ALLOCATION)하는 프로세서; 및
펑션 수행을 위한 워커를 관리하는 워커 풀(WORKER POOL)을 저장하는 메모리
를 포함하고,
상기 워커 실행 준비 부하는 상기 템플릿 워커를 사전 생성하는 과정과 상기 레디 워커를 사전 할당하는 과정을 통해 분산되는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치.
Before a worker assignment request to perform a function occurs, a TEMPLATE WORKER is pre-created (PRE-CREATION) to distribute the worker execution preparation load, and the worker assignment request cycle for each function Predicting the number of pre-worker assignments in consideration of the change in , and pre-allocating the ready workers (READY WORKER) by up-scaling the template workers by the number of worker assignments corresponding to the pre-worker assignments (PRE-ALLOCATION) processor; and
Memory to store the worker pool that manages workers for function execution
including,
Worker scheduling apparatus of a cloud computing system, characterized in that the worker execution preparation load is distributed through a process of pre-creating the template worker and a process of pre-allocating the ready worker.
청구항 13에 있어서,
상기 프로세서는
상기 펑션 수행을 위한 워커 할당 요청이 발생한 경우에 상기 레디 워커를 액티브 워커(ACTIVE WORKER)로 할당하고, 펑션 서비스 요청 부하를 고려하여 할당이 해제된 레디 워커의 상태를 변경하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치.
14. The method of claim 13,
the processor
Cloud computing, characterized in that when a worker assignment request for performing the function occurs, the ready worker is assigned as an active worker, and the status of the de-allocated ready worker is changed in consideration of the function service request load The system's worker scheduling device.
청구항 13에 있어서,
상기 프로세서는
상기 사전 할당된 레디 워커 중 기설정된 유휴 기간 동안 사용되지 않는 레디워커를 워커 다운 스케일링(WORKER DOWN SCALING)하여 상기 템플릿 워커로 초기화하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치.
14. The method of claim 13,
the processor
Worker scheduling apparatus of a cloud computing system, characterized in that the pre-allocated ready-workers not used for a preset idle period are initialized as the template workers by down-scaling the workers (WORKER DOWN SCALING).
청구항 14에 있어서,
상기 템플릿 워커는 모든 펑션에서 공통으로 사용할 수 있도록 기본 이미지와 자원 용량에 상응하게 구성된 임시 워커에 상응하고, 상기 레디 워커는 펑션 수행을 위한 자원 정보의 설정 및 자원 할당이 완료된 펑션 실행 준비 상태의 워커에 상응하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치.
15. The method of claim 14,
The template worker corresponds to a temporary worker configured to correspond to a basic image and resource capacity so that all functions can use it in common, and the ready worker is a worker in a function execution preparation state where resource information setting and resource allocation for function execution are completed. Worker scheduling device of the cloud computing system, characterized in that corresponding to.
청구항 16에 있어서,
상기 레디 워커의 상태는
자원 할당 및 펑션 파일의 로딩이 완료된 액티브 레디(ACTIVE READY) 상태 및 자원이 할당되지 않았지만 펑션 파일의 로딩이 완료된 인액티브 레디(INACTIVE READY) 상태 중 어느 하나에 해당하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치.
17. The method of claim 16,
The status of the ready worker is
A cloud computing system, characterized in that it corresponds to any one of an active-ready state in which the resource allocation and loading of the function file are completed, and an inactive-ready state in which the resource is not allocated but the loading of the function file is completed Worker Scheduling Device.
청구항 17에 있어서,
상기 프로세서는
액티브 워커 사용 비율(ACTIVE WORKER USAGE RATIO)이 기설정된 액티브 상위 기준 값을 초과하는 경우, 상기 템플릿 워커를 상기 레디 워커로 변경하는 레디 워커 업 스케일링(READY WORKER UP SCALING)을 수행하고, 상기 액티브 워커 사용 비율이 기설정된 액티브 하위 기준 값 미만일 경우, 상기 액티브 레디 상태의 레디 워커를 상기 인액티브 레디 상태로 변경시키는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치.
18. The method of claim 17,
the processor
When the active worker usage ratio (ACTIVE WORKER USAGE RATIO) exceeds a preset active upper reference value, a ready worker up-scaling (READY WORKER UP SCALING) of changing the template worker to the ready worker is performed, and the active worker is used When the ratio is less than a preset active lower reference value, the worker scheduling device of the cloud computing system, characterized in that the change of the active-ready ready worker to the inactive-ready state.
청구항 18에 있어서,
상기 액티브 워커 사용 비율은
상기 액티브 레디 상태의 레디 워커와 상기 액티브 워커를 합한 워커들 중 상기 액티브 워커의 비율에 상응하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치.
19. The method of claim 18,
The active worker usage ratio is
The worker scheduling apparatus of a cloud computing system, characterized in that it corresponds to a ratio of the active workers among workers in the active worker in the active-ready state and the active workers.
청구항 17에 있어서,
상기 프로세서는
인액티브 워커 비율(INACTIVE WORKER RATIO)이 기설정된 인액티브 상위 기준값을 초과하는 경우, 상기 인액티브 레디 상태의 레디 워커를 상기 템플릿 워커로 변경하는 레디 워커 다운 스케일링(READY WORKER DOWN SCALING)을 수행하는 것을 특징으로 하는 클라우드 컴퓨팅 시스템의 워커 스케줄링 장치.
18. The method of claim 17,
the processor
When the inactive worker ratio (INACTIVE WORKER RATIO) exceeds a preset inactive upper reference value, performing the ready-walker down-scaling (READY WORKER DOWN SCALING) to change the inactive-ready ready-worker to the template worker A worker scheduling device in a cloud computing system, characterized in that it.
KR1020190110622A 2018-12-05 2019-09-06 Method for scheduling worker in cloud computing system and apparatus using the same KR102448789B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/583,504 US11175960B2 (en) 2018-12-05 2019-09-26 Worker-scheduling method in cloud-computing system and apparatus for the same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20180155383 2018-12-05
KR1020180155383 2018-12-05

Publications (2)

Publication Number Publication Date
KR20200068562A KR20200068562A (en) 2020-06-15
KR102448789B1 true KR102448789B1 (en) 2022-09-30

Family

ID=71081815

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190110622A KR102448789B1 (en) 2018-12-05 2019-09-06 Method for scheduling worker in cloud computing system and apparatus using the same

Country Status (1)

Country Link
KR (1) KR102448789B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113485833B (en) * 2021-07-09 2024-02-06 支付宝(杭州)信息技术有限公司 Resource prediction method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101013073B1 (en) 2007-12-17 2011-02-14 한국전자통신연구원 Apparatus for Task Distribution and Parallel Processing System and Method there of
US20170373940A1 (en) 2016-06-23 2017-12-28 Sap Se Container-based multi-tenant computing infrastructure
JP2018026050A (en) * 2016-08-12 2018-02-15 富士通株式会社 Parallel processing device, job management program and jog management method
US20180109501A1 (en) * 2016-10-17 2018-04-19 Microsoft Technology Licensing, Llc Migration containers
US10055262B1 (en) 2015-12-11 2018-08-21 Amazon Technologies, Inc. Distributed load balancing with imperfect workload information

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160136489A (en) 2015-05-19 2016-11-30 (주)나누미넷 Method for Resource Management base of Virtualization for cloud service
KR102145795B1 (en) * 2016-09-07 2020-08-19 한국전자통신연구원 Method and apparatus for analyzing and processing data stream in environment where worker nodes are distributed, and method and apparatus for managing task

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101013073B1 (en) 2007-12-17 2011-02-14 한국전자통신연구원 Apparatus for Task Distribution and Parallel Processing System and Method there of
US10055262B1 (en) 2015-12-11 2018-08-21 Amazon Technologies, Inc. Distributed load balancing with imperfect workload information
US20170373940A1 (en) 2016-06-23 2017-12-28 Sap Se Container-based multi-tenant computing infrastructure
JP2018026050A (en) * 2016-08-12 2018-02-15 富士通株式会社 Parallel processing device, job management program and jog management method
US20180109501A1 (en) * 2016-10-17 2018-04-19 Microsoft Technology Licensing, Llc Migration containers

Also Published As

Publication number Publication date
KR20200068562A (en) 2020-06-15

Similar Documents

Publication Publication Date Title
US11175960B2 (en) Worker-scheduling method in cloud-computing system and apparatus for the same
US10241674B2 (en) Workload aware NUMA scheduling
RU2571366C2 (en) Virtual non-uniform memory access architecture for virtual machines
US9929931B2 (en) Efficient provisioning and deployment of virtual machines
Li et al. Feedback dynamic algorithms for preemptable job scheduling in cloud systems
EP2485146A1 (en) System and method for providing hardware virtualization in a virtual machine environment
JP2005534116A (en) A method for dynamically allocating and managing resources in a multi-consumer computer system.
US9875139B2 (en) Graphics processing unit controller, host system, and methods
US11403150B1 (en) Replenishment-aware resource usage management
Pasdar et al. Hybrid scheduling for scientific workflows on hybrid clouds
US11726816B2 (en) Scheduling workloads on a common set of resources by multiple schedulers operating independently
KR102448789B1 (en) Method for scheduling worker in cloud computing system and apparatus using the same
US20210191751A1 (en) Method and device for allocating resource in virtualized environment
JP5867238B2 (en) Auto scaling method, auto scaling program and computer node
CN114546587A (en) Capacity expansion and reduction method of online image recognition service and related device
Wu et al. ABP scheduler: Speeding up service spread in docker swarm
US20150212859A1 (en) Graphics processing unit controller, host system, and methods
US10956228B2 (en) Task management using a virtual node
CN116157778A (en) System and method for hybrid centralized and distributed scheduling on shared physical hosts
Gadhavi et al. Efficient resource provisioning through workload prediction in the cloud system
Kim et al. Design of the cost effective execution worker scheduling algorithm for faas platform using two-step allocation and dynamic scaling
US11868805B2 (en) Scheduling workloads on partitioned resources of a host system in a container-orchestration system
KR102231357B1 (en) Single virtualization system for HPC cloud service and server software defined server scheduling method
US11263130B2 (en) Data processing for allocating memory to application containers
CN112583653A (en) Pressure testing method and device and computer storage medium

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant