←back to thread

112 points zardinality | 7 comments | | HN request time: 2.435s | source | bottom
Show context
jeffbee ◴[] No.42195134[source]
Interesting that it is taken on faith that unix sockets are faster than inet sockets.
replies(5): >>42195458 #>>42195476 #>>42195489 #>>42195960 #>>42196345 #
yetanotherdood ◴[] No.42196345[source]
Unix Domain Sockets are the standard mechanism for app->sidecar communication at Google (ex: Talking to the TI envelope for logging etc.)
replies(2): >>42196392 #>>42197783 #
1. jeffbee ◴[] No.42196392[source]
Search around on Google Docs for my 2018 treatise/rant about how the TI Envelope was the least-efficient program anyone had ever deployed at Google.
replies(2): >>42196631 #>>42196835 #
2. eqvinox ◴[] No.42196631[source]
Ok, now it sounds like you're blaming unix sockets for someone's shitty code...

No idea what "TI Envelope" is, and a Google search doesn't come up with usable results (oh the irony...) - if it's a logging/metric thing, those are hard to get to perform well regardless of socket type. We ended up using batching with mmap'd buffers for crash analysis. (I.e. the mmap part only comes in if the process terminates abnormally, so we can recover batched unwritten bits.)

replies(1): >>42196764 #
3. jeffbee ◴[] No.42196764[source]
> Ok, now it sounds like you're blaming unix sockets for someone's shitty code...

No, I am just saying that the unix socket is not Brawndo (or maybe it is?), it does not necessarily have what IPCs crave. Sprinkling it into your architecture may or may not be relevant to the efficiency and performance of the result.

replies(1): >>42196884 #
4. yetanotherdood ◴[] No.42196835[source]
I'm a xoogler so I don't have access. Do you have a TL;DR that you can share here (for non-Googlers)?
5. eqvinox ◴[] No.42196884{3}[source]
Sorry, what's brawndo? (Searching only gives me movie results?)

We started out discussing AF_UNIX vs. AF_INET6. If you can conceptually use something faster than sockets that's great, but if you're down to a socket, unix domain will generally beat inet domain...

replies(2): >>42197131 #>>42198275 #
6. exe34 ◴[] No.42197131{4}[source]
it's what plants crave! it's got electrolytes.
7. sgtnoodle ◴[] No.42198275{4}[source]
You can do some pretty crazy stuff with pipes, if you want to do better than unix sockets.