Synchronous vs Asynchronous, REST Communication, RestClient, WebClient and OpenFeign
Learn Synchronous vs Asynchronous, REST Communication, RestClient, WebClient and OpenFeign (Phase 3 · Microservices Communication (Essential), Microservices) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Synchronous REST between services • In synchronous communication the caller waits for the response (REST/HTTP+JSON, gRPC). Simple and familiar, good for queries and commands that need an answer, but it creates temporal coupling : if the callee is slow or down, the caller suffers. Availability of a chain multiplies; latency adds. • Always apply: timeouts (connect + read), retries for idempotent calls with backoff, circuit breakers , bulkheads , and fallbacks ; propagate trace/correlation ids and the caller's identity (JWT). Prefer coarse-grained calls over chatty ones; avoid long chains.