gRPC vs REST

gRPC REST
Full Name Google Remote Procedure Call REpresentational State Transfer
Payload Protobuf JSON(typically)
Unreadable Binary Data Readable Data
HTTP HTTP/2 HTTP 1.1/HTTP/2
Performance Faster
Type Safe
Cross Language Cross Language
Need setup a client No need to setup a client
Any function GET/PUT/DELETE/POST/....

gRPC+Protobuf的方案应该会越来越多,尤其在某些内存受限的情况下,性能优势和部署需要的内存都有优势。
利用HTTP/2具有双向连接能力。

gRPC上搭建一个Nginx Proxy可以转换为REST Web Service。

你可能感兴趣的:(gRPC vs REST)