Unfortunately, implementation simplicity also came at a cost of application performance: HTTP/1.x clients need to use multiple connections to achieve concurrency and reduce latency; HTTP/1.x does not compress request and response headers, causing unnecessary network traffic; HTTP/1.x does not allow effective resource prioritization, resulting in poor use of the underlying TCP connection; and so on.
rpc 不是一个协议。rpc 也可以基于 rpc 实现。grpc 用的就是 protobuf over http/2。
这里说比 http 好,其实应该主要是比 http/1.x 好。http/1.x 作为一个历史悠久的协议,现在网页浏览上都已经开始不太能很好支撑现在复杂的网页了,用在 rpc 上就更力不从心了。
下面介绍 HTTP/2 的文章里说了一些 http/1.x 的问题:
From: Introduction to HTTP/2: