Understand Serverless Functions
Serverless Functions provide a lightweight way to run custom logic inside the GlobalAI platform. They let you execute discrete operations, such as data processing or external system calls, without provisioning or managing dedicated servers.
The Infrastructure module manages Functions and typically executes them from automation workflows when a workflow requires specific logic.
Purpose of serverless functions
Serverless Functions handle focused computational tasks within a larger automation flow.
- Workflows control the sequence of steps.
- Functions execute the logic at individual steps.
This separation lets workflows remain readable and declarative, while reusable functions encapsulate complex logic.
OpenFaaS-based execution
GlobalAI uses OpenFaaS to provide its serverless capabilities. You define Functions as container images compatible with OpenFaaS and run them within your own infrastructure.
This approach lets you:
- Run functions on-premise or in a private cloud
- Avoid reliance on public cloud serverless services
- Maintain control over data residency and security
While similar in concept to cloud services such as AWS (Amazon Web Services) Lambda or Azure Functions, GlobalAI functions run entirely within your managed infrastructure.
Key capabilities
Serverless Functions support the following capabilities:
-
On-premise execution: Functions run inside your own network or data center, using infrastructure you control.
-
OpenFaaS compatibility: You can use standard OpenFaaS container images to define and deploy functions.
-
Resource configuration: Define CPU and memory limits per function to control resource usage.
-
Interactive testing: Execute Functions directly from the platform using the Run action to check inputs and outputs.
-
Schema definition: Define input and output schemas using JSON Schema to enable smooth integration with workflow nodes and clear data contracts.
Common use cases
Serverless Functions are commonly used for:
-
Data transformation: Reformat, check, or enrich data passed between workflow steps.
-
System integration: Connect to external or legacy systems that don't have native integrations.
-
Operational logic: Retrieve infrastructure or runtime information and use it to influence workflow behavior.
-
Reusable computations: Encapsulate complex logic, such as calculations or database updates, into a single reusable function.
Related articles
Now that you understand how Serverless Functions work, explore how to create and use them in practice.