Skip to content

http proxy: isLocalhost check allocates lots of memory #628

@mmatczuk

Description

@mmatczuk

The localhost check uses nopResolver()

var localhostResolver = nopResolver() //nolint:gochecknoglobals // This is a local resolver.

Using it proves to allocate large amounts of memory. Causing a heap memory hiccup visible in the metrics.

Screenshot 2024-01-02 at 15 15 54

We should change the implementation.
I suggest we read and watch /etc/hosts file instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions