Architecture Tradeoff Explorer
Every comparison answers the same five questions — use when, avoid when, complexity, operational cost, failure modes — so the decision is about your constraints, not the fashion of the year.
Monolith vs MicroservicesREST vs GraphQLREST vs gRPCSynchronous call vs Asynchronous (queue)Relational (SQL) vs NoSQL (document / key-value)Queue (point-to-point) vs Pub/Sub (topic)Event-driven vs Request/responseCache (Redis / CDN / in-process) vs DatabaseCQRS vs CRUDEvent sourcing vs State storage
Same request/response idea, different transport. REST/JSON is universal and debuggable; gRPC is binary over HTTP/2 with generated typed clients, deadlines and streams. Inside a network you control, gRPC pays off on hot paths; at the edge, REST wins.
| REST API Architecture: REST, GraphQL, RPC, gRPC, WebSockets, Webhooks | gRPC Microservices | |
|---|---|---|
| Use when | Public or browser-facing APIs, occasional internal calls, anything where any HTTP tool must work. | Service-to-service on a hot path — thousands of calls per second, typed contracts across languages, streaming in either direction, deadlines that propagate. |
| Avoid when | A chatty internal path where JSON encoding and hand-written clients are a measured cost and integration bugs come from untyped payloads. | Browser clients (needs a transcoding gateway), an L4 load balancer that cannot see HTTP/2 streams, or a team that will debug with curl at 3 a.m. |
| Complexity | Low: HTTP and JSON; contract via OpenAPI. | Medium: protobuf definitions, codegen for every language, HTTP/2-aware load balancing, a gateway for external access. |
| Operational cost | Every proxy, CDN and observability tool understands it. | L7 or client-side balancing required; binary payloads need tooling to inspect; but deadlines and streaming are built in. |
| Failure modes | Slow serialisation on hot paths; no built-in deadline propagation, so timeouts must be threaded by hand. | One backend taking 100% of traffic because an L4 balancer pinned all streams to it; field semantics changed while the field number stayed, which codegen cannot catch. |
| Data flow | HTTP/1.1 or 2, JSON text, one request per response | HTTP/2 streams, protobuf binary, unary or streaming in either direction |
| Latency | Higher: text encoding and per-request connection overhead without HTTP/2 | Lower: compact encoding, multiplexed streams, persistent connections |
| Observability | Readable on the wire; any proxy logs it | Needs interceptors for tracing and tooling to decode payloads |