Hacker News new | ask | show | jobs
by chatmasta 2944 days ago
Why does this implement an HTTP interface on the sidecar? Isn’t that a lot of unnecessary overhead for incrementing a counter? The connection will always be on a local interface, so there’s no need for HTTP. Seems like a better solution would be a simple Linux domain socket, which would be far less overhead for the eg haproxy <-> sidecar communication.
1 comments

absolutely right, Unix sockets are quite faster than even loopback tcp connections. We have plan to introduce that in roadmap. But to start with we wanted to cover general usecases first. Http interface also make it platform independent. Infact loopback tcp connections are also giving decent performance as the requests are routed though different interface
If the deployment is using docker (i.e. haproxy in one container, the sidecar in another), “local” TCP can be a big bottleneck. I was using TCP for redis over a local docker network, and got a huge speedup after switching to Linux domain socket mounted in a shared volume.

Anyway, the project looks nice, I will be checking it out. But for production deployment the local HTTP would be a dealbreaker for me.