Skip to main content

Communication Between Systems

When systems need to talk, they have two fundamental ways to communicate: synchronously (waiting for immediate replies) or asynchronously (fire-and-forget). Understanding this split will help you debug issues, choose technologies, and explain architectural decisions to your team.

sync async comparison

Synchronous

A direct, real-time conversation where the caller waits for an immediate response.

ProtocolBest ForPain Points
RESTWeb/mobile APIsVersioning, overfetching
GraphQLComplex client data needsQuery complexity
gRPCMicroservices (internal)Binary format debugging
SOAPEnterprise integrationsXML complexity
  • Use when dealing with success/failure scenarios, such as payment gateways or user authentication flows.
  • Avoid for long-running tasks, imagine waiting 10 minutes for a webpage to load.

Asynchronous

Async communication via message brokers. Systems toss messages into a "digital mailbox" and move on.

TechnologyStrengthQuirk
RabbitMQFlexible message routingNeeds queue tuning
KafkaHigh-volume event streamingComplex setup
AWS SQSServerless simplicityVendor lock-in
Redis Pub/SubReal-time notificationsNo persistence
  • It shines in scenarios such as:
    • Order processing ("Thank you for buying, we'll email when shipped")
    • Data sync between systems ("Update CRM overnight")
    • Event-driven architectures ("User signed up → send welcome email").
  • Watch for problems like:
    • Message duplication ("Why did we charge them twice?")
    • Stale data ("Inventory says 1 left, but it's actually sold out").

Comparison

CriteriaSynchronousAsynchronous
LatencyImmediate response neededTolerable delay (secs-min)
Error HandlingFail fastRetry queues
CouplingTight (knows receiver)Loose (via broker)
ScalabilityLimited by callerIndependent scaling
ComplexitySimple to implementComplex delivery guarantees
CostResource-heavy (waiting)Efficient (no waiting)

Most systems you’ll encounter use a mix. Remember:

  1. Your company’s existing infrastructure will heavily influence choices (no rewriting COBOL batch jobs into Kafka streams).
  2. Communication patterns often outlive the systems themselves.
  3. When joining a team, ask: "What happens when System A sneezes?" The answer reveals their system communication philosophy.

Now that you’re armed with this knowledge, you’ll never look at a "Connection timed out" error the same way again.