Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow web.listen-address to be unix domain sockets #286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nkcmr
Copy link

@nkcmr nkcmr commented Jan 21, 2025

Context / Background

Prometheus push gateway is used extensively in the systems I work on. The current setup I use is to have the pushgateway container running adjacent to my application and to push metrics over the TCP loopback interface. As the usage of the pushgateway has scaled up, the overhead and reliability have become worse.

Using unix domain sockets would allow metrics to be collected in a much quicker and reliable way.

In this PR

  • Added an ability to set --web.listen-address to unix:/path/to/sock as a way of specifying that the server should open a listener using "unix" domain sockets.

How this was tested

  • I have made patches against prometheus push gateway and made a proof-of-concept that seems to work correctly.

 ## Context / Background
Prometheus push gateway is used extensively in the systems I work on. The
current setup I use is to have the pushgateway container running adjacent
to my application and to push metrics over the TCP loopback interface. As
the usage of the pushgateway has scaled up, the overhead and reliability
have become worse.

Using unix domain sockets would allow metrics to be collected in a much
quicker and reliable way.

 ## In this PR
- Added an ability to set `--web.listen-address` to `unix:/path/to/sock`
as a way of specifying that the server should open a listener using
"unix" domain sockets.

 ## How this was tested
- I have made patches against prometheus push gateway and made a
proof-of-concept that seems to work correctly.

Signed-off-by: nick comer <[email protected]>
@nkcmr
Copy link
Author

nkcmr commented Feb 5, 2025

@SuperQ Hello! 👋 — I've seen you be the one to merge stuff around here. Mind if I get a review/feedback whenever you get a chance?

@SuperQ
Copy link
Member

SuperQ commented Feb 6, 2025

That seems like an XY Problem. If pushing to the pushgateway is a performance bottleneck, perhaps you should not be using the pushgateway in the first place.

The pushgateway is not meant as a high performance metrics sink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants