Documentation
How PhotonHTTP is put together, how to pick the parts you need, how to run it on a Mac for static and dynamic websites, and how each protocol works.
Start here
Getting startedInstall the photon command with one line and serve any folder as a static website with photon serve.
Overview and architectureCore and optional components, HTTP/1.1, HTTP/2 and HTTP/3, the transports, the concurrency model and the handler chain.
Run a site
Running on a MacThe photon command line and control commands, the complete http-config.json reference, certificates, public binding, LaunchAgents, logs, reload, restart and shutdown.
Running on LinuxWhat works on Linux, building a static or an Ubuntu binary from the Mac, HTTPS and HTTP/3 with certbot, firewalls, systemd, tests.
Static websitesStaticFiles, caching and conditional requests, Range, error pages, compression, virtual hosts and authentication.
Dynamic websitesIn-process Swift with Router and WebSockets; reverse proxy to local apps; Apache mod_proxy mapping; a production checklist.
TLSPKCS#12 identities loaded in memory (never the keychain), ALPN and protocol selection, versions and options, getting certificates, testing safely.
Let's Encrypt certificatesThe built-in ACME client: tls.acme, port 80, staging first, rate limits, the state folder, startup modes, redirect, ARI renewal, photon cert status and renew, troubleshooting.
Protocols
HTTP/1.1The request lifecycle, keep-alive and pipelining, bodies and chunked coding, every limit and timeout, error codes and smuggling defences.
HTTP/3QUIC from Network.framework (ngtcp2 on Linux), Alt-Svc discovery, streams and QPACK, limits and abuse defences, known limitations, testing with curl.
WebSocketsIn-process endpoints, the message API, the handshake over HTTP/1.1, HTTP/2 and HTTP/3, permessage-deflate, limits, close codes and proxying.
Build your own server
Choosing componentsEvery target and library product, what it depends on and when to include it; building your own server as a Swift package.
Performance notesBenchmark results against nginx, lighttpd, h2o, Apache and Caddy, per-request costs, and what they mean for configuration.
More
Design and project records live in the repository: ROADMAP (the design, authoritative), MIDDLEWARE, SERVER-COMPARISON and benchmarks.