TW201931144A - Serverless system and execution method thereof - Google Patents

Serverless system and execution method thereof Download PDF

Info

Publication number
TW201931144A
TW201931144A TW106146251A TW106146251A TW201931144A TW 201931144 A TW201931144 A TW 201931144A TW 106146251 A TW106146251 A TW 106146251A TW 106146251 A TW106146251 A TW 106146251A TW 201931144 A TW201931144 A TW 201931144A
Authority
TW
Taiwan
Prior art keywords
function
container
microservice
module
management module
Prior art date
Application number
TW106146251A
Other languages
Chinese (zh)
Other versions
TWI646435B (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 TW106146251A priority Critical patent/TWI646435B/en
Application granted granted Critical
Publication of TWI646435B publication Critical patent/TWI646435B/en
Publication of TW201931144A publication Critical patent/TW201931144A/en

Links

Abstract

Serverless system and execution method thereof, which comprising: a setting module is used to set the upper and lower thresholds; a function statistics module is used to receive information on the execution of the function, and statistics on the number of executions of the function; a microservice management module is providing microservices equipped with this function; a container management module is providing the container equipped with this function; and a function execution selection module is used to compare the execution times of the function and the upper and lower thresholds and select the microservice management module or the container management module to execute the function according to the comparing results.

Description

無伺服器之系統及其執行方法 Serverless system and execution method thereof

本發明係有關一種無伺服器技術,尤指一種可加速執行效率之無伺服器之系統及其執行方法。 The present invention relates to a serverless technology, and more particularly to a serverless system that can accelerate execution efficiency and a method of executing the same.

無伺服器(Serverless)是一種雲端伺服器,使用者不須架設實體伺服器,使用者只需提供適當的代碼,其餘皆由雲端伺服器自動管理。 Serverless is a kind of cloud server. Users don't need to set up a physical server. Users only need to provide appropriate code, and the rest are automatically managed by the cloud server.

無伺服器系統並提供程式語言介面讓使用者開發功能,再透過無伺服器系統來執行功能。過去無伺服器系統在執行功能時,是採用即時生成容器(Container)並且載入功能後,才可執行功能,且在執行功能後將搭載功能的容器移除,然而此種作法會有效能低落的問題。 There is no server system and a programming language interface allows the user to develop functions and then perform functions through a serverless system. In the past, when there was no server system to execute the function, the function was generated after the container was built and loaded, and the container with the function was removed after the function was executed. However, this method would have low performance. The problem.

因此,如何有效的提高無伺服器效能,即為本發明所要解決之技術問題。 Therefore, how to effectively improve the serverless performance is the technical problem to be solved by the present invention.

為克服習知技術之缺失,本發明係提供一種無伺服器之系統,係包括:設定模組,係用以設定上限門檻值及下限門檻值;功能統計模組,係用以接收功能之執行的訊息, 以及統計該功能的執行次數;微服務管理模組,係提供搭載該功能的微服務(Microservices)的生成常駐、移除、查詢及執行該微服務中的功能;容器管理模組,係提供搭載該功能的容器的生成、移除及執行該容器中的功能,其中,該容器執行完該功能後即會予以移除;以及功能執行選擇模組,係連接該設定模組、該功能統計模組、該微服務管理模組以及該容器管理模組,且該功能執行選擇模組用以比較該功能的執行次數與該上限門檻值及該下限門檻值並查詢該微服務,以依據該比較的結果及查詢該微服務的結果,令該微服務管理模組或該容器管理模組執行該功能。 To overcome the lack of prior art, the present invention provides a serverless system, comprising: a setting module for setting an upper threshold and a lower threshold; and a function statistics module for receiving a function. Message, And counting the number of executions of the function; the micro service management module provides the function of generating, resetting, querying and executing the microservices of the microservices (Microservices) equipped with the function; the container management module is provided The function of the container is generated, removed, and executed in the container, wherein the container is removed after performing the function; and the function execution selection module is connected to the setting module, the function statistical module a group, the microservice management module, and the container management module, and the function execution selection module is configured to compare the number of executions of the function with the upper threshold and the lower threshold and query the microservice to compare the comparison The result of the microservice and the result of querying the microservice enable the microservice management module or the container management module to perform the function.

本發明另提供一種無伺服器之執行方法,係包括:(1)設定上限門檻值及下限門檻值;(2)接收功能之執行的訊息,以取得該功能的執行次數;(3)比較該功能的執行次數與該上限門檻值及該下限門檻值;以及(4)依據該比較結果選擇微服務或容器執行該功能,其中,該容器執行完該功能後即會予以移除,且該微服務執行完該功能後會繼續常駐。 The invention further provides a serverless execution method, which comprises: (1) setting an upper threshold value and a lower threshold value; (2) receiving a message of execution of the function to obtain the number of executions of the function; (3) comparing the The number of executions of the function and the upper threshold and the lower threshold; and (4) selecting the microservice or container to perform the function according to the comparison result, wherein the container is removed after performing the function, and the micro The service will continue to be resident after the service has completed this function.

本發明的技術特點如下: The technical features of the present invention are as follows:

1.本發明對於頻繁執行的功能,可透過生成常駐的微服務來執行,省去多次容器生成與終止,減少執行的時間。 1. The present invention can be executed by generating resident microservices for frequently executed functions, eliminating the need for multiple container generation and termination, and reducing execution time.

2.由於降低容器生成與終止的次數,將可減少系統I/O頻率,增進整體系統效能。 2. By reducing the number of times the container is generated and terminated, the system I/O frequency can be reduced and the overall system performance can be improved.

3.本發明亦可當功能執行次數減少時,終止微服務轉換成生成容器執行,節省運算資源。 3. The present invention can also terminate the microservice conversion into a generation container execution when the number of function executions is reduced, thereby saving computational resources.

由上述可得知,本發明依據功能的執行次數,可透過微服務管理模組生成搭載該功能的微服務常駐來執行該功能或移除搭載該功能的微服務,省去多次容器的生成與移除,進而減少執行該功能的時間與節省運算資源,其次,由於降低容器生成與移除的次數,將可減少無伺服器系統I/O頻率,增進無伺服器系統整體效能。 As can be seen from the above, according to the number of executions of the function, the microservices management module can generate the microservice resident carrying the function to perform the function or remove the microservice carrying the function, thereby eliminating the generation of multiple containers. And to remove, thereby reducing the time to perform the function and saving computing resources. Secondly, by reducing the number of times the container is generated and removed, the serverless I/O frequency can be reduced, and the overall performance of the serverless system can be improved.

100‧‧‧使用者 100‧‧‧Users

102-1‧‧‧微服務1 102-1‧‧‧Micro Service 1

102-n‧‧‧微服務n 102-n‧‧‧Microservice n

103-1‧‧‧功能1 103-1‧‧‧ Function 1

103-n‧‧‧功能n 103-n‧‧‧ function n

104-1‧‧‧容器1 104-1‧‧‧ Container 1

104-m‧‧‧容器m 104-m‧‧‧ container m

105-x‧‧‧功能x 105-x‧‧‧ function x

105-y‧‧‧功能y 105-y‧‧‧ function y

200‧‧‧無伺服器系統 200‧‧‧No server system

210‧‧‧設定模組 210‧‧‧Setting module

220‧‧‧功能統計模組 220‧‧‧Functional Statistics Module

230‧‧‧功能執行選擇模組 230‧‧‧ Function Execution Selection Module

241‧‧‧微服務管理模組 241‧‧‧Micro Service Management Module

242‧‧‧容器管理模組 242‧‧‧ Container Management Module

S301~S304‧‧‧步驟 S301~S304‧‧‧Steps

第1圖為本發明之無伺服器之系統之操作架構圖;第2圖為本發明之無伺服器之系統之示意架構圖;以及第3圖為本發明之無伺服器之執行方法之步驟流程圖。 1 is an operational architecture diagram of a serverless system of the present invention; FIG. 2 is a schematic architectural diagram of a serverless system of the present invention; and FIG. 3 is a flowchart of a method for executing a serverless invention of the present invention. flow chart.

以下藉由特定的具體實施例說明本發明之實施方式,熟悉此技藝之人士可由本說明書所揭示之內容輕易地瞭解本發明之其他優點及功效。 The other embodiments of the present invention will be readily understood by those skilled in the art from this disclosure.

須知,本說明書所附圖式所繪示之結構、比例、大小等,均僅用以配合說明書所揭示之內容,以供熟悉此技藝之人士之瞭解與閱讀,並非用以限定本發明可實施之限定條件,故不具技術上之實質意義,任何結構之修飾、比例關係之改變或大小之調整,在不影響本發明所能產生之功效及所能達成之目的下,均應仍落在本發明所揭示之技術內容得能涵蓋之範圍內。 It is to be understood that the structure, the proportions, the size, and the like of the present invention are intended to be used in conjunction with the disclosure of the specification, and are not intended to limit the invention. The conditions are limited, so it is not technically meaningful. Any modification of the structure, change of the proportional relationship or adjustment of the size should remain in this book without affecting the effects and the objectives that can be achieved by the present invention. The technical content disclosed in the invention can be covered.

請參閱第1圖,係本發明之無伺服器之系統之操作架 構圖,使用者100可透過無伺服器系統200執行功能,無伺服器系統200在執行功能時有兩種方式,第一種方式是透過微服務102-1~102-n來執行功能103-1~103-n,微服務102-1~102-n是透過無伺服器系統200生成出來,常駐運行,可不斷接收來自無伺服器系統200的請求來執行功能1,每一個微服務只能執行一種功能,第二種是透過容器104-1~104-m來執行功能105-x~105-y,當使用者要執行功能105-x~105-y時,容器104-1~104-m才會被無伺服器系統200生成出來,當功能功能105-x~105-y執行完畢後,容器104-1~104-m會被終止和移除。 Please refer to FIG. 1 , which is an operation frame of the serverless system of the present invention. The user 100 can perform functions through the serverless system 200. There is two ways for the serverless system 200 to perform functions. The first method is to execute the function 103-1 through the microservices 102-1~102-n. ~103-n, the microservices 102-1~102-n are generated by the serverless system 200, are resident, can continuously receive requests from the serverless system 200 to perform function 1, and each microservice can only execute One function, the second is to execute the function 105-x~105-y through the containers 104-1~104-m, and when the user wants to perform the function 105-x~105-y, the container 104-1~104-m It will be generated by the serverless system 200. After the function functions 105-x~105-y are executed, the containers 104-1~104-m will be terminated and removed.

第2圖係本發明之無伺服器之系統之示意架構圖。如圖所示,本發明之無伺服器之系統係包括:用以供使用者100設定上限門檻值及下限門檻值之設定模組210,其中,上限門檻值必須大於下限門檻值;功能統計模組220,係用以接收使用者100提出執行功能的訊息,以統計該功能的執行次數;微服務管理模組241,係提供搭載該功能的微服務的生成常駐、移除、查詢及執行該微服務中的功能;容器管理模組242,係提供搭載該功能的容器的生成、移除及執行該容器中的功能,其中,該容器執行完該功能後即會移除該容器;以及功能執行選擇模組230,係連接該設定模組210、該功能統計模組220、該微服務管理模組241以及該容器管理模組242,且功能執行選擇模組230用以比較該功能的執行次數與該上限門檻值及該下限門檻值並查詢該微服務,以依據該比較結果及查詢該微服務的 結果,令該微服務管理模組或該容器管理模組執行該功能。 Figure 2 is a schematic architectural diagram of a serverless system of the present invention. As shown in the figure, the serverless system of the present invention includes: a setting module 210 for the user 100 to set the upper threshold and the lower threshold, wherein the upper threshold must be greater than the lower threshold; The group 220 is configured to receive a message that the user 100 proposes to perform the function, to count the number of executions of the function, and the micro service management module 241 provides the generation, removal, query, and execution of the micro service that carries the function. The function in the microservice; the container management module 242 provides the function of generating, removing, and executing the container carrying the function, wherein the container removes the container after performing the function; and the function The execution selection module 230 is connected to the setting module 210, the function statistics module 220, the micro service management module 241, and the container management module 242, and the function execution selection module 230 is configured to compare the execution of the function. And the threshold value and the lower threshold value are queried and the micro service is queried according to the comparison result and the micro service is queried As a result, the microservice management module or the container management module performs the function.

於一實施例中,該功能統計模組係統計該功能於最近固定時間(如30分鐘)的執行次數。 In one embodiment, the function statistics module system counts the number of executions of the function at a recent fixed time (eg, 30 minutes).

於一實施例中,當該功能的執行次數大於等於該上限門檻值時,該功能執行選擇模組230向該微服務管理模241組查詢是否具有搭載該功能的微服務,若是,則該功能執行選擇模組230令該微服務管理模組241執行該功能,若否,則該功能執行選擇模組230令該微服務管理模組241生成搭載該功能的微服務執行該微服務內的該功能。 In an embodiment, when the number of executions of the function is greater than or equal to the upper threshold, the function execution selection module 230 queries the micro service management module 241 group whether there is a micro service carrying the function, and if so, the function The execution selection module 230 causes the micro service management module 241 to perform the function. If not, the function execution selection module 230 causes the micro service management module 241 to generate the micro service carrying the function to execute the micro service. Features.

於一實施例中,當該功能的執行次數小於等於該下限門檻值時,該功能執行選擇模組230向該微服務管理模組241查詢是否具有搭載該功能的微服務,若是,則該功能執行選擇模組230令該微服務管理模組241移除搭載該功能的微服務,以及令該容器管理模組242生成搭載該功能的容器且執行該容器內的該功能,若否,則該功能執行選擇模組230令該容器管理模組242生成搭載該功能的容器且執行該容器內的該功能。 In an embodiment, when the number of executions of the function is less than or equal to the lower threshold, the function execution selection module 230 queries the microservice management module 241 whether the microservice is equipped with the function, and if so, the function The execution selection module 230 causes the micro service management module 241 to remove the microservice that carries the function, and causes the container management module 242 to generate a container carrying the function and execute the function in the container, and if not, the The function execution selection module 230 causes the container management module 242 to generate a container carrying the function and perform the function within the container.

於一實施例中,當該功能的執行次數小於該上限門檻值及大於該下限門檻值時,該功能執行選擇模組230向該微服務管理模組241查詢是否具有搭載該功能的微服務,若是,則該功能執行選擇模組230令該微服務管理模組241執行該功能,若否,則該功能執行選擇模組230令該容器管理模組243生成搭載該功能的容器且執行該容器內的該功能。 In an embodiment, when the number of executions of the function is less than the upper threshold and greater than the lower threshold, the function execution selection module 230 queries the microservice management module 241 for the microservice that carries the function. If yes, the function execution selection module 230 causes the micro service management module 241 to perform the function. If not, the function execution selection module 230 causes the container management module 243 to generate a container carrying the function and execute the container. This feature is inside.

第3圖係本發明之無伺服器之執行方法之步驟流程圖。如圖所示,本發明無伺服器之執行方法係包括下列步驟。 Figure 3 is a flow chart showing the steps of the method for executing a serverless server of the present invention. As shown, the serverless execution method of the present invention includes the following steps.

在步驟S301中,設定上限門檻值及下限門檻值。 In step S301, an upper threshold value and a lower threshold value are set.

在步驟S302中,接收功能之執行的訊息,以取得該功能的執行次數。 In step S302, a message of execution of the function is received to obtain the number of executions of the function.

在步驟S303中,比較該功能的執行次數與該上限門檻值及該下限門檻值。 In step S303, the number of executions of the function and the upper threshold and the lower threshold are compared.

在步驟S304中,依據該比較結果選擇微服務或容器執行該功能,其中,該容器執行完該功能後即會移除該容器,該微服務執行完該功能後會繼續常駐。 In step S304, the microservice or the container is selected to perform the function according to the comparison result, wherein the container removes the container after performing the function, and the microservice continues to be resident after performing the function.

於一實施例中,該步驟S302係取得該功能於最近固定時間(如30分鐘)的執行次數。 In an embodiment, the step S302 is to obtain the number of executions of the function at the most recent fixed time (eg, 30 minutes).

於一實施例中,當該功能的執行次數大於等於該上限門檻值時,該步驟S304係包括查詢該功能是否搭載在該微服務中;若是,選擇該微服務以執行該功能,若否,生成搭載該功能的微服務且執行該微服務內的該功能。 In an embodiment, when the number of executions of the function is greater than or equal to the upper threshold, the step S304 includes querying whether the function is piggybacked in the microservice; if yes, selecting the microservice to perform the function, and if not, A microservice carrying the function is generated and the function in the microservice is executed.

於一實施例中,當該功能的執行次數小於等於該下限門檻值時,該步驟S304係包括查詢該功能是否搭載在該微服務中;若是,移除搭載該功能的微服務,以及生成搭載該功能的容器且執行該容器內的功能,若否,生成搭載該功能的容器且執行該容器內的該功能。 In an embodiment, when the number of executions of the function is less than or equal to the lower threshold, the step S304 includes querying whether the function is piggybacked in the microservice; if yes, removing the microservice that carries the function, and generating the piggyback The container of the function executes the function in the container, and if not, the container carrying the function is generated and the function in the container is executed.

於一實施例中,當該功能的執行次數小於該上限門檻值及大於該下限門檻值時,該步驟S304係包括查詢該功 能是否搭載在該微服務中;若是,選擇該微服務且執行該功能,若否,生成搭載該功能的容器且執行該容器內的該功能。 In an embodiment, when the number of executions of the function is less than the upper threshold and greater than the lower threshold, the step S304 includes querying the function. Whether it can be carried in the microservice; if so, the microservice is selected and the function is executed, and if not, the container carrying the function is generated and the function in the container is executed.

以下提供三個實施例說明以第2圖之系統操作第3圖所示執行方法之步驟。 Three embodiments are provided below to illustrate the steps of performing the method illustrated in Figure 3 of the system operation of Figure 2.

第一實施例,假設功能統計模組220統計方式為計算最近30分鐘功能執行次數,功能F最近30分鐘功能執行次數為1500,沒有任何微服務搭載該功能F,詳細操作步驟說明如下: In the first embodiment, it is assumed that the function of the function statistics module 220 is to calculate the number of function executions in the last 30 minutes, and the function execution time of the function F in the last 30 minutes is 1500. There is no micro service to carry the function F. The detailed operation steps are as follows:

在步驟S301中,使用者100透過設定模組210輸入上限門檻值為1400及輸入下限門檻值為1000。 In step S301, the user 100 inputs an upper threshold value of 1400 and an input lower threshold value of 1000 through the setting module 210.

在步驟S302中,使用者100向無伺服器系統200提出執行功能F,功能統計模組220接收使用者100提出執行功能F的訊息,且取得該功能F於最近30分鐘的執行次數為1500。 In step S302, the user 100 proposes an execution function F to the serverless system 200, and the function statistics module 220 receives the message that the user 100 proposes to perform the function F, and obtains the number of executions of the function F in the last 30 minutes as 1500.

在步驟S303中,功能執行選擇模組230向該設定模組210取得上、下限門檻值及向功能統計模組取得該功能F於最近30分鐘的執行次數,並比較出該功能F於最近30分鐘的執行次數為1500大於等於該上限門檻值為1400。 In step S303, the function execution selection module 230 obtains the upper and lower thresholds from the setting module 210 and obtains the number of executions of the function F in the last 30 minutes from the function statistics module, and compares the function F to the latest 30. The number of executions in minutes is 1500 or more, and the upper threshold is 1400.

在步驟S304中,該功能執行選擇模組230向微服務管理模組241查詢微服務是否有搭載該功能F,因本實施例中沒有任何微服務搭載該功能F,該功能執行選擇模組230令該微服務管理模組241生成搭載該功能F的微服務且執行該微服務內的該功能F。 In step S304, the function execution selection module 230 queries the micro service management module 241 to check whether the micro service is equipped with the function F. Since there is no micro service in the embodiment to carry the function F, the function execution selection module 230 is executed. The microservice management module 241 is configured to generate a microservice carrying the function F and execute the function F in the microservice.

第二實施例,假設功能統計模組220統計方式為計算最近30分鐘功能執行次數,功能F最近30分鐘功能執行次數為900,存在搭載該功能F的微服務,詳細操作步驟說明如下: In the second embodiment, it is assumed that the statistical mode of the function statistics module 220 is to calculate the number of function executions in the last 30 minutes, and the function execution time of the function F in the last 30 minutes is 900, and the micro service with the function F is present. The detailed operation steps are as follows:

在步驟S301中,使用者100透過設定模組210輸入輸入上限門檻值為1400,輸入下限門檻值為1000。 In step S301, the user 100 inputs an input upper limit threshold of 1400 through the setting module 210, and the input lower threshold is 1000.

在步驟S302中,使用者100向無伺服器系統200提出執行功能F,功能統計模組220接收使用者100提出功能F執行的訊息,以及取得該功能F於最近30分鐘的執行次數為900。 In step S302, the user 100 proposes an execution function F to the serverless system 200, and the function statistics module 220 receives the message that the user 100 proposes the function F to execute, and obtains the number of executions of the function F in the last 30 minutes is 900.

在步驟S303中,功能執行選擇模組230向該設定模組210取得上下限門檻值及向功能統計模組取得該功能F於最近30分鐘的執行次數,並比較出該功能F於最近30分鐘的執行次數為900小於等於該下限門檻值為1000。 In step S303, the function execution selection module 230 obtains the upper and lower thresholds from the setting module 210 and obtains the number of executions of the function F in the last 30 minutes from the function statistics module, and compares the function F in the last 30 minutes. The number of executions is 900 or less and the lower threshold is 1000.

在步驟S304中,該功能執行選擇模組230向微服務管理模組241查詢微服務是否有搭載該功能F,因本實施例中存在微服務搭載該功能F,該功能執行選擇模組230令該微服務管理模組241移除搭載該功能F的微服務,以及令該容器管理模組242生成搭載該功能F的容器且執行該容器內的該功能F。 In step S304, the function execution selection module 230 queries the micro service management module 241 to check whether the micro service is equipped with the function F. In the embodiment, the micro service is provided with the function F, and the function execution selection module 230 The microservice management module 241 removes the microservice that carries the function F, and causes the container management module 242 to generate a container carrying the function F and execute the function F in the container.

第三實施例,假設功能統計模組220統計方式為計算最近30分鐘功能執行次數,功能F最近30分鐘功能執行次數為1100,沒有任何微服務搭載該功能F,詳細操作步驟說明如下: In the third embodiment, it is assumed that the function of the function statistics module 220 is to calculate the number of function executions in the last 30 minutes, and the function execution time of the function F in the last 30 minutes is 1100. There is no micro service to carry the function F. The detailed operation steps are as follows:

在步驟S301中,使用者100透過設定模組210輸入輸入上限門檻值為1400,輸入下限門檻值為1000。 In step S301, the user 100 inputs an input upper limit threshold of 1400 through the setting module 210, and the input lower threshold is 1000.

在步驟S302中,使用者100向無伺服器系統200提出執行功能F,功能統計模組220接收使用者100提出功能F執行的訊息,以及取得該功能F於最近30分鐘的執行次數為1100。 In step S302, the user 100 proposes an execution function F to the serverless system 200, and the function statistics module 220 receives the message that the user 100 proposes the function F to execute, and obtains the number of executions of the function F in the last 30 minutes as 1100.

在步驟S303中,功能執行選擇模組230向該設定模組210取得上下限門檻值及向功能統計模組取得該功能F於最近30分鐘的執行次數,並比較出該功能F於最近30分鐘的執行次數為1100小於該上限門檻值為1400及大於該下限門檻值1000。 In step S303, the function execution selection module 230 obtains the upper and lower thresholds from the setting module 210 and obtains the number of executions of the function F in the last 30 minutes from the function statistics module, and compares the function F in the last 30 minutes. The number of executions is 1100 less than the upper threshold value of 1400 and greater than the lower threshold value of 1000.

在步驟S304中,該功能執行選擇模組230向微服務管理模組241查詢微服務是否有搭載該功能F,因本實施例中沒有任何微服務搭載該功能F,該功能執行選擇模組230令該容器管理模組242生成搭載該功能F的容器且執行該容器內的該功能F。 In step S304, the function execution selection module 230 queries the micro service management module 241 to check whether the micro service is equipped with the function F. Since there is no micro service in the embodiment to carry the function F, the function execution selection module 230 is executed. The container management module 242 is caused to generate a container carrying the function F and execute the function F in the container.

由上述可得知,本發明依據功能的執行次數,可透過微服務管理模組生成搭載該功能的微服務常駐來執行該功能或移除搭載該功能的微服務,省去多次容器的生成與移除,進而減少執行該功能的時間與節省運算資源,其次,由於降低容器生成與移除的次數,將可減少無伺服器系統I/0頻率,增進無伺服器系統整體效能。 As can be seen from the above, according to the number of executions of the function, the microservices management module can generate the microservice resident carrying the function to perform the function or remove the microservice carrying the function, thereby eliminating the generation of multiple containers. And the removal, thereby reducing the time to perform the function and saving computing resources. Secondly, by reducing the number of times the container is generated and removed, the serverless I/O frequency can be reduced, and the overall performance of the serverless system is improved.

上述實施例係用以例示性說明本發明之原理及其功效,而非用於限制本發明。任何熟習此項技藝之人士均可 在不違背本發明之精神及範疇下,對上述實施例進行修改。因此本發明之權利保護範圍,應如後述之申請專利範圍所列。 The above embodiments are intended to illustrate the principles of the invention and its effects, and are not intended to limit the invention. Anyone who is familiar with this skill can The above embodiments are modified without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention should be as set forth in the appended claims.

Claims (10)

一種無伺服器之系統,係包括:設定模組,係用以設定上限門檻值及下限門檻值;功能統計模組,係用以接收功能之執行的訊息,以統計該功能的執行次數;微服務管理模組,係提供搭載該功能的微服務的生成常駐、移除、查詢及執行該微服務中的功能;容器管理模組,係提供搭載該功能的容器的生成、移除及執行該容器中的功能,其中,該容器執行完該功能後即會予以移除;以及功能執行選擇模組,係連接該設定模組、該功能統計模組、該微服務管理模組以及該容器管理模組,且該功能執行選擇模組用以比較該功能的執行次數與該上限門檻值及該下限門檻值並查詢該微服務,以依據該比較的結果及查詢該微服務的結果,令該微服務管理模組或該容器管理模組執行該功能。 A serverless system includes: a setting module for setting an upper threshold value and a lower threshold value; and a function statistics module for receiving a function execution function to count the number of executions of the function; The service management module provides the function of generating, relocating, querying and executing the microservices of the microservices carrying the function; the container management module provides the generation, removal and execution of the container carrying the function. a function in the container, wherein the container is removed after performing the function; and a function execution selection module is connected to the setting module, the function statistics module, the micro service management module, and the container management a module, wherein the function execution selection module compares the number of executions of the function with the upper threshold and the lower threshold and queries the microservice to determine the result of the comparison and query the result of the microservice. The microservice management module or the container management module performs this function. 如申請專利範圍第1項所述之系統,其中,當該功能的執行次數大於等於該上限門檻值時,該功能執行選擇模組會向該微服務管理模組查詢是否具有搭載該功能的微服務,若是,則該功能執行選擇模組令該微服務管理模組執行該功能,若否,則該功能執行選擇模組令該微服務管理模組生成搭載該功能的微服務且執行該微服務內的該功能。 The system of claim 1, wherein when the number of executions of the function is greater than or equal to the upper threshold, the function execution selection module queries the microservice management module to check whether the function has the micro function. The service, if yes, the function execution selection module causes the micro service management module to perform the function, and if not, the function execution selection module causes the micro service management module to generate the micro service carrying the function and execute the micro service This feature within the service. 如申請專利範圍第1項所述之系統,其中,當為該功能 的執行次數小於等於該下限門檻值時,該功能執行選擇模組會向該微服務管理模組查詢是否具有搭載該功能的微服務,若是,則該功能執行選擇模組令該微服務管理模組移除搭載該功能的微服務,以及令該容器管理模組生成搭載該功能的容器且執行該容器內的該功能,若否,則該功能執行選擇模組令該容器管理模組生成搭載該功能的容器且執行該容器內的該功能。 The system of claim 1, wherein the function is When the number of executions is less than or equal to the lower threshold, the function execution selection module queries the micro service management module whether there is a micro service carrying the function, and if so, the function executes the selection module to make the micro service management module The group removes the microservice that carries the function, and causes the container management module to generate the container carrying the function and executes the function in the container. If not, the function executes the selection module to enable the container management module to generate the load. The container of this function and performs this function within the container. 如申請專利範圍第1項所述之系統,其中,當該功能的執行次數小於該上限門檻值及大於該下限門檻值時,該功能執行選擇模組會向該微服務管理模組查詢是否具有搭載該功能的微服務,若是,則該功能執行選擇模組令該微服務管理模組執行該功能,若否,則該功能執行選擇模組令該容器管理模組生成搭載該功能的容器且執行該容器內的該功能。 The system of claim 1, wherein when the number of executions of the function is less than the upper threshold and greater than the lower threshold, the function execution selection module queries the microservice management module to have a microservice that carries the function, if yes, the function execution selection module causes the microservice management module to perform the function, and if not, the function execution selection module causes the container management module to generate a container carrying the function and Execute this function within the container. 如申請專利範圍第1項所述之系統,其中,該功能統計模組係統計該功能於最近30分鐘的執行次數。 The system of claim 1, wherein the function statistical module system counts the number of executions of the function in the last 30 minutes. 一種無伺服器之執行方法,係包括:(1)設定上限門檻值及下限門檻值;(2)接收功能之執行的訊息,以取得該功能的執行次數;(3)比較該功能的執行次數與該上限門檻值及該下限門檻值;以及(4)依據該比較結果選擇微服務或容器執行該功能,其中,該容器執行完該功能後即會予以移除,且 該微服務執行完該功能後會繼續常駐。 A serverless execution method includes: (1) setting an upper threshold and a lower threshold; (2) receiving a message of execution of the function to obtain the number of executions of the function; and (3) comparing the number of executions of the function And the upper threshold and the lower threshold; and (4) selecting the microservice or container to perform the function according to the comparison result, wherein the container is removed after performing the function, and The microservice will continue to be resident after performing this function. 如申請專利範圍第6項所述之執行方法,其中,當該功能的執行次數大於等於該上限門檻值時,該步驟(4)係包括:查詢該功能是否搭載在該微服務中;以及若是,選擇該微服務執行該功能,若否,生成搭載該功能的微服務且執行該微服務內的該功能。 The execution method of claim 6, wherein when the number of executions of the function is greater than or equal to the upper threshold, the step (4) includes: querying whether the function is piggybacked in the microservice; and if The microservice is selected to perform the function, and if not, the microservice carrying the function is generated and the function in the microservice is executed. 如申請專利範圍第6項所述之執行方法,其中,當該功能的執行次數小於等於該下限門檻值時,該步驟(4)係包括:查詢該功能是否搭載在該微服務中;以及若是,移除搭載該功能的微服務,以及生成搭載該功能的容器且執行該容器內的該功能,若否,生成搭載該功能的容器且執行該容器內的該功能。 The execution method of claim 6, wherein when the number of executions of the function is less than or equal to the lower threshold, the step (4) includes: querying whether the function is piggybacked in the microservice; and if The microservice that carries the function is removed, and the container that carries the function is generated and the function in the container is executed. If not, the container carrying the function is generated and the function in the container is executed. 如申請專利範圍第6項所述之執行方法,其中,當該功能的執行次數小於該上限門檻值及大於該下限門檻值時,該步驟(4)係包括:查詢該功能是否搭載在該微服務中;以及若是,選擇該微服務執行該功能,若否,生成搭載該功能的容器且執行該容器內的該功能。 The method of claim 6, wherein when the number of executions of the function is less than the upper threshold and greater than the lower threshold, the step (4) includes: querying whether the function is piggybacked on the micro In the service; and if so, the microservice is selected to perform the function, and if not, the container carrying the function is generated and the function in the container is executed. 如申請專利範圍第6項所述之執行方法,其中,該步驟(2)係取得該功能於最近30分鐘的執行次數。 The execution method of claim 6, wherein the step (2) is to obtain the number of executions of the function in the last 30 minutes.
TW106146251A 2017-12-28 2017-12-28 Serverless system and execution method thereof TWI646435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106146251A TWI646435B (en) 2017-12-28 2017-12-28 Serverless system and execution method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106146251A TWI646435B (en) 2017-12-28 2017-12-28 Serverless system and execution method thereof

Publications (2)

Publication Number Publication Date
TWI646435B TWI646435B (en) 2019-01-01
TW201931144A true TW201931144A (en) 2019-08-01

Family

ID=65803634

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106146251A TWI646435B (en) 2017-12-28 2017-12-28 Serverless system and execution method thereof

Country Status (1)

Country Link
TW (1) TWI646435B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI684347B (en) * 2019-01-10 2020-02-01 中華電信股份有限公司 System for automatically adjusting serverless function and method thereof
TWI697217B (en) * 2019-01-30 2020-06-21 中華電信股份有限公司 Container control system for repeatedly executing serverless programs and method thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461131B2 (en) * 2003-03-07 2008-12-02 International Business Machines Corporation Use of virtual targets for preparing and servicing requests for server-free data transfer operations
JP6023811B2 (en) * 2011-09-12 2016-11-09 インテル・コーポレーション Application- and web-service metadata-driven collaboration
US9886267B2 (en) * 2014-10-30 2018-02-06 Equinix, Inc. Interconnection platform for real-time configuration and management of a cloud-based services exchange
WO2016176601A1 (en) * 2015-04-30 2016-11-03 Lifespeed, Inc. Massively-scalable, asynchronous backend cloud computing architecture
WO2016192866A1 (en) * 2015-06-03 2016-12-08 Telefonaktiebolaget Lm Ericsson (Publ) Implanted agent within a first service container for enabling a reverse proxy on a second container
US11194572B2 (en) * 2016-02-22 2021-12-07 International Business Machines Corporation Managing external feeds in an event-based computing system

Also Published As

Publication number Publication date
TWI646435B (en) 2019-01-01

Similar Documents

Publication Publication Date Title
US20180285417A1 (en) Intelligent query parameterization of database workloads
WO2017016422A1 (en) Cloud-based database detection method and device
CN109815283B (en) Heterogeneous data source visual query method
Fu et al. Layered virtual machine migration algorithm for network resource balancing in cloud computing
US20220237162A1 (en) System and method for cardinality estimation feedback loops in query processing
CN104102543A (en) Load regulation method and load regulation device in cloud computing environment
CN106874100B (en) Computing resource allocation method and device
CN110569252B (en) Data processing system and method
CN112000450A (en) Neural network architecture searching method and device
TWI646435B (en) Serverless system and execution method thereof
Yin et al. System resource utilization analysis and prediction for cloud based applications under bursty workloads
JP2019508774A (en) Database system optimization method, system, electronic device and storage medium
US9916182B2 (en) Method and apparatus for allocating stream processing unit
CN110784336A (en) Multi-device intelligent timing delay scene setting method and system based on Internet of things
Meng et al. Achieving energy efficiency through dynamic computing offloading in mobile edge-clouds
Ravindra et al. Latency aware elastic switching-based stream processing over compressed data streams
CN109412865B (en) Virtual network resource allocation method, system and electronic equipment
JP2018509666A (en) Method and apparatus for determining a SQL execution plan
CN111917573B (en) Monitoring method, monitoring system and computing equipment
CN104580489A (en) Web application elastic expansion method in cloud environment
CN106874215B (en) Serialized storage optimization method based on Spark operator
US10289726B2 (en) Self-optimizing table distribution with transparent replica cache
Li et al. SLA‐Aware and Energy‐Efficient VM Consolidation in Cloud Data Centers Using Host State 3rd‐Order Markov Chain Model
Bruschi et al. Model-based analytics for profiling workloads in virtual network functions
CN105335233B (en) A kind of method and apparatus of processor dynamic frequency-conversion