HostGrid
We built a Go utility to host static sites and route domain headers directly to disk paths in 2ms.
routing and file delivery from NVMe SSDs takes under 2ms.
process runs within a 15MB binary with minimal idle RAM usage.
System Bottlenecks
Subscription costs for public cloud static hosting platforms scale rapidly. Setting up private staging sites usually requires complex Kubernetes clusters or manual DNS and web server configurations.
Architectural Move
We wrote HostGrid in Go. The tool runs as three separate processes: a web API, a worker that converts Markdown files to HTML, and a proxy that routes subdomain requests to built folders on disk.
Execution Path
API Handler: We wrote a Go HTTP router using net/http to handle file uploads and user profiles.
Build Daemon: We wrote a SQLite polling loop that triggers a Markdown compile job using Goldmark.
Reverse Proxy: We built a custom proxy that maps incoming subdomain hosts to storage folders.
"The tool lets us launch staging sites on our own VM instantly, avoiding public hosting fees."
— Syed Ahsan, Infrastructure Architect
Core Stack
- Go (Multi-binary architecture)
- SQLite (Shared coordination state)
- Goldmark (Markdown compilation)
- JWT Authentication
Under-the-hood Challenge
Routing requests to uploaded folders instantly without restarting the reverse proxy process. We solved this by parsing host headers in real time, extracting the user and project names, and mapping them to `/storage/{user_id}/{project_id}/build/` without relying on dynamic routing tables.
HostGrid hosting features run without container clusters or dynamic server reloads. By using Go’s standard library net/http package, the system runs static staging sites on a single low-cost virtual machine.