Engineering notes
How we serve 850,000 static pages from one small server
Dietly serves more than 850,000 food pages by writing them as ordinary HTML ahead of time, then letting Caddy and Cloudflare do the cheap work of delivering them. The web server does not need to calculate nutrition or render a page for a reader. It usually just returns a file.
The decision was mostly about failure modes
A food page is a very stable thing. It has a product name, a nutrition panel, a source and links to related foods. Rendering that page during every request adds database pressure and makes an otherwise simple visit depend on the API, the database connection pool and application startup. It also gives a crawler a more complicated route through the system than it needs.






