Skip to content
Back to shipped records
Client: Internal / Self-Hosted Web Platform/Industry: Cloud & Developer Infrastructure/Engineering Lead:Hammad MajidHammad Majid

HostGrid

We built a Go utility to host static sites and route domain headers directly to disk paths in 2ms.

Key OutcomeProxy

routing and file delivery from NVMe SSDs takes under 2ms.

Key OutcomeEach

process runs within a 15MB binary with minimal idle RAM usage.

The Failure / Problem

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.

The Resolution / Solution

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

1

API Handler: We wrote a Go HTTP router using net/http to handle file uploads and user profiles.

2

Build Daemon: We wrote a SQLite polling loop that triggers a Markdown compile job using Goldmark.

3

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.

Have a system that needs scaling?Initiate Brief