It does in the sense that an HTTP connection (either on the server or the client side) will expend roughly 20 times the CPU and buffers than generating or handling a single UDP packet. It all adds up on small systems.
back
1 comments
You'd usually transfer many metrics in a single HTTP request, so the cost is amortized in most cases.
I can pack a lot on a UDP packet as well...
Not sure if this is what you're comparing it to, but be aware that Prometheus' approach is fundamentally different from StatsD-like approaches where you send every event or a subsampling thereof to a monitoring server.
Prometheus is state-based, not event-based. It only stops by your monitored instances once every couple of seconds and gathers their current state. E.g. for counting events, clients simply expose cumulative counters over their lifetime which they can increment locally in memory, and Prometheus comes by for example every 15 or 30 seconds and stores the current counter state.
The HTTP traffic incurred in this case is not really a problem and you'll usually run into bottlenecks at other places (like storage sample ingestion) before you run into network transfer bottlenecks.