Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Communication Patterns Between Microservices

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →
Avatar for life michael life michael
September 01, 2026

Communication Patterns Between Microservices

Communication between microservices is one of the key architectural decisions in a distributed system.

This presentation explores the main patterns used for communication between microservices and the trade-offs associated with each approach. It begins with the fundamental choice between synchronous Remote Procedure Invocation (RPI), using technologies such as REST and gRPC, and asynchronous messaging through queues and publish/subscribe systems.

The slides examine how synchronous dependency chains affect latency and availability, how message brokers reduce temporal coupling, and how commands, events, and asynchronous replies support distributed workflows.

Additional patterns covered include API Gateway, Backend for Frontend (BFF), client-side and server-side service discovery, and essential reliability mechanisms such as timeouts, retries, circuit breakers, bulkheads, idempotency, and Dead-Letter Queues.

The presentation concludes with a practical hybrid architecture that combines an API Gateway at the edge, synchronous calls where immediate responses are required, and asynchronous events for independent processing, side effects, and fan-out.

Topics covered:
• Remote Procedure Invocation (RPI)
• REST and gRPC
• Asynchronous Messaging
• Queues and Publish/Subscribe
• Commands and Events
• API Gateway
• Backend for Frontend (BFF)
• Service Discovery
• Reliability Patterns
• Hybrid Microservices Architecture

You can find the video at https://youtu.be/t7RCQ_t6A7k

You can find the post that summarizes this meetup at https://lifemichael.com/en/communication-patterns-between-microservices/

You can find the catalog of the professional seminars delivered by life michael at https://www.lifemichael.com/seminars/lifemichael_seminars_catalog.pdf

Avatar for life michael

life michael

September 01, 2026

More Decks by life michael

Other Decks in Programming

Transcript

  1. My name is Haim Michael. I live in Tel Aviv,

    and I am the CEO & founder of Zindell Technologies, Ltd. I have been into programming since my childhood. I have extensive experience with Java (30+ yrs), JavaScript (30+ yrs), C++ (30+ yrs), C# (15+ yrs), TypeScript (12+ yrs), Python (15+ yrs), PHP (20+ yrs), Scala (16+ yrs), and Kotlin (12+ yrs). blog.lifemichael.com Haim Michael
  2. My passion lies in teaching and lifelong learning. I continuously

    learn and evolve. Learning takes place in various forms. Learning is not limited to the formal educational systems. You thrive when you explore topics that genuinely interest you. blog.lifemichael.com Passion for Learning
  3. B.Sc. in Economics & Accounting MBA (Information Systems Management) Teaching

    advanced topics in software development at leading academic institutions. Tel-Aviv University Teaching Today Holon Institute of Technology Bar Ilan University Ben Gurion University Reichman University Tel-Aviv University Technion Institute of Technology blog.lifemichael.com My Academic Background
  4. Functional Programming Micro Services Design Patterns (Scala) Classic Design Patterns

    FED Concurrent Programming (Threads in Java & Coroutines in Kotlin) AI Agents Orchestration Design Patterns Asynchronous Server-Side Development (Node.js & MongoDB) Events Driven Architecture Spec-Driven Development with AI blog.lifemichael.com Academia
  5. Jacado - More Than 200 Games for Mobile Telephones –

    Years 2001- 2008 Zindell - Building AI Aligned Companies – Years 2026 - … nana.events prompo.ai zindrex.com ngager.pro jacado.games blog.lifemichael.com Passion to Build
  6. What We Will Map Today Practical model for choosing how

    microservices should communicate. 1 2 3 4 5 RPI Messaging Edge Patterns Discovery Quality Synchronous calls Asynchronous exchange Shape external traffic Find service instances Survive failure REST · gRPC Queues · Pub/Sub Gateway · BFF Client / server-side Reliability · coupling life michael Communication Patterns between Microservices
  7. The Core Architectural Choice Does the caller wait for a

    response, or does it publish work and continue? S YNCHRONOUS AS YNCHRONOUS Remote Procedure Invocation Messaging Payment Order Service Payment Service Order Service Broker Analytics Caller blocks until the callee responds. Immediate answer life michael Temporal coupling Producer sends a message without waiting for all consumers. Simple flow Loose timing Resilient buffering More complexity Communication Patterns between Microservices 14
  8. Synchronous Remote Procedure Invocation (RPI) A request crosses a service

    boundary and returns a response in the same interaction. EX AMPL E REQUES T PAT H 2 Web Client 1 HTTP Inventory sync call Order Service Database REST / gRPC local data 3 Payment sync call What the caller experiences life michael • A clear request/response control flow that is easy to trace. • End-to-end latency includes every downstream call on the critical path. • A slow or unavailable dependency can immediately affect the caller. Communication Patterns between Microservices 15
  9. REST and gRPC: two Common RPI Choices Both are synchronous

    invocation styles; the trade-offs differ in interoperability and efficiency. REST / HTTP Interoperable by default gRPC Efficient service-to-service Payloads Usually JSON over HTTP Payloads Protocol Buffers over HTTP/2 Strength Human-readable and broadly supported Strength Strong contracts, streaming, compact messages Typical fit Public APIs and heterogeneous clients Typical fit Internal low-latency service communication Trade-off More serialization / payload overhead Trade-off Requires generated stubs and tighter tooling life michael Communication Patterns between Microservices
  10. Synchronous Communication is Simple - Until Dependency Chains Grow Every

    blocking hop becomes part of the caller’s latency and availability story. T HE APPEAL • Straightforward request/response semantics • Immediate result or error • Natural for reads and validation • Familiar debugging and tracing model T HE F AI L URE CHAI N API Orders Inventory Payment slow / failed A downstream failure can propagate upstream unless the caller limits waiting and isolates dependencies. Timeouts life michael Circuit breakers Bulkheads Bounded retries Communication Patterns between Microservices
  11. Asynchronous Messaging The producer hands work to a broker and

    is decoupled from when consumers process it. Payment MESSAGE BROKER consumer Producer publishes Email consumer Analytics consumer The important shift: life michael The producer depends on the message contract, and the broker doesn’t depend on every consumer being available at the same moment. Communication Patterns between Microservices
  12. Queue versus Publish/Subscribe The topology determines whether one consumer handles

    a message or many subscribers react to it. POI NT - T O- POI NT ONE- T O- MANY Queue Publish / Subscribe Billing Worker A Producer Queue Producer Topic Search Worker B Audit One message is handled by one worker in a competing-consumer group. Usually, workers will consume (compete with each other). Work distribution life michael Backpressure Each subscription receives its own copy of the event stream. Both Push and Pull models can fit. Event fan-out Independent consumers Communication Patterns between Microservices
  13. Commands, Events, and Asynchronous Replies Message meaning matters as much

    as broker technology. Command Event Reply “Do this.” “This happened.” “Here is the result.” Directed intent toward a capability. Usually one logical handler. A fact that consumers may independently observe and react to. Correlation IDs connect a later response to an earlier request. EX AMPL E EX AMPL E EX AMPL E ReserveInventory life michael OrderPlaced PaymentAuthorized Communication Patterns between Microservices 20
  14. Asynchrony Changes Consistency: Workflows replace Distributed Transactions Instead of one

    atomic call chain, services often coordinate through a sequence of local commits. EX AMPL E: ORDER WORKF L OW Orders Inventory Payment Shipping OrderCreated StockReserved PaymentCaptured ShipmentCreated Why teams use it What you must design Services remain autonomous, failures can be retried, and the broker buffers temporary outages. Eventual consistency, duplicate delivery, ordering limits, compensation, and observability. life michael Communication Patterns between Microservices
  15. API Gateway Pattern The single-edge entry point hides internal topology

    and applies cross-cutting policies. Catalog Web App Mobile App Partner API API GATEWAY Auth Rate limits Routing Telemetry Search Orders Payments Accounts Use the gateway to centralize edge concerns; avoid turning it into a giant business-logic service. life michael Communication Patterns between Microservices
  16. Backend for Frontend (BFF) When client experiences differ, give each

    frontend a backend shaped for its own needs. Catalog Web UI Offers Web BFF web-shaped API Orders Search Mobile UI Mobile BFF mobile-shaped API Profile BFF trades duplication for client autonomy: fewer “one API fits nobody” compromises. life michael Communication Patterns between Microservices
  17. Service Discovery Instances scale, move, and fail. Callers need a

    stable way to find healthy destinations. CL I ENT - S I DE DI S COVERY S ERVER- S I DE DI S COVERY Registry Caller Instance A Instance A Caller Router / LB Instance B Instance B Caller queries a registry and chooses an instance. More client logic life michael Caller uses a stable endpoint; infrastructure resolves the instance. Simpler clients Communication Patterns between Microservices
  18. Reliability Patterns: Make Failure a Designed State Distributed systems fail

    partially. Communication code should bound damage and enable recovery. Clock Timeout ↻ Stop waiting after a bounded interval. || Bulkhead Isolate resource pools so one failing dependency cannot affect the rest of the system life michael Retry CB Repeat transient failures; with limits and backoff. ID Idempotency Make repeated requests/messages safe to process. Circuit Breaker Fail fast while a dependency is unhealthy. DLQ Dead-Letter Queue Quarantine messages that repeatedly fail. Communication Patterns between Microservices
  19. Practical Hybrid Architecture Use synchronous calls where users need immediate

    answers; publish events for independent downstream work. Payment Orders Web / Mobile Event Broker API Gateway Catalog Email Analytics Search Index Pattern mix: Gateway at the edge · RPI for immediate query/validation · Events for side effects and fan-out life michael Communication Patterns between Microservices
  20. Q&A nana.events Thanks for attending my talk :) WhatsApp +972.54.6655837

    nana.events Jacado [email protected] https://blog.lifemichael.com jacado.games prompo.ai prompo.ai ngager.pro life michael zindrex.com XtremeJ xtremej.dev life michael XtremeJS xtremejs.dev XtremePython xtremepython.dev XtremeAI xtremeai.dev lifemichael.com meetup.com/lifemichael Communication Patterns between Microservices