8000 The hostname proxy looks up socket owners one connection at a time · Issue #3000 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

The hostname proxy looks up socket owners one connection at a time #3000

Closed

Description

@norrietaylor

Found by the arch review of #2997 (T132), as a residual.

Router::caller_for in crates/minimald/src/net/proxy.rs uses OwnerSource::One(connecting_box) in production, and owners_one_by_one does one /proc pass per waiting connection.

The change:

  • crates/minimald/src/net/dns.rs gains a function of type SocketOwners that names the owners of a slice of (peer, local) pairs from one read of the socket tables and one walk of /proc/*/fd.
  • Router::new sets owners: Some(<that function>), so production uses OwnerSource::Batch.
  • Router::with_socket_owners stays a test hook only.

Refs #1437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0