Runtime
The Edge Connector runtime is the long-running process that keeps your environment connected to the nara platform. Most users only need to know how it starts, how it reconnects, how it receives updates, and how to check whether it is healthy.
Startup sequence
Section titled “Startup sequence”When the runtime starts, it typically:
-
Loads configuration
It reads the local configuration and applies any environment overrides.
-
Authenticates
It uses the saved token or deployment credentials to connect the installation to your organization.
-
Loads local or assigned implementations
Built-in diagnostics are available automatically. Custom edge implementations are loaded from the configured bundle or local implementation directory.
-
Connects to the platform
It establishes the WebSocket connection used for tool execution and status reporting.
-
Starts health reporting and sync
The runtime begins heartbeats, exposes health endpoints, and checks for bundle updates.
WebSocket connection
Section titled “WebSocket connection”The Edge Connector maintains a persistent WebSocket connection to the platform. This connection is used for tool execution requests, results, heartbeats, and update signals.
When the connection succeeds, the platform knows which edge-backed tools are available through this runtime.
Reconnection logic
Section titled “Reconnection logic”If the WebSocket connection drops, the runtime automatically retries with backoff. Once it reconnects, it re-registers its available tools and resumes normal operation.
Heartbeat mechanism
Section titled “Heartbeat mechanism”The runtime sends periodic heartbeats to the platform server so the platform can tell whether the connection is still alive.
- Liveness detection
- Connection maintenance through intermediaries such as proxies or load balancers
Bundle sync
Section titled “Bundle sync”The runtime periodically checks for updated bundles from the platform and downloads them automatically when needed.
Typical behavior:
- An initial sync happens if local implementations are missing
- Periodic checks look for new bundle versions
- A newly assigned bundle is loaded and registered without manual file management
Local webhook relay
Section titled “Local webhook relay”For local-hosted integrations, the runtime can accept provider webhooks locally and relay them to the platform over the authenticated Tool RPC connection.
Choose the relay exposure mode based on where the provider runs:
- Provider on the same LAN: this is the default. The relay listens on the LAN interface and provisioning uses the edge host address. Run it only on a trusted network or behind host firewall rules that allow the provider to reach the relay.
- Provider on the same host as the Edge Connector only: set
NARA_LOCAL_HOSTING_WEBHOOK_RELAY_EXPOSE_LAN=0to force loopback-only relay URLs. - Provider cannot reach the edge host: do not enable edge-relay webhook delivery. Use cloud-public webhook delivery or polling fallback.
If the provider base URL is not loopback and loopback-only mode is explicitly enabled, the platform rejects edge-relay webhook provisioning. This prevents registering an unreachable 127.0.0.1 webhook URL.
Health monitoring
Section titled “Health monitoring”The runtime exposes an HTTP health server for monitoring and orchestration.
Common endpoints:
| Endpoint | Purpose |
|---|---|
GET /livez | Confirms the process is running |
GET /healthz | Confirms the runtime is ready |
GET /statusz | Returns a more detailed operational view |
# Quick health checkcurl http://localhost:8080/healthz
# Detailed statuscurl http://localhost:8080/statuszGraceful shutdown
Section titled “Graceful shutdown”The Edge Connector supports graceful shutdown and tries to stop cleanly so the connection, state, and process lock are released correctly.
- It stops accepting new work.
- It closes the platform connection.
- It releases local runtime state and locks.
- It exits cleanly.