Skip to content

Handle idle connections #137

Closed
Closed
@vasiliy-t

Description

@vasiliy-t

Problem statement

We have http server exposing metrics to telegraf. Telegraf scrapes metrics in 60 second intervals via http: it opens keep-alive connections but under certain conditions (have no repro, only in prod) it does not reuses established connections and opens new connection each time it scrapes metrics. This results in increasing number of open connections, every connection if a fiber which lives forever.

Possible solution

Introduce new http.server config options:

  • maximum number of idle connections, after reaching this limit http.server could start closing idle conns
  • idle timeout is the maximum amount of time an idle (keep-alive) connection will remain idle before closing

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions