Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Great work on the part of the author. Pareto principal holds. Often all it takes is one person motivated enough to look for efficiency opportunities.

As for next steps, I can't imagine the Prometheus crew would object to a proposal + PR to make the Service Discovery an optional add-on in the next major version. It does open a can of worms around how such an add-on would be distributed if not built into the binary. (Caveat: I have no familiarity with this particular project or its unique constraints or goals.)



Easy: they can provide an option to remove the SD functionality at compile time, and if you really care about the executable size, you can compile the code with this option (and `-ldflags="-s -w"`). The standard build would still be the "all batteries included" one to avoid support issues (people downloading the smaller binary and then asking why SD isn't working).


Caddy for example does this on their website. You can pick whatever addon you want and you'll be able to download a binary with exactly what you want.


We've already talked about it at length, for many years. There's an approved development proposal to implement it. But, nobody has stepped up to contribute the code.

The main problem is, Go doesn't have any kind of reasonable loadable library system.

The current proposal is to make it easier to do compile-time plugins, similar to how Caddy and CoreDNS do things.

We don't even need a major version to add such a thing. Just the time to write the feature. The thing is, it's just not that important an improvement. When you are running Prometheus in a production environment, it will end up using gigabytes of memory and disk space to operate. The savings of a few megabytes of binary and runtime memory are just not that important.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: