TW202027480A - System for automatically adjusting serverless function and method thereof - Google Patents
System for automatically adjusting serverless function and method thereof Download PDFInfo
- Publication number
- TW202027480A TW202027480A TW108101013A TW108101013A TW202027480A TW 202027480 A TW202027480 A TW 202027480A TW 108101013 A TW108101013 A TW 108101013A TW 108101013 A TW108101013 A TW 108101013A TW 202027480 A TW202027480 A TW 202027480A
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- health
- module
- diagnosis
- serverless
- Prior art date
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
Description
本發明係有關一種無伺服器程式技術,由指一種自動調節無伺服器程式之系統與方法。 The present invention relates to a serverless programming technology, and refers to a system and method for automatically adjusting the serverless programming.
無伺服器(Serverless)是一種雲端伺服器,使用者不須架設實體伺服器,使用者只需提供適當的代碼,其餘皆由雲端伺服器自動管理。 Serverless is a kind of cloud server. The user does not need to set up a physical server. The user only needs to provide the appropriate code, and the rest are automatically managed by the cloud server.
此外,無伺服器系統提供程式語言介面讓使用者開發無伺服器程式,再透過無伺服器系統來執行該無伺服器程式。過去該無伺服器系統在執行該無伺服器程式時,是採用生成容器(Container)並將該無伺服器程式載入該容器後,才可執行該無伺服器程式,並在執行完該無伺服器程式後,才將搭載該無伺服器程式的容器移除,然而,此種作法無法對執行中的該無伺服器程式進行即時的資源調節而產生效能低落的問題。 In addition, the serverless system provides a programming language interface for users to develop a serverless program, and then execute the serverless program through the serverless system. In the past, when the serverless system executed the serverless program, it used to generate a container and load the serverless program into the container before the serverless program could be executed. After the server program, the container carrying the serverless program is removed. However, this approach cannot perform real-time resource adjustment for the serverless program in execution, resulting in a problem of low performance.
因此,如何有效的自動調節該無伺服器程式的資源,即為本發明所要解決之技術問題。 Therefore, how to effectively automatically adjust the resources of the serverless program is the technical problem to be solved by the present invention.
為克服習知技術之缺失,本發明提供一種自動調節無伺服器程式之系統,係包括:數據管理模組,係儲存無伺服器程式;無伺服器程式管控模組,係從該數據管理模組所儲存之無伺服器程式中找出使用者介面欲執行者,以生成運作該欲執行的無伺服器程式的容器,其中,該容器包含數據收集子模組,係收集該欲執行的無伺服器程式於運作中的運作資料;以及健康度診斷模組,係供該使用者介面設定診斷週期及診斷條件以及接收該數據收集子模組所傳送該運作資料,以對該診斷週期內的該運作資料進行健康度計算,俾得到健康度資料,再比對該健康度資料與該診斷條件,以將比對之結果做為診斷資料,進而依據該診斷資料控制該無伺服器程式管控模組增加或減少該運作該欲執行的無伺服器程式之容器的生成。 In order to overcome the lack of conventional technology, the present invention provides a system for automatically adjusting serverless programs, which includes: a data management module, which stores serverless programs; a serverless program management and control module, from which data management modules From the serverless programs stored in the group, find the user interface to be executed to generate a container for running the serverless program to be executed. The container contains a data collection sub-module that collects the serverless program to be executed. The operation data of the server program in operation; and the health diagnosis module for the user interface to set the diagnosis period and diagnosis conditions and receive the operation data sent by the data collection sub-module for the diagnosis period Perform health calculation on the operating data to obtain health data, then compare the health data with the diagnostic conditions to use the result of the comparison as the diagnostic data, and then control the serverless program control model based on the diagnostic data The group increases or decreases the generation of the container for the serverless program to be executed for the operation.
於一實施例中,該數據管理模組更包含提供該使用者介面設定該無伺服器程式的自定義資料以及設定該自定義資料的標籤內容,其中,該自定義資料係為該無伺服器程式的功能、效能、特性或屬性,該標籤內容為量化型或非量化型者。 In one embodiment, the data management module further includes providing the user interface to set the custom data of the serverless program and setting the label content of the custom data, wherein the custom data is the serverless program The function, performance, characteristic or attribute of the program, the content of the label is quantitative or non-quantitative.
於一實施例中,該運作資料係為該自定義資料或狀態資料,其中,該狀態資料係為該容器之後端的中央處理器、記憶體、網路I/O或硬碟I/O的資料。 In one embodiment, the operating data is the custom data or status data, where the status data is the data of the central processing unit, memory, network I/O or hard disk I/O at the rear of the container .
於一實施例中,當該運作資料係為該狀態資料或為該自定義資料且該自定義資料的標籤內容為該量化型者時,該健康度診斷模組所進行的該健康度計算係為計算該診斷週期內的該運作資料的平均值,以令該平均值為該健康度資料,而當該運作資料係為該自定義資料且該自定義資料的標籤內容為該非量化型者時,該健康度診斷模組所進行的該健康度計算係為統計出該診斷週期內之每一筆該運作資料的統計資料,以令該統計資料為該健康度資料。 In one embodiment, when the operating data is the state data or the custom data and the label content of the custom data is the quantitative type, the health degree calculation performed by the health degree diagnosis module is In order to calculate the average value of the operating data in the diagnosis period, so that the average value is the health data, and when the operating data is the custom data and the label content of the custom data is the non-quantifiable one , The health degree calculation performed by the health degree diagnosis module is to count the statistical data of each operation data in the diagnosis period, so that the statistical data is the health degree data.
於一實施例中,該容器中的該數據收集子模組所收集到的該欲執行的無伺服器程式於運作中的運作資料係包含時序資料,以供該健康度診斷模組對該診斷週期內的該運作資料進行該健康度計算。 In one embodiment, the operating data of the serverless program to be executed collected by the data collection submodule in the container includes time series data for the health diagnosis module to diagnose The health calculation is performed on the operation data in the cycle.
本發明另提供一種自動調節無伺服器程式之方法,係包括:令數據管理模組接收使用者介面傳送的無伺服器程式;令該使用者介面藉健康度診斷模組設定診斷週期及診斷條件;令無伺服器程式管控模組從該數據管理模組所接收之無伺服器程式中找出該使用者介面欲執行者,以生成運作該欲執行的無伺服器程式的容器,其中,該容器包含數據收集子模組;令該容器中的數據收集子模組收集該欲執行的無伺服器程式於運作中的運作資料;令該健康度診斷模組接收該數據收集子模組所傳送的該運作資料,以對該診斷週期內的該運作資料進行健康度計算,俾得到健康度資料,再比對該健康度資料與該診斷條件,以將比對之結果做為診斷資料;以及令該健康度診斷模組依據該診斷資料控制該無伺服器程式管控模組,以增加或減少該運作該欲執行的無伺服器程式的容器之生成。 The present invention also provides a method for automatically adjusting a serverless program, which includes: enabling the data management module to receive the serverless program transmitted by the user interface; and enabling the user interface to set the diagnosis period and the diagnosis condition through the health diagnosis module ; Make the serverless program control module find the user interface to be executed from the serverless program received by the data management module to generate a container for running the serverless program to be executed, where the The container includes a data collection sub-module; the data collection sub-module in the container collects the operating data of the serverless program to be executed in operation; the health diagnosis module receives the data collection sub-module Calculate the health of the operating data in the diagnostic cycle to obtain the health data, compare the health data with the diagnostic conditions, and use the result of the comparison as the diagnostic data; and The health diagnosis module is made to control the serverless program management and control module according to the diagnostic data, so as to increase or decrease the generation of the container for running the serverless program to be executed.
於一實施例中,更包括令該使用者介面經由該數據管理模組設定該無伺服器程式的自定義資料以及設定該自定義資料的標籤內容,其中,該自定義資料係為該無伺服器程式的功能、效能、特性或屬性,該標籤內容為量化型或非量化型者。 In one embodiment, it further includes allowing the user interface to set the custom data of the serverless program through the data management module and set the label content of the custom data, wherein the custom data is the serverless program The function, performance, characteristics, or attributes of the device program, the content of the tag is quantified or non-quantified.
於一實施例中,該容器中的數據收集子模組收集該欲執行的無伺服器程式於運作中的該運作資料係為該自定義資料或狀態資料,其中,該狀態資料係為該容器之後端的中央處理器、記憶體、網路I/O或硬碟I/O的資料。 In one embodiment, the data collection sub-module in the container collects the operating data of the serverless program to be executed in operation as the custom data or status data, wherein the status data is the container Data from the central processing unit, memory, network I/O or hard disk I/O at the back end.
於一實施例中,當該運作資料係為該狀態資料或為該自定義資料且該自定義資料的標籤內容為該量化型者時,該健康度診斷模組所進行的該健康度計算係為計算該診斷週期內的該運作資料的平均值,以令該平均值為該健康度資料,而當該運作資料係為該自定義資料且該自定義資料的標籤內容為該非量化型者時,該健康度診斷模組所進行的該健康度計算係為統計出該診斷週期內之每一筆該運作資料的統計資料,以令該統計資料為該健康度資料。 In one embodiment, when the operating data is the state data or the custom data and the label content of the custom data is the quantitative type, the health degree calculation performed by the health degree diagnosis module is In order to calculate the average value of the operating data in the diagnosis period, so that the average value is the health data, and when the operating data is the custom data and the label content of the custom data is the non-quantifiable one , The health degree calculation performed by the health degree diagnosis module is to count the statistical data of each operation data in the diagnosis period, so that the statistical data is the health degree data.
於一實施例中,令該容器中的該數據收集子模組所收集到的該欲執行的無伺服器程式於運作中的運作資料係包含時序資料,以提供該健康度診斷模組對該診斷週期內的該運作資料進行該健康度計算。 In one embodiment, the operation data of the serverless program to be executed collected by the data collection submodule in the container includes time series data to provide the health diagnosis module with The health degree calculation is performed on the operation data in the diagnosis period.
本發明的技術特點如下: The technical features of the present invention are as follows:
1.動態生成數據收集模組以時序資料紀錄資源使用狀況,除一般程式運行資源如CPU、memory、network I/O、disk I/O外,亦可收集無伺服器程式自定義的數據資料,大幅提升適用性。 1. Dynamically generate data collection module to record resource usage with time series data. In addition to general program running resources such as CPU, memory, network I/O, disk I/O, it can also collect data without server program customization. Significantly improve applicability.
2.健康度診斷依據以週期資料為主,可針對每個無伺服器程式設定不同的週期及診斷條件,達到高度客製化的健康度診斷。 2. The health diagnosis is based on periodic data, and different periods and diagnosis conditions can be set for each serverless program to achieve a highly customized health diagnosis.
3.提出雙診斷模式,對於量化數據,健康度診斷採用週期平均數據,對於非量化數據,則健康度診斷改為週期統計資料做為輔助量化判斷,因此任何的數據類型皆能作為健康度診斷的依據。 3. The dual diagnosis mode is proposed. For quantitative data, the health diagnosis uses periodic average data, and for non-quantitative data, the health diagnosis is changed to periodic statistics as an auxiliary quantitative judgment, so any data type can be used as a health diagnosis Basis.
4.自動依無伺服器程式執行狀況進行資源調節提高程式可用性。 4. Automatically adjust resources according to the execution status of the serverless program to improve program usability.
由上可知,本發明透過容器中的數據收集子模組可收集該容器中之無伺服器程式於運作中的運作資料,並藉由健康度診斷模組對該運作資料的健康度診斷的結果進行該容器資源的調節。此外,該運作資料除該容器之後端 的中央處理器、記憶體、網路I/O或硬碟I/O的資料外,更包含使用者對該無伺服器程式設定的自定義資料及其的量化類型,故與該無伺服器程式有關的任何數據類型皆能作為健康度診斷的依據。因此,本發明不但能提高該無伺服器程式的可用性,同時也能節省資源的浪費降低營運成本。 It can be seen from the above that the present invention can collect the operating data of the serverless program in the container through the data collection sub-module in the container, and use the health diagnosis module to perform the health diagnosis results of the operating data. Adjust the resource of the container. In addition, the operational data except for the back end of the container In addition to the data of the CPU, memory, network I/O or hard disk I/O, it also includes the user-defined data set by the serverless program and its quantization type, so it is consistent with the serverless Any data type related to the program can be used as a basis for health diagnosis. Therefore, the present invention can not only improve the usability of the serverless program, but also save waste of resources and reduce operating costs.
101‧‧‧使用者介面 101‧‧‧User Interface
102‧‧‧數據管理模組 102‧‧‧Data Management Module
103‧‧‧無伺服器程式管控模組 103‧‧‧Serverless program control module
104‧‧‧健康度診斷模組 104‧‧‧Health Diagnosis Module
105‧‧‧容器 105‧‧‧Container
106‧‧‧數據收集子模組 106‧‧‧Data Collection Submodule
S1~S7‧‧‧步驟 S1~S7‧‧‧Step
第1圖係本發明之自動調節無伺服器程式之系統之示意架構圖;以及第2圖係本發明之自動調節無伺服器程式之方法之步驟流程圖。 Fig. 1 is a schematic structural diagram of the system for automatically adjusting a serverless program of the present invention; and Fig. 2 is a flowchart of the steps of the method for automatically adjusting a serverless program of the present invention.
以下藉由特定的具體實施例說明本發明之實施方式,熟悉此技藝之人士可由本說明書所揭示之內容輕易地瞭解本發明之其他優點及功效。 The following specific examples illustrate the implementation of the present invention. Those familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.
須知,本說明書所附圖式所繪示之結構、比例、大小等,均僅用以配合說明書所揭示之內容,以供熟悉此技藝之人士之瞭解與閱讀,並非用以限定本發明可實施之限定條件,故不具技術上之實質意義,任何結構之修飾、比例關係之改變或大小之調整,在不影響本發明所能產生之功效及所能達成之目的下,均應仍落在本發明所揭示之技術內容得能涵蓋之範圍內。 It should be noted that the structures, proportions, sizes, etc. shown in the drawings in this manual are only used to match the contents disclosed in the manual for the understanding and reading of those familiar with the art, and are not intended to limit the implementation of the present invention. Therefore, it does not have any technical significance. Any structural modification, proportional relationship change, or size adjustment should still fall within the scope of the present invention without affecting the effects and objectives that can be achieved. The technical content disclosed by the invention can be covered.
第1圖係本發明之自動調節無伺服器程式之系統之示意架構圖。如圖所示,該系統係包括:使用者介面101、數據管理模組102、無伺服器程式(Serverless)管控模組103、健康度診斷模組104以及容器105,其中,數據管理模組102、無伺服器程式(Serverless)管控模組103、健康度診斷模組104以及容器105各
皆具有應用程式介面(Application programming interface,以下簡稱API),以令使用者介面101、數據管理模組102、無伺服器程式(Serverless)管控模組103以及健康度診斷模組104之間彼此透過該API進行資料的傳輸,以及令無伺服器程式(Serverless)管控模組103、健康度診斷模組104以及容器105之間彼此透過該API進行資料的傳輸。
Figure 1 is a schematic structural diagram of the system for automatically adjusting serverless programs of the present invention. As shown in the figure, the system includes: a
使用者介面101,係提供使用者透過使用者介面101使用數據管理模組102、無伺服器程式(Serverless)管控模組103以及健康度診斷模組104。
The
數據管理模組102,係接收使用者介面101所傳送的無伺服器程式,並將該無伺服器程式儲存在數據管理模組102中。
The
於一實施例中,數據管理模組102更包含提供使用者介面101設定數據管理模組102中的該無伺服器程式的自定義資料以及設定該自定義資料的標籤內容,其中,該自定義資料係為該無伺服器程式的功能、效能、特性或屬性,該標籤內容為量化型或非量化型者。需理解的是,當該自定義資料的標籤內容為量化型者表示該自定義資料為連續性資料,當該自定義資料的標籤內容為非量化型者表示該自定義資料為非連續性資料(例如開關的開啟或關閉的資料)。
In one embodiment, the
舉例來說,假設該無伺服器程式為影音播放程式,該自定義資料可為影音播放的速度、影音解碼的速度或音量等等,只要是該影音播放程式的功能、效能、特性或屬性皆可設成該自定義資料,但不以此為限。 For example, assuming that the serverless program is an audio-visual player, the custom data can be the speed of audio-visual playback, the speed or volume of audio-visual decoding, etc., as long as the function, performance, characteristics or attributes of the audio-visual player are all This custom data can be set, but not limited to this.
於一實施例中,該使用者可使用一電子裝置(未圖示)操作使用者介面101,以令該使用者使用該電子裝置時,即可操作使用者介面101並透過使用者介面101與數據管理模組102之間的API,向數據管理模組102傳送該無伺服器程
式、設定該無伺服器程式的該自定義資料以及設定該自定義資料的標籤內容,其中,該電子裝置包含電腦或行動裝置,但不以此為限。
In one embodiment, the user can use an electronic device (not shown) to operate the
無伺服器程式管控模組103,係從該數據管理模組102所儲存之無伺服器程式中找出該使用者介面101欲執行者,以生成運作該欲執行的無伺服器程式的容器105,其中,該容器105包含數據收集子模組106,係收集該欲執行的無伺服器程式於運作中的運作資料。
The serverless program management and
於一實施例中,該運作資料係為該自定義資料或狀態資料,其中,該狀態資料係為該容器之後端的中央處理器、記憶體、網路I/O或硬碟I/O的資料,但不以此為限。 In one embodiment, the operating data is the custom data or status data, where the status data is the data of the central processing unit, memory, network I/O or hard disk I/O at the rear of the container , But not limited to this.
健康度診斷模組104,係供使用者介面101設定診斷週期及診斷條件以及接收該數據收集子模組106所傳送的該運作資料,以對該診斷週期內的該運作資料進行健康度計算,俾得到健康度資料,再比對該健康度資料與該診斷條件,以將比對之結果做為診斷資料,進而依據該診斷資料控制無伺服器程式管控模組103增加或減少該運作該欲執行的無伺服器程式之容器105的生成。
The
於一實施例中,當該運作資料係為該狀態資料或為該自定義資料且該自定義資料的標籤內容為該量化型者時,為了有效過濾雜訊值干擾造成的誤判,健康度診斷模組104所進行的該健康度計算係為計算該診斷週期內的該運作資料的平均值,以令該平均值為該健康度資料,而當該運作資料係為該自定義資料且該自定義資料的標籤內容為該非量化型者時,該健康度診斷模組104所進行的該健康度計算係為統計出該診斷週期內之每一筆該運作資料的統計資料,以令該統計資料為該健康度資料。
In one embodiment, when the operating data is the status data or the custom data and the label content of the custom data is the quantitative type, in order to effectively filter the misjudgment caused by the noise value interference, the health diagnosis The health degree calculation performed by the
於一實施例中,容器105中的數據收集子模組106所收集到的該欲執行的無伺服器程式於運作中的運作資料係包含時序資料,以提供該健康度診斷模組104依據該運作資料中的時序資料,對該診斷週期內的該運作資料進行該健康度計算。
In one embodiment, the operating data of the serverless program to be executed collected by the
於一實施例中,健康度診斷模組104更包含一資料庫,以儲存該數據收集子模組106所傳送的該運作資料,但不以此為限。
In one embodiment, the
於一實施例中,該診斷資料中的健康度資料大於或小於該診斷條件時,則令健康度診斷模組104控制無伺服器管控模組103增加該運作該欲執行的無伺服器程式之容器的生成,或是該診斷資料中的健康度資料大於或小於該診斷條件時,則令健康度診斷模組104控制無伺服器管控模組103減少該運作該欲執行的無伺服器程式之容器的生成,但不以此為限。
In one embodiment, when the health data in the diagnostic data is greater or less than the diagnostic condition, the health
於一實施例中,該診斷條件包含第一診斷條件及第二診斷條件,其中,當該診斷資料是該健康度資料大於等於該第一診斷條件時,令健康度診斷模組104控制無伺服器管控模組103增加該運作該欲執行的無伺服器程式之容器105的生成,而當該診斷資料是該健康度資料小於等於該第二診斷條件時,令健康度診斷模組104控制無伺服器管控模組103減少該運作該欲執行的無伺服器程式之容器105的生成,其中,該第一診斷條件大於該第二診斷條件,但不以此為限。
In one embodiment, the diagnosis condition includes a first diagnosis condition and a second diagnosis condition, wherein, when the diagnosis data is that the health information is greater than or equal to the first diagnosis condition, the
第2圖係本發明之自動調節無伺服器程式之方法之步驟流程圖。該方法係包括下列執行步驟: Figure 2 is a flowchart of the steps of the method of automatically adjusting a serverless program of the present invention. The method includes the following execution steps:
在步驟S1中,接收無伺服器程式,其中,令數據管理模組102接收使用者介面101所傳送的無伺服器程式。
In step S1, the serverless program is received, wherein the
在步驟S2中,設定自定義資料及標籤內容,其中,令使用者介面101經由數據管理模組102設定該無伺服器程式的自定義資料以及設定該自定義資料的標籤內容,其中,該自定義資料係為該無伺服器程式的功能、效能、特性或屬性,該標籤內容為量化型或非量化型者。
In step S2, custom data and label content are set, wherein the
在步驟S3中,設定診斷週期及診斷條件,其中,令使用者介面101藉健康度診斷模組104設定診斷週期及診斷條件。
In step S3, the diagnosis period and diagnosis conditions are set, wherein the
在步驟S4中,生成運作該無伺服器程式的容器,其中,令無伺服器程式管控模組103從數據管理模組102所接收之無伺服器程式中找出使用者介面101欲執行者,以生成運作該欲執行的無伺服器程式的容器105,其中,容器105包含數據收集子模組106。
In step S4, a container for running the serverless program is generated, wherein the serverless program
在步驟S5中,收集該無伺服器程式於運作中的運作資料,其中,令容器105中的數據收集子模組106收集該欲執行的無伺服器程式於運作中的運作資料。
In step S5, the operation data of the serverless program in operation is collected, wherein the
於一實施例中,該步驟S5中的容器105中的數據收集子模組106所收集該欲執行的無伺服器程式於運作中的該運作資料係為該自定義資料或狀態資料,其中,該狀態資料係為該容器之後端的中央處理器、記憶體、網路I/O或硬碟I/O的資料。
In one embodiment, the operation data collected by the
在步驟S6中,對該運作資料進行健康度診斷,以得到診斷資料,其中,令健康度診斷模組104接收數據收集子模組106所傳送的該運作資料,以對該診斷週期內的該運作資料進行健康度診斷,俾得到健康度資料,再比對該健康度資料與該診斷條件,以將比對之結果做為診斷資料。
In step S6, perform a health diagnosis on the operation data to obtain the diagnosis data, wherein the
於一實施例中,當該運作資料係為該狀態資料或為該自定義資料且該自定義資料的標籤內容為該量化型者時,健康度診斷模組104所進行的該健康度計算係為計算該診斷週期內的該運作資料的平均值,以令該平均值為該健康度資料,而當該運作資料係為該自定義資料且該自定義資料的標籤內容為該非量化型者時,健康度診斷模組104所進行的該健康度計算係為統計出該診斷週期內之每一筆該運作資料的統計資料,以令該統計資料為該健康度資料。
In one embodiment, when the operating data is the status data or the custom data and the label content of the custom data is the quantitative type, the health degree calculation performed by the health
於一實施例中,令該步驟S5中的容器105中的數據收集子模組106所收集該欲執行的無伺服器程式於運作中的該運作資料係包含時序資料,以提供該步驟S6中的健康度診斷模組依據該運作資料中的時序資料,對該診斷週期內的該運作資料進行該健康度計算。
In one embodiment, the operation data collected by the
在步驟S7中,依據該診斷資料,使運作該無伺服器程式的容器增加或減少,其中,令該健康度診斷模組104依據該診斷資料控制該無伺服器程式管控模組103,以增加或減少該運作該欲執行的無伺服器程式的容器之生成。
In step S7, according to the diagnostic data, the container for running the serverless program is increased or decreased, wherein the
於一實施例中,當該步驟S7中的該診斷資料中的健康度資料大於或小於該診斷條件時,則令健康度診斷模組104控制無伺服器程式管控模組103增加該運作該欲執行的無伺服器程式的容器之生成,或是該診斷資料中的健康度資料大於或小於該診斷條件時,則令健康度診斷模組104控制無伺服器程式管控模組103減少該運作該欲執行的無伺服器程式的容器之生成,但不以此為限。
In one embodiment, when the health information in the diagnosis data in step S7 is greater than or less than the diagnosis condition, the
於一實施例中,該步驟S3所設定的該診斷條件包含第一診斷條件及第二診斷條件,以於該步驟S7中的該診斷資料是該健康度資料大於等於該第一診斷條件時,令健康度診斷模組104控制無伺服器程式管控模組103增加該運作該欲執行的無伺服器程式的容器105之生成,或於該診斷資料是該健康度資料小
於等於該第二診斷條件時,令健康度診斷模組104控制無伺服器程式管控模組103減少該運作該欲執行的無伺服器程式的容器105之生成,其中,該第一診斷條件大於該第二診斷條件,但不以此為限。
In one embodiment, the diagnosis condition set in step S3 includes a first diagnosis condition and a second diagnosis condition, so when the diagnosis data in step S7 is that the health information is greater than or equal to the first diagnosis condition, Make the
下列提供第一情境實例來說明本發明之自動調節無伺服器程式之系統與方法,其中,該第一情境實例中的無伺服程式是影音播放程式且其標籤內容為量化型者。 The following provides a first scenario example to illustrate the system and method for automatically adjusting a serverless program of the present invention, wherein the serverless program in the first scenario example is an audio-visual player program and its label content is a quantitative type.
當無伺服程式由使用者介面101上傳到數據管理模組102後,依使用者介面101設定無伺服程式的自定義資料(例:home_voice_db)及其標籤內容(例:quantifiable,量化型),接著,使用者介面101再向健康度診斷模組104設定無伺服程式的自定義資料的診斷週期(例:3分鐘)及診斷條件(例:home_voice_db<100,表示音量低於100db需增加運算資源)。
After the servoless program is uploaded to the
在生成搭載該無伺服器程式的容器105並開始運作後,容器105中的數據收集子模組106會持續收集該無伺服器程式於運作中的該自定義資料,健康度診斷模組104也會依最新於運作中的該自定義資料進行該步驟S6中的健康度診斷,此時因home_voice_db的標籤為『quantifiable』,計算3分鐘內的於運作中的該自定義資料的平均值,並於該平均值小於100時,控制無伺服器程式管控模組103生成更多搭載該無伺服器程式的容器105來增加運算,量化型者之資料的健康度診斷採用週期平均值的優點在於可避免離群值造成的誤判(例:3分鐘內,共有30筆音量資料,其中1筆數值小於50,但其它29筆數值均大於110,此單筆50數值的影響經過週期平均後所造成誤判現象會降低)。
After the
下列提供第二情境實例來說明本發明之自動調節無伺服器程式之系統與方法,其中,該第二情境實例中的無伺服程式是開關的程式且其標籤內容為非量化型者。 The following provides a second scenario example to illustrate the system and method for automatically adjusting a serverless program of the present invention, wherein the serverless program in the second scenario example is a switch program and its label content is a non-quantized one.
當無伺服程式由使用者介面101上傳到數據管理模組102後,依使用者介面101設定無伺服程式的自定義資料(例:busy_status)及其標籤內容(例:unquantifiable,非量化型)和定義值(例:high,mid,low共三種),接著,使用者介面101再向健康度診斷模組104設定無伺服程式的自定義資料的診斷週期(例:10分鐘)及診斷條件(例:busy_status==high>80%表示狀態忙碌超過百分比80時需增加運算資源)。
After the servoless program is uploaded from the
在生成搭載該無伺服器程式的容器105並開始運作後,容器105中的數據收集子模組106會持續收集該無伺服器程式於運作中的該自定義資料,健康度診斷模組104也會依最新於運作中的該自定義資料進行該步驟S6中的健康度診斷,此時因busy_status的標籤為『unquantifiable』,統計10分鐘內的每一筆於運作中的該自定義資料的統計資料,當該統計資料發現busy_state為high的統計次數大於10分鐘內總次數的80%,則需增加運算資源。
After the
當上述該第一及二情境實例中的容器105運作一陣子後,若健康度診斷模組104發現容器105中的無伺服器程式閒置並無進行運算,同樣會發送要求無伺服器程式管控模組103進行此容器105的回收,將閒置的資源釋放達到資源調節的目的。
After the
由上可知,本發明透過容器中的數據收集子模組可收集該容器中之無伺服器程式於運作中的運作資料,並藉由健康度診斷模組對該運作資料的健康度診斷的結果進行該容器資源的調節。此外,該運作資料除該容器之後端 的中央處理器、記憶體、網路I/O或硬碟I/O的資料外,更包含使用者對該無伺服器程式設定的自定義資料及其的量化類型,故與該無伺服器程式有關的任何數據類型皆能作為健康度診斷的依據。因此,本發明不但能提高該無伺服器程式的可用性,同時也能節省資源的浪費降低營運成本。 It can be seen from the above that the present invention can collect the operating data of the serverless program in the container through the data collection sub-module in the container, and use the health diagnosis module to perform the health diagnosis results of the operating data. Adjust the resource of the container. In addition, the operational data is In addition to the data of the CPU, memory, network I/O or hard disk I/O, it also includes the user-defined data set by the serverless program and its quantization type, so it is consistent with the serverless Any data type related to the program can be used as a basis for health diagnosis. Therefore, the present invention can not only improve the usability of the serverless program, but also save waste of resources and reduce operating costs.
上述實施例係用以例示性說明本發明之原理及其功效,而非用於限制本發明。任何熟習此項技藝之人士均可在不違背本發明之精神及範疇下,對上述實施例進行修改。因此本發明之權利保護範圍,應如後述之申請專利範圍所列。 The above-mentioned embodiments are used to exemplify the principles and effects of the present invention, but not to limit the present invention. Anyone familiar with this technique can modify the above-mentioned embodiments without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the rights of the present invention should be listed in the scope of patent application described later.
101‧‧‧使用者介面 101‧‧‧User Interface
102‧‧‧數據管理模組 102‧‧‧Data Management Module
103‧‧‧無伺服器程式管控模組 103‧‧‧Serverless program control module
104‧‧‧健康度診斷模組 104‧‧‧Health Diagnosis Module
105‧‧‧容器 105‧‧‧Container
106‧‧‧數據收集子模組 106‧‧‧Data Collection Submodule
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108101013A TWI684347B (en) | 2019-01-10 | 2019-01-10 | System for automatically adjusting serverless function and method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW108101013A TWI684347B (en) | 2019-01-10 | 2019-01-10 | System for automatically adjusting serverless function and method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI684347B TWI684347B (en) | 2020-02-01 |
TW202027480A true TW202027480A (en) | 2020-07-16 |
Family
ID=70413246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW108101013A TWI684347B (en) | 2019-01-10 | 2019-01-10 | System for automatically adjusting serverless function and method thereof |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI684347B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI785931B (en) * | 2021-12-14 | 2022-12-01 | 中華電信股份有限公司 | System, method and computer readable medium for monitoring serverless running function process |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100481783C (en) * | 2007-04-20 | 2009-04-22 | 北京航空航天大学 | Control system of grid service container |
CN107797807B (en) * | 2016-08-29 | 2021-04-06 | 阿里巴巴集团控股有限公司 | Method, device, terminal, server and system for generating container |
TWI646435B (en) * | 2017-12-28 | 2019-01-01 | 中華電信股份有限公司 | Serverless system and execution method thereof |
-
2019
- 2019-01-10 TW TW108101013A patent/TWI684347B/en active
Also Published As
Publication number | Publication date |
---|---|
TWI684347B (en) | 2020-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10439900B2 (en) | Quality of service policy based load adaption | |
WO2021063339A1 (en) | Cluster resource scheduling method, apparatus, device and storage medium | |
WO2019141134A1 (en) | Data query method, apparatus and device | |
JP4912401B2 (en) | System and method for adaptively collecting performance and event information | |
US11204806B2 (en) | Systems and methods for user adaptive resource management | |
JP5744707B2 (en) | Computer-implemented method, computer program, and system for memory usage query governor (memory usage query governor) | |
US8595366B2 (en) | Method and system for dynamically creating and servicing master-slave pairs within and across switch fabrics of a portable computing device | |
WO2017028697A1 (en) | Method and device for growing or shrinking computer cluster | |
US9275102B2 (en) | System load query governor | |
US11726540B2 (en) | Usage scenario based monitoring and adjustment | |
WO2021093365A1 (en) | Gpu video memory management control method and related device | |
WO2021258753A1 (en) | Service processing method and apparatus, and electronic device and storage medium | |
WO2020253111A1 (en) | Automatic expansion method and apparatus for blockchain node, and operation and maintenance terminal and storage medium | |
CN112131005B (en) | Resource adjustment strategy determination method and device | |
TW201743223A (en) | Self-adaptive resource allocation method and device | |
WO2018166297A1 (en) | Cache allocation method and device | |
DE102020102783A1 (en) | METHODS AND DEVICES FOR IMPROVING A PERFORMANCE DATA COLLECTION OF A HIGH PERFORMANCE CALCULATION APPLICATION | |
CN111858034B (en) | Resource management method, system, device and medium | |
Han et al. | E3: Energy-efficient engine for frame rate adaptation on smartphones | |
WO2022016845A1 (en) | Multi-node monitoring method and apparatus, electronic device, and storage medium | |
CN107402863B (en) | Method and equipment for processing logs of service system through log system | |
CN112835698A (en) | Heterogeneous cluster-based dynamic load balancing method for request classification processing | |
US20220300323A1 (en) | Job Scheduling Method and Job Scheduling Apparatus | |
JP3993848B2 (en) | Computer apparatus and computer apparatus control method | |
CN105242955B (en) | A kind of magnetic disk of virtual machine input/output scheduling method and system |