Skip to content

How requests reach your app

Your app doesn't run on a server you rent. It runs on Cloudflare's network, in the data center closest to each visitor.

The path of a request

  1. The visitor's browser resolves your domain. *.hiraiship.app domains, and custom domains pointed at Hiraiship, lead to Cloudflare.
  2. Hiraiship's router, which runs at the edge too, looks up which project and environment the hostname belongs to.
  3. The request goes to your environment's current deployment:
    • static files (a Vite build, a static site, a Rasengan.js client build) are served directly;
    • code (a Hono or Futon backend, a server-rendered Rasengan.js app) runs as a Cloudflare Worker, with your environment variables available to it.

There's no origin server and no cold start of a container: a Worker starts in milliseconds.

When the router answers itself

Some requests never reach your code:

SituationResponse
The hostname is a redirectThe redirect, with the path and query kept
No project uses the hostname404
The environment is hibernated503, a "Waking up…" page that reloads by itself
The environment is paused503, "Site paused"
The workspace is suspended429 or 402, depending on the reason

What your code runs on

A Worker is not Node.js, though it supports most of what an app needs:

  • web standards: fetch, Request, Response, URL, Web Crypto, streams;
  • Node.js built-in modules through Cloudflare's compatibility layer (node:buffer, node:crypto and most others);
  • no file system, and no long-running process: each request is handled, then the Worker can be stopped.

Each request has a CPU time budget and a number of outgoing requests it can make, set by your plan. See Limits.