跳转到内容

欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。

GRPC

来自WHY42
Riguz​(留言 | 贡献)2024年1月18日 (四) 01:59的版本 (→gRPC vs HTTP)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

gRPC vs HTTP

Feature gRPC HTTP APIs with JSON
Contract Required (.proto) Optional (OpenAPI)
Protocol HTTP/2 HTTP
Payload Protobuf (small, binary) JSON (large, human readable)
Prescriptiveness Strict specification Loose. Any HTTP is valid.
Streaming Client, server, bi-directional Client, server
Browser support No (requires grpc-web) Yes
Security Transport (TLS) Transport (TLS)
Client code-generation Yes OpenAPI + third-party tooling

[1]