News for hackers. Stuff that matters.
Re:Fun with Unix domain sockets by colek42 on Saturday July 24, 2021 @12:07PM (#27942044)
socat is the tool for this. No need for a full blown webserver.
Re:Fun with Unix domain sockets by RedShift1 on Saturday July 24, 2021 @12:30PM (#27942279)
socat is a "dumb" tool. With a proxy that understands HTTP you have a lot more influence over what goes where and for example not direct requests to a down backend instance.
Re:Fun with Unix domain sockets by colek42 on Saturday July 24, 2021 @01:27PM (#27942787)
Are you challenging me to build a socat loadbalancer in bash? In all seriousness, I concur. But if you just need to redirect some data streams socat is a rock solid and simple solution.
Re:Fun with Unix domain sockets by jsjohnst on Saturday July 24, 2021 @01:44PM (#27942942)
> Are you challenging me to build a socat loadbalancer in bash?

It’s a Saturday and all, so yeah, I’m challenging you (for fun, not because I don’t think it’s possible).

Re:Fun with Unix domain sockets by marcosdumay on Saturday July 24, 2021 @02:28PM (#27943321)
From a quick read of the manpage, I don't think it's possible either, unless you mess with EXEC or create multiple listeners to a single address.

Anyway, the Linux kernel does have a builtin loadbalancer in the form of shared sockets that you can socat outside of the machine. But I wouldn't call that a socat loadbalancer.