uber / tchannel

network multiplexing and framing protocol for RPC
MIT License
1.15k stars 129 forks source link

unique process_name in init handshake #1411

Open Raynos opened 8 years ago

Raynos commented 8 years ago

We currently have a "unique" process name in init handshake because we include the pid.

However on docker the pid is always 1. We should add some more unique-ness to the process name.

The use case here is defense against fd leak in hyperbahn. I want to implement a "maximum fd per process_name" since right now:

  'go-contact-solver[1]': 55164,

the contact-solver application has 5k fd per instance all under one bucket because all K instances have the same process_name.

cc @prashantv @breerly @jcorbin

Raynos commented 8 years ago

Alternatively we could just add some new fields to the init headers like:

service_name
instance_name

Instead of using the process_name as a unique identifier of the remote.

abhinav commented 8 years ago

Do we have actual critical logic based on the process name? https://github.com/uber/tchannel/blob/master/docs/protocol.md#headers says that it's used for logging. I was under the impression that's all it was for.

Raynos commented 8 years ago

Not yet. As mentioned I want to implement a per process name limit on resources.