1. Synchronous
Request/response calls over REST or gRPC block until the callee answers.
sync: rest-or-grpcTyporithm · hard
Step 1 of 8 · intro card
Microservices
Services communicate synchronously (REST/gRPC) or asynchronously (events via a broker). Service discovery (a registry or DNS) locates instances; resilience patterns — timeouts, retries, circuit breakers — handle partial failure; versioned contracts prevent breaking changes.
Services talk either synchronously — request/response over REST or gRPC, where the caller waits — or asynchronously, by publishing events to a broker that consumers process on their own time. Async decouples services and absorbs load spikes.
Because instances come and go, service discovery resolves a logical name to live addresses through a registry or DNS. The caller asks for 'payments', not a hard-coded IP.
Networks fail partially, so resilience patterns are mandatory: timeouts bound how long you wait, retries handle transient errors, and a circuit breaker stops hammering a downed dependency. Versioned contracts let a service change its API without breaking existing callers.
Sync: REST/gRPC. Async: events via a broker.
Discovery (registry or DNS) finds live instances.
Timeout + retry + circuit breaker contain failure; version contracts.
communication:
sync: rest-or-grpc
async: events-via-broker
discovery: registry-or-dns
resilience: timeout-retry-breaker
contract: versioned-apiConnect each part of the code to the concept before you type.
Request/response calls over REST or gRPC block until the callee answers.
sync: rest-or-grpcPublishing events through a broker decouples producers from consumers in time.
async: events-via-brokerA registry or DNS resolves a service name to current instance addresses.
discovery: registry-or-dnsTimeouts, retries, and circuit breakers contain partial failures instead of cascading them.
resilience: timeout-retry-breakerVersioning the API lets a service evolve without breaking existing callers.
contract: versioned-apiRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.