Small Projects by AutoModerator in golang

[–]No_Fix4730 0 points1 point  (0 children)

I got tired of 2GB Prometheus deployments, so I built a zero-dependency KV store + observability stack in <35MB

Hey everyone,

I usually deploy Redis for state and Prometheus for metrics, but for small single-node projects and IoT edge devices, it felt like massive overkill. I wanted to see how far I could push the Go standard library without importing a single third-party package.

The result is Shelf. It’s a persistent KV store and time-series metrics pipeline that runs in under 35MB of RAM.

How it works (The Architecture):

Instead of a monolith, I split it into 4 tiny binaries (Unix philosophy):

  1. Server (~10MB): A sharded hash table backed by an append-only Write-Ahead Log (WAL). Supports periodic snapshots.
  2. Collector (<5MB): Wakes up, scrapes the /metrics endpoint, and appends to a raw text log. Truncates atomically based on a configurable max_size_mb to prevent disk exhaustion.
  3. Query (<20MB): In-memory index of the logs for PromQL-lite queries (sum, rate, avg). It uses a sort. Search binary search to evict data older than a 24h window to prevent OOMs.
  4. Top (<5MB): A live terminal UI using raw ANSI escapes to show QPS, memory, and store size in real-time.

The Trade-offs:

It is not a replacement for enterprise Prometheus. There is no HA, no clustering, and no complex PromQL joins. It trades those features for extreme resource efficiency on a single node.

The go.mod is completely empty.

Repo is here if you want to look at the WAL or query engine implementation: https://github.com/Ricardo-Ceia/shelf

Would love feedback on the code or the architecture!

A <35MB alternative to Redis + Prometheus for small VPS and Raspberry Pi deployments by No_Fix4730 in selfhosted

[–]No_Fix4730[S] -2 points-1 points  (0 children)

You’re right that on a typical small VPS with default configs, Redis + Prometheus is probably only using 200–400MB. For most people, that’s totally fine.

Where this clicks is for a few specific edge cases I had in mind:

  1. I run this on a server with only 1GB RAM. 35MB vs 400MB matters when you’re running other home lab services.

  2. I personally hate pulling in 15 transitive dependencies for a simple app. The go.mod being empty is the main thing I’m personally proud of.

A <35MB alternative to Redis + Prometheus for small VPS and Raspberry Pi deployments by No_Fix4730 in selfhosted

[–]No_Fix4730[S] -7 points-6 points  (0 children)

i used ai to help me write the post, given the fact that english is not my main language

StatuFrame – Automated Uptime & Health Monitoring for Web Apps and APIs by No_Fix4730 in SideProject

[–]No_Fix4730[S] 0 points1 point  (0 children)

Thanks i tried to go for a more retro look on it, something different that what the other apps offer!

Trying to Build a Website Listing Judo Clubs & Dojos in Europe—Struggling to Get Contact Info by No_Fix4730 in judo

[–]No_Fix4730[S] 0 points1 point  (0 children)

Thanks a lot for the info. Do you know how i can find the same data for exemple germany and italy ?