Node.js · Senior · Question 64 of 75
When is gRPC a good fit compared with REST/JSON?
- 1When you want human-readable payloads
- 2For public APIs called directly from any browser without proxies
- ✓Correct answer: For internal service-to-service calls that benefit from typed contracts (Protocol Buffers), HTTP/2 streaming and compact messages
Explanation
Browsers can't use plain gRPC directly (gRPC-Web or a proxy is needed). REST stays simpler for public APIs and caching.