opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Support setting SO_REUSEPORT on config[http,grpc]

Open sinkingpoint opened this issue 1 month ago • 4 comments
trafficstars

Component(s)

otelcol

Is your feature request related to a problem? Please describe.

If you're running an otel collector as a service on a host, you sometimes need to reload it to get a new config. While the OTel Collector supports config reloading, it's useful to be able to do full restarts gracefully without losing telemetry. Currently, between stopping a collector and starting a new one there can be some delay during which telemetry can be lost

Describe the solution you'd like

There's a few ways to solve this, but a common solution is setting SO_REUSEPORT on the underlying listener. This allows multiple processes to bind on the same port allowing starting the new collector, before culling the old one. I'm proposing adding a field, ReusePort to the ServerConfigs of each of confighttp and configgrpc, and then using that to optionally set the socket option.

Describe alternatives you've considered

Service meshs and the associated routing solve this problem, however there are still users that run the collector as a standalone service without fancy network orchestration

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

sinkingpoint avatar Oct 20 '25 14:10 sinkingpoint