All Docs
FeaturesCalmony Sanctions MonitorUpdated March 12, 2026

Faster Health Checks with Edge Runtime

Faster Health Checks with Edge Runtime

Release: v0.1.158 · Control: PERF-21

Overview

Starting with v0.1.158, the platform's lightweight API routes run on the Edge Runtime instead of standard Node.js serverless functions. This delivers significantly faster response times for infrastructure-level endpoints that are polled frequently by load balancers, uptime monitors, and orchestration tooling.

Affected endpoints

EndpointPurposeRuntime (before)Runtime (after)
GET /api/healthLiveness checkNode.jsEdge
GET /api/readyReadiness checkNode.jsEdge
GET /api/cookie-consentCookie consent stateNode.jsEdge

Expected performance

  • Response time: sub-10 ms end-to-end for clients geographically close to an edge node
  • Cold starts: near-zero — edge functions do not experience the same cold-start delays as Node.js lambdas
  • Availability: requests are routed to the nearest edge location automatically

What is the Edge Runtime?

The Edge Runtime is a lightweight JavaScript environment based on Web APIs (e.g. fetch, Request, Response). It starts faster and runs closer to end users than a traditional Node.js serverless function, but has a smaller API surface — Node.js built-ins such as fs, net, and crypto are not available.

Before migrating, each of the three routes above was audited to confirm:

  1. No database connections are opened
  2. No Node.js-specific APIs are used
  3. The response is a simple, stateless JSON payload

All three routes met these criteria and are fully compatible with the Edge Runtime.

Routes not affected

API routes that interact with the database — including OFSI list screening, case management, and monitoring endpoints — continue to run on the Node.js runtime. These routes require database drivers and server-side libraries that are incompatible with the Edge Runtime and should not be migrated.

Implementation detail

Migration requires a single export added to each route file:

// src/app/api/health/route.ts
export const runtime = 'edge'

export async function GET() {
  return Response.json({ status: 'ok' })
}

No changes are required to calling code, infrastructure configuration, or environment variables — the runtime switch is transparent to consumers of these endpoints.