3 ms·
> localhost which is realistically as efficient as domain socket That depends on your platform. FreeBSD actually runs localhost as tcp, and you can have delays
by toast0 6y ago
> localhost which is realistically as efficient as domain socket
That depends on your platform. FreeBSD actually runs localhost as tcp, and you can have delays, packet loss when the buffer is full, and congestion collapse on localhost. It's lots of fun, but if I asked for tcp and got tcp, I'm not terribly surprised. It's not like BSD hasn't had a better option for local sockets since forever (did unix domain sockets ship at the same time as tcp? I don't know, but they both shipped before I had a computer at home), so my fault for choosing poorly or using a language that doesn't support nice things.
- jdsully 6y agolocalhost is slower than Unix sockets on Linux as well. Try a benchmark with Redis or KeyDB and the performance differences are clear.