Chapter 4. Putting Your Reactive Toolbox to Work
You spent most of the previous chapter focused on how the techniques and tools in our reactive toolbox help us get the most work out of your compute platforms. These help you to create an efficient, responsive service, but that’s really not sufficient when you’re aiming to create a reactive system. To create a fully reactive system, you need to consider the messaging within and between your services, the infrastructure it runs on, and the integration of other capabilities.
Going from Services to Systems: Being Message Driven
Microservices in a reactive system work together to achieve responsiveness, resilience, and elasticity, and this is largely achieved through being message driven. There are two levels of “message driven-ness” that we look at now: intra-service, or how the components of a service communicate; and inter-service, or messaging between services, as illustrated in Figure 4-1.
Creating multiple instances is one way of achieving scale and resilience within a given service. Ideally, you could scale your microservice in a way that’s transparent to other parts of the system. For example, load balancing and routing between instances would be handled internally by the microservice, and additional instances would be spun up or down as needed in response to load and other external conditions. None of this is trivial, but it’s made possible by messaging between the elements that make up the microservice collective.
Figure ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access