HTTP Readiness Checks on Raseef: A Practical Node.js Guide

Build a meaningful HTTP readiness endpoint, reproduce the TCP startup gap, configure Raseef checks and troubleshoot redirects, 503s and rollout limits.

An open port does not mean your app is ready

Your Node.js process starts, opens its HTTP port, then loads configuration or initializes a database connection. A TCP connection can succeed during that gap even though real requests still fail. For a team deploying a SaaS API, the useful question is not “did the container start?” but “can this revision serve the requests we are about to send it?”

Raseef supports Process, TCP and HTTP readiness checks. Its current documentation says GitHub-built services check their port by default. An HTTP endpoint gives you a more deliberate startup gate—but only if it reports meaningful readiness.

This guide includes a locally executed, reproducible Node.js example. Platform behavior below is sourced from Raseef's current documentation, not a newly observed production rollout. The cover is a generated conceptual illustration, not dashboard evidence.

Choose what success actually means

According to Raseef's deployment documentation:

CheckWhat passesWhat it cannot establish
ProcessThe container has startedYour HTTP handler or dependencies are usable
TCPThe configured port accepts connectionsRequests receive useful responses
HTTPGET on the health path returns 200–399A redirect or a shallow endpoint may still conceal failure

The documented check interval is five seconds. HTTP success includes redirects: a 302 to a login page is therefore a poor readiness signal. Use a dedicated path such as /healthz that returns 200 only after required startup work completes, and 503 while it is unfinished.

Do not put this route behind login middleware or redirect it to a localized homepage. Keep its response small and generic. Never return credentials, connection strings or detailed dependency errors.

Reproduce the startup gap with Node.js

Save the following as server.mjs. It needs no npm packages. The timer deliberately simulates initialization; it is not a database test or a recommended production readiness strategy.

import http from 'node:http';
const port = Number(process.env.PORT ?? 3000);
let ready = false;
const server = http.createServer((req, res) => {
  res.setHeader('Content-Type', 'text/plain; charset=utf-8');
  res.setHeader('Cache-Control', 'no-store');
  if (req.url === '/healthz') {
    res.statusCode = ready ? 200 : 503;
    return res.end(ready ? 'ready\n' : 'starting\n');
  }
  if (req.url === '/login') {
    res.statusCode = 302;
    res.setHeader('Location', '/sign-in');
    return res.end();
  }
  res.statusCode = ready ? 200 : 503;
  res.end(ready ? 'app ready\n' : 'starting\n');
});
server.listen(port, '0.0.0.0', () => {
  console.log('listening');
  // Demonstration only: replace with real initialization.
  setTimeout(() => { ready = true; }, 1500);
});
process.on('SIGTERM', () => server.close());

Run it in one terminal:

PORT=3000 node server.mjs

In another terminal, run these requests immediately after startup, then repeat the health request after initialization:

curl -i http://127.0.0.1:3000/healthz
curl -i http://127.0.0.1:3000/login
curl -i http://127.0.0.1:3000/healthz

Do not use curl -L for the redirect check: you want to see the original status, not the destination. If typing takes longer than the simulated delay, restart the app and increase that delay, or automate the requests.

We executed this example locally on 16 November 2026 with Node.js v26.8.2. A test runner waited for the listening event, connected over TCP, requested both paths, waited 1.8 seconds, then requested the health path again.

ObservationActual result
TCP connection immediately after listeningAccepted
Early GET /healthz503, starting
GET /login without following redirects302, Location: /sign-in
Later GET /healthz200, ready

The 1.5-second simulated initialization and 1.8-second test wait are test inputs, not measured Raseef latency. This proves the example's distinction between listening and readiness; it does not measure platform downtime, capacity or routing behavior.

Replace the timer with a real startup contract

In production, set readiness only after the initialization required for useful requests has succeeded. For a database-backed API that may mean establishing the connection pool and executing a small bounded query. Fail startup or remain unready if that work fails; log the underlying reason privately.

Avoid checking every optional integration on every health request. An unavailable email provider should not necessarily block an API that can queue email and still serve users. Conversely, an API that cannot answer anything without its primary database should not claim readiness merely because its HTTP server exists.

Make dependency checks bounded and avoid expensive queries, writes or migrations in the health handler. A stored readiness flag is cheap, but a startup-only flag does not detect later dependency failures. Design ongoing monitoring separately. The deployment documentation describes a rollout gate; do not assume it promises every continuous health-management behavior your application needs.

Configure the Raseef deployment

  1. Confirm the application listens on 0.0.0.0 and the port configured for the service. Keep the app's PORT value and service port consistent.
  2. In the service settings, choose HTTP under Readiness check and set Health path to /healthz.
  3. Save, then deploy. Saved settings do not change the running revision by themselves.
  4. Follow Deployments and Logs. Confirm initialization finishes without exposing secrets in logs.
  5. After deployment, request the public HTTPS health URL and one representative application route. A healthy endpoint alone is not an end-to-end acceptance test.

Raseef documents health paths beginning with /, followed by letters, digits, slashes, underscores or hyphens, with up to 128 characters after the initial slash. Keep the path simple rather than adding query parameters.

For initial service creation, see deploying a GitHub application on Raseef. For a saved value that never reaches the app, see save, deploy and restart behavior for environment variables.

Diagnose failures without weakening the check

SymptomCheck next
Local health request succeeds, deployment does notBinding address, configured port, exact path and running revision
Health endpoint returns 301 or 302Authentication, HTTPS enforcement or locale redirects; return a direct readiness response
Health endpoint stays at 503Startup logs and mandatory dependency initialization
Readiness passes but business requests failEndpoint is too shallow, or the affected business path was not tested
Public endpoint returns an errorSeparate gateway behavior from your application's response

Raseef's public HTTP documentation distinguishes gateway 503 for an unreachable app, 502 for an invalid reply or oversized response headers, and 504 when the app does not begin answering in time. An application-generated 503 from this example is not automatically a gateway failure. Inspect response content and logs together.

Know the rollout and rollback boundaries

For a normal rolling deployment, Raseef documents starting a new replica alongside the running version and moving traffic after readiness passes. That is not a universal zero-downtime guarantee: services with a volume stop the old replica before starting the new one, and a short interruption is expected.

Rollback restores a previous revision's settings and image, not database or volume contents. A healthy endpoint cannot make a destructive schema migration reversible. Keep database changes compatible with both old and new application versions during an overlap, and plan data recovery independently.

Raseef currently offers a private pilot. If you want to evaluate this deployment workflow for your application, request access.

Sources and evidence scope

Sources checked on 16 November 2026. The experiment was local and dependency-free; no customer system, production traffic or platform performance measurement was involved.