NanumOS

NanumFlare edge — a cache and guard in front of your site

What it is

The NanumFlare edge stands between visitors and the real site (the origin server). Visitors only talk to the edge; it keeps what it fetched from the origin (a cache) and hands it straight to the next visitor. It pauses an address that knocks too often, and when the origin is down it shows a "We can't reach this site right now" page. acme gets its HTTPS certificate. Add -E to NanumOS's web server (httpsd) to turn it on.

Basics

Think of a library's lending desk. Visitors only come to the desk; the desk keeps the most-asked books (pictures, videos, fonts) on a shelf beside it and hands them out without walking to the stacks (the origin). When the stacks close for a in the terminal to see whether the edge is running (no file = not turned on yet).

How to use it

How it works

  1. A visitor asks for https://www.example.org/picture.png; httpsd opens the TLS and looks at the Host. A name that is not in the file is never passed on — so the edge is not an "open proxy" that fetches any address for anyone. A request that names a whole address (GET http://elsewhere/) is refused with 400.
  2. In the cache and still fresh: answered at once (HIT). Otherwise one HTTP/1.0 request goes to the origin (with X-Forwarded-For and X-Forwarded-Proto), and the answer flows to the visitor while it is kept. When several visitors ask for the same thing at once, they read the one fetch together.
  3. The origin's Cache-Control decides what is kept: no-store, private, no-cache, Set-Cookie and logged-in requests are not; s-maxage, then max-age, then (no Cache-Control) static files like pictures, fonts and video for ttl. immutable or a hashed name: a year, and the browser is told it may keep it a year too.
  4. Video is asked for in pieces (Range). Even the first time the edge fetches the whole file from the origin and hands out the piece asked for first (206); once it has it all, the next pieces come from the edge.
  5. Guarding: requests per second are counted per address (over it: 429 and "Too many requests"). A slow visitor that does not send its whole header in 5 seconds is cut off (slowloris). One address is served on at most 16 connections at once; a few more from it wait their turn (a proxy or a shared office line is many people), and an address that holds its connections without sending is cut off at once. An origin that does not answer in 10 seconds gives 504, one that cannot be reached 502, with the friendly page — or the last copy (STALE) when there is one.
  6. DNS-01 certificates: hand _acme-challenge.www.example.org to this device's NanumDNS (one NS line in the parent zone); acme writes a TXT line into that zone file, dnsd reads it again within a second, acme asks this device's port 53 to see it, then tells Let's Encrypt to check. The line is removed afterwards. Port 80 is not needed.
Technical details
  • Code: user/cmds/edge.h (inside httpd.c, -E), user/tls/acme.c (--dns-zone), the check row user/zeus/zeus.py edge_row. Contract docs/contracts/EDGE.md.
  • Limits today: only GET and HEAD are passed on (no POST, no WebSocket), the origin is an IPv4 address, the cache is in memory (empty after a restart), and a large attack is absorbed only up to the rented line's size (not a network spread over the world).

Frequently asked

NanumOS 0.1.15511 · 2026-11-25