twitter / finagle

A fault tolerant, protocol-agnostic RPC system
https://twitter.github.io/finagle
Apache License 2.0
8.78k stars 1.45k forks source link

Use canonical host name for per host stats #918

Closed fuCtor closed 2 years ago

fuCtor commented 2 years ago

We use DNS balancing in our project. For investigation of behaviour (request, latency, etc) per host we configure this feature. But in stats we see only one metric with given hostname. As result result all stats are collapsed in single branch.

As solution I suggest use canonical host name. Canonical hostname are calculated as reverse lookup by IP address. As result in stats we receive name of definite endpoint. For behaviour switching are using flag.

As workaround we use resolver, which transform result from InetResolver.