Hybrid Runner environment variables reference
There are additional settings that can be configured through the use of these additional docker run environment variables.
BODY_LIMIT
Define the maximum request body size. The default value is 30mb.
CUSTOM_API_ROUTE
Define additional path location to the resources in hybrid runner.
Example: If this value is set to mypath/torun then the call to v3/execute would change from http://localhost:3000/mytenant/api/v3/execute to http://localhost:3000/mypath/torun/mytenant/api/v3/execute.
PORT
Set the service listening port. The default value is 3000.
UPLOAD_ENABLE
Allow Wasms to be uploaded to the Hybrid Runner directly using the /upload endpoint. This is not recommended to be used for production. The default value is false.
Manage access to filesystem
By default, the runner requires read-write permissions to the following paths.
Tenant resolver
/project/src/app/src/tenant_resolver
Purpose: Stores dynamically generated tenant-specific resolver JavaScript files.
Write pattern: Created once per tenant on the first request, rarely modified thereafter.
Example: externalResolver_<tenant_name>.js
Service map cache
/project/src/app/src/services/servicemap
From nodegen-server 1.50.1 and onwards
/project/src/app/src/servicemap
Purpose: Caches service metadata (servicemap.json) to resolve models. This avoids repeated directory scanning.
Write pattern: Generated on application startup in offline mode. Recreated when model location changes.
Files created: servicemap.json
Temporary file storage
/tmp
Purpose: Store and caches Wasm. This is used by Node.js as the tmp library working directory.
Write pattern: Frequent writes during model downloads, cleaned up by graceful cleanup handlers.
Cleanup: Periodic cleanup of files older than 7 days.
In nodegen-server versions >=1.50.2, the locations of these paths can be customized using environment variables. If the account does not have read-write permissions to the locations above, this can be used to adjust the default paths.
CACHE_DIR
Cache write directory for Tenant resolver and Service map cache.
Default value are the paths noted above.
To set an absolute path, start the path using
/, e.g./var/runner_cache.To set a relative path within the working directory, start the path using an eligible folder character, e.g.
runner_cachewould be set to./runner_cache.
TEMP_DIR
Temporary file storage directory.
Default value is the path noted above.
To set an absolute path, start the path using
/, e.g./tmp.To set a relative path within the working directory, start the path using an eligible folder character, e.g.
tmpwould be set to./tmp.
Control log output
In nodegen-server versions >=1.50.2, more variables are available to manage log output.
LOG_PATH
Default: Logs are recorded to stdout only.
When defined, logs are saved to the defined location.
To set an absolute path, start the path using
/, e.g./var/runner_logs.To set a relative path within the working directory, start the path using an eligible folder character, e.g.
runner_logswould be set to./runner_logs.
LOG_ROTATION_ENABLED
Default: true
This removes files that exceed the maximum log storage criteria.
LOG_MAX_SIZE
Default: 10M
Maximum file size before rotation:
Kfor kilobytes.Mfor megabytes.Gfor gigabytes.
LOG_ROTATION_INTERVAL
Default: 1d
Time-based rotation interval:
hfor hours.dfor days.Mfor months.
LOG_MAX_FILES
Default: 14
Maximum number of rotated log files to keep.
LOG_COMPRESSION
Default: false
Whether gzip compression is used on the log files.
Configure OpenTelemetry
Starting from nodegen-server versions >=1.46.0, the image implements support for OpenTelemetry. OpenTelemetry is an observability framework and toolkit to facilitate the generation, export, collection of telemetry data. The package conducts auto-instrumentation using @opentelemetry/auto-instrumentations-node. The data collected includes:
HTTP request/response details
Route information
Request duration
Error details
Correlation IDs
Tenant information
Request counts
Error rates
Request duration
Memory usage (heap, RSS)
Service name and version
Environment
HTTP method and route
Status codes
Request IDs
Below are links to documentation on integrating OpenTelemetry with popular Application Performance Monitoring (APM) applications:
Amazon CloudWatch: OpenTelemetry
Azure App Insights: Application Insights with OpenTelemetry
Elastic: What is OpenTelemetry? and Use OpenTelemetry with APM
The configuration of OpenTelemetry in the hybrid runner is managed through environment variables defined in the Docker container. Information on the relevant environment variables can be found in:
Key configuration variables include:
OTEL_SDK_DISABLED
Disable the SDK for all signals.
OTEL_SERVICE_NAME
Sets the value of the service.name resource attribute.
OTEL_RESOURCE_ATTRIBUTES
Key-value pairs to be used as resource attributes.
OTEL_EXPORTER_OTLP_ENDPOINT
If using the OpenTelemetry Protocol Exporter:
Target to which the exporter is going to send spans, metrics, or logs.
OTEL_EXPORTER_OTLP_HEADERS
If using the OpenTelemetry Protocol Exporter:
Key-value pairs to be used as headers associated with gRPC or HTTP requests.
Manage compatible Neuron versions
The compatibility feature in the runner is included in nodegen-server >=1.3.0.
Neuron compiler versions >=1.22.1 embed the compiler version into the ZIP package. If this feature is enabled and compiler version cannot be found, then the runner assume the Neuron version will be compatible.
The list of Neuron compatibility versions that can be found in the repository nodegen-server-compatibility.
nodegen-server also has the ability to check whether Neuron Wasms are supported by the version of the runner you are using. This is done by downloading the JSON file from nodegen-server-compatibility and assessing it against the versions of the runner and the requested Wasm. This can only be done with an online connection to fetch the necessary compatibility files.
This can be configured through the use of these additional docker run environment variables.
NODEGEN_COMPATIBILITY_BASE_URL
Base URL for Github user content.
https://raw.githubusercontent.com
NODEGEN_COMPATIBILITY_PATH
Path to the JSON document in nodegen-server-compatibility.
/Coherent-Partners/nodegen-server-compatibility/main/nodegen-server-compatibility.json
CHECK_RUNNER_COMPATIBILITY
true or false
Whether to check if the version of the runner supports this version of Neuron. The default value is false.
EXECUTE_WITH_WARNING
true or false
If CHECK_RUNNER_COMPATIBILITY is true, this defines whether or not to continue with executing the Spark service but with a warning. The default value is false.
NODEGEN_COMPATIBILITY_LIST_REFRESH_INTERVAL
If CHECK_RUNNER_COMPATIBILITY is true, this defines how often in minutes to fetch the nodegen-server-compatibility JSON document. The default value is 1440.
Last updated
