SA-301d · Module 1

Hybrid API Strategies

3 min read

Most production systems do not use a single API paradigm. The public API is REST for discoverability and caching. The internal services communicate via gRPC for performance. The frontend uses a GraphQL BFF that aggregates REST and gRPC responses into the exact payload the UI needs. This is not inconsistency — it is architectural pragmatism. Each interface uses the paradigm that fits its specific consumers and constraints.

Do This

  • Use REST for public APIs where discoverability, caching, and broad client support matter
  • Use gRPC for internal service-to-service communication where latency and throughput are critical
  • Use a GraphQL BFF layer when the frontend needs flexible aggregation across multiple backend services

Avoid This

  • Force a single paradigm across all interfaces — each interface has different consumers with different needs
  • Add GraphQL to a system with simple, predictable access patterns — it adds schema management overhead without proportional benefit
  • Expose gRPC directly to browser clients without a gateway — browser support requires HTTP/2 and specialized client libraries