Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why use HTTP for transport instead of Messagepack or ZMQ? Seems a bit overkill if you are whipping binary data back and forth between services. Protobuf + ZMQ seems a lot more efficient to me.


Absolute throughput or efficiency isn't the goal of most RPC mechanisms, twirp specifically. However I don't think it's underperformant either. It's very easy to reason about, and debug, plays with ELBs well, and most important, gets developers thinking at a Service to Service RPC level instead of about low level stuff.

Fix and optimize throughput for services which actually have those problems.


Messagepack is a serialization format, not a transport. It is an alternative to protobuf or json.

Mostly people use HTTP because there are so many services and components that already support it (load balancers, proxies, sidecars etc), it has well-supported options for authentication, conveys metadata seamlessly through multiple layers, and its overhead isn't an issue for the kind of payloads they are sending.

Plus, you know, curl.


A lot of this boils down to wanting to be able to use standard load balancers.


ZMQ uses ZMTP which is a TCP protocol, and for example, HAProxy supports TCP just as much as TCP/HTTP.


Not just standard load balancers, standard http stacks. Polyglotness is a big benefit here.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: