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]