Choosing an API style is no longer simple. Each has a niche.
| Protocol | Best For | Pros | Cons |
|---|---|---|---|
| REST | Public APIs | Universal cacheability | Over/Under fetching |
| gRPC | Microservices | Binary performance, Typed | Browser support is poor (needs WebProxy) |
| GraphQL | Mobile/Frontends | Single request, Flexible | Complexity, Security (DoS via deep queries) |
The Hybrid Approach
We use gRPC for internal service-to-service communication (East-West) and GraphQL for the Frontend-to-Backend (North-South) aggregation layer.
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.