Please enable JavaScript.
Coggle requires JavaScript to display documents.
Service Communication Patterns - Coggle Diagram
Service Communication Patterns
Service communication
internal (east/west)
external (north/south)
synchronous
asynchronous
integrating services
minimise internal comm
avoid sync comm, use async
orchestration vs choreography
Choreography:
Services communicate via messages/messaging systems.
Decision logic is distributed
protocols
HTTP
textual
popular
not best performance
HTTP2
fully multiplexed
binary
designed for low latency
faster encrypted conn
Websocket
based on HTTP
persistent conn between
client/server
low latency
2 way conversation
gRPC
binary, small payloads
uses HTTP2 for transport
uses protocol buffers
messaging protocols
Message Queue Telemetry Transport
simple, lightweight, binary
designed for low latency,
high bandwidth envs
focused on pub/sub messaging
Advanced Message Queuing Protocol
binary, rich set of features
reliable queuing, topic-based pub/sub,
routing, security
battle tested, proven reliable
Pub/Sub model
message order not guaranteed
service comm serialisation
JSON
readable, self-contained
large memory footprint
expensive serialisation with lots data
Protobuf
binary format - needs generator
schema defined in .proto files