Understanding Event Meshes
As you expand event-driven architecture (EDA) through your enterprise, you may find that individual event brokers are not sufficient and that large scale deployments work best when configured as an event mesh. An event mesh is a network of event brokers that allows events from one application to be dynamically routed and received by any other application, no matter where these applications are deployed within your infrastructure, your private cloud, or in a public cloud. In an event mesh, multiple event brokers function as nodes. Multiple nodes can be connected to allow publishers and subscribers to reside in multiple public and private clouds
In a good EDA, you want applications to publish events to any event broker and be assured that subscribing applications receive those events reliably. An event mesh provides this capability.
With an event mesh, you can:
- build an EDA that ensures that event messages are securely and reliably received by subscribing applications using interconnected event brokers
- share information between distributed, decoupled applications, which means that a publishing application can send events and a subscribing application can consume those events without the applications knowing about each other
- scale a mesh using event brokers that span multiple data centers
- trace topic flows
To help solidify your understanding, consider this scenario to see how an event mesh works. Imagine that you have multiple applications connected to event brokers in different geographic regions of the world that want to exchange events. Those applications might be distributed in separate clouds or data centers. If those applications connect to the same event broker, events are exchanged without the applications knowing about each other. However, the event brokers in this case aren't meshed.
Consider this example where Subscriber A is connected to MySecondService (an event broker), but it is interested in events from both Publisher D and Publisher E:
- Because the publishing applications are connected to different event brokers, Subscriber A receives subscribed events only from the publisher connected to MySecondService.
- If Subscriber A wants to receive events sent by Publisher E, it must be connected to MyFirstService as well.
In the following illustration, Subscriber A is interested in events (represented by boxes) from Publisher D and Publisher E (represented by triangles). Subscriber A receives the events from Publisher D (indicated by the check mark), but the event from Publisher E never arrives. In this scenario, for a subscribing application to receive events from a publisher, it must be connected to the same event broker.
In comparison, the following illustration shows event brokers configured as an event mesh, so Subscriber A can connect to one event broker and receive all subscribed events from the publishing applications that are connected to any event broker in the event mesh. As a result, subscribed events from both Publisher D and Publisher E are received by Subscriber A.
As you can see in this scenario, an event mesh ensures that distributed applications receive events no matter where they are connected. An event mesh routes the correct events to the event brokers so that the subscribing applications interested in those events receive them.
A Larger Event Mesh Example
In the following illustration, four event brokers are connected in a full mesh, which means that each event broker is connected to every other one. The event mesh is a mix of cloud providers, including an on-premises Kubernetes deployment.
The event mesh supports the following event-driven architecture:
- Subscriber A is connected to MySecondService and is subscribed to events from Publisher C and Publisher E.
- Because Publisher C is connected to the same event broker as Subscriber A, its events are automatically available to Subscriber A.
- Because Subscriber A is connected only to MySecondService, the event mesh ensures that events from Publisher E (which is connected to MyFirstService) are propagated to MySecondService.
- Subscriber A is not subscribed to events from Publisher D, so no events from MyFourthService are routed to MySecondService.
- Subscriber B is connected to MyThirdService and is subscribed to events from Publisher C, Publisher D, and Publisher E. None of those publishers are connected to MyThirdService, so the event mesh routes their events from MySecondService, MyFourthService, and MyFirstService to MyThirdService.
For more in-depth information about event meshes, see Understanding Event Meshes and Mesh Manager.
Now that you understand what an event mesh does, you can learn more about one of the technologies that make event meshes possible, Dynamic Message Routing.
To learn more about event-driven integration, see How Do Micro-Integrations Enable Event-Driven Integration?.