Skip to content

Serverless Functions ​

Run code on demand without managing a server. Each invocation executes in its own Firecracker microVM — the same lightweight-VM technology AWS Lambda is built on — giving you strong isolation with sub-second cold starts, billed per invocation.

Supported runtimes ​

RuntimeVersion
Python3.12
Node.js20
Go1.22

The create form in the console lists the runtimes currently available (ListFunctionsRuntimes over the gRPC API).

Creating a function ​

  1. Open Functions → Create.
  2. Pick a runtime and give the function a name.
  3. Write or paste your code:
    • Python / Node.js — a handler that receives the event and returns a JSON-serializable result.
    • Go — a full package main; the event JSON arrives on stdin, the result JSON is written to stdout.
  4. Choose a region and memory allocation.
  5. Deploy. The function is ready to invoke within seconds.

Invoking ​

Every deployed function gets its own public HTTPS endpoint on a dedicated subdomain, served by an autonomous edge invoker that keeps answering even if the control plane is down:

bash
curl -X POST https://{slug}.fn.aralcloud.uz -d '{"name": "world"}'

If Require API key is enabled for the function, pass the key with the request:

bash
curl -X POST https://{slug}.fn.aralcloud.uz \
  -H "X-Api-Key: $FN_API_KEY" \
  -d '{"name": "world"}'

The key can be rotated or revoked at any time from the function's Triggers tab. For a quick manual run, use the Test action in the console; programmatic management and invocation go through the signed gRPC API (nexlayer.function.v1.FunctionService, e.g. CreateFunctionsInvoke). The old control-plane REST trigger (/api/v1/fn/{trigger_token}) has been retired.

Cold starts ​

A cold invocation boots a fresh microVM in roughly 250–400ms before your code runs — fast enough for most request/response workloads. Runtimes are pre-baked images, so there's no dependency-install step at boot.

Billing ​

Functions are metered in GB-seconds — memory allocated × execution time. Nothing is charged while a function is idle; you only pay for the milliseconds your code actually runs. Usage is visible per function under Metrics.

Logs and errors ​

Each invocation's stdout/stderr and exit status are recorded and viewable from the function's Invocations tab, including full tracebacks on runtime errors.

See also ​