Basic Configuration Check
Rule Details
Parameter |
Description |
---|---|
Rule Name |
function-graph-settings-check |
Identifier |
Basic Configuration Check |
Description |
If the runtime, timeout, or memory limit of a function is outside the specified ranges, this function is non-compliant. |
Tag |
fgs |
Trigger Type |
Configuration change |
Filter Type |
fgs.functions |
Rule Parameters |
|
Application Scenarios
You need to check the runtime, execution timeout, and memory specifications of a FunctionGraph function, because these configurations affect the function performance, cost, and reliability. To be specific:
- The runtime determines the environment (such as Python, Node.js, and Java) in which the function runs. The runtime must match the programming language. Otherwise, the function cannot be executed.
- Runtimes support different language features or libraries. If your runtime version is not compatible, the code may fail to run or behave abnormally.
- Outdated runtimes may have security vulnerabilities. Selecting the latest runtime can avoid potential risks.
- The execution timeout determines the maximum execution duration of a function. If the execution timeout is too short, the function may be forcibly terminated before it is complete. If the execution timeout is too long, resources may be wasted or costs may increase.
- If memory is insufficient, functions may be executed slowly or fail, while idle memory resources may be wasted.
Solution
When creating an event function, select the correct runtime. When configuring basic settings of a function, set proper execution timeout and memory.
Rule Logic
- If the runtime of a FunctionGraph function is not one of the specified runtimes, this function is non-compliant.
- If the execution timeout of a FunctionGraph function is longer than the specified timeout, this function is non-compliant.
- If the memory size of a FunctionGraph function is greater than the specified memory size, this function is non-compliant.
- If a function does not meet any of the above conditions, this function is non-compliant.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot