انتقل إلى المحتوى
#0906
DaemonContainers

Which feature is eating the box is a GET

Twenty product features, twenty daemon programs across the containers on one $29 box. The engineering manager wants to know which one justifies the second server. GET /api/v1/daemon/programs?include_stats=true on each container returns, per running program, cpu_percent, memory_rss_bytes, process_count, and a per-process breakdown. A short script sums it across the fleet and sorts. The PDF renderer is 41% of memory. The feature everyone argued about is 2%.

Per-service cost attribution normally means a metrics pipeline, a tagging convention nobody follows, and a dashboard someone maintains. Here every container's process manager already exposes the numbers, and the box is flat-rate, so the question isn't what a feature costs: it's what fraction of the metal it holds.

Capacity planning used to be a feeling. Now it's a sorted list from twenty GETs.

The cost of a feature is its share of the box, and the box reports it.