As I described in my previous blog post on the key principles to guide a microservices project, the efficiency of the value chain determines costs, affects profit, and ultimately decides whether a business will reach its goals. It becomes very important to know if the changes we apply to the system—for example, the introduction of a microservice to implement a value-chain step—have positive or negative consequences on the overall system.
In the previous blog post we used a recommendation service in an e-commerce website as an example of an addition that delivers value to the business. How can we make sure that the addition has the desired effect of improving the overall business performance? What if it increases load times or page clutter, and users are turned away instead?
This brings us to the second principle that should guide your microservices project: Implementing mechanisms that let you know how the changes you make are working. The flow of this data can help shape better decisions throughout the entire company. These backward flows of information are what constitutes feedback loops and lie at the core of DevOps.
While systems thinking emphasizes speed of change and efficient application of value chains to improve throughput, feedback loops are about control and the system’s stability.
Speed Plus Quality
In 2014, Facebook changed its famous motto from “Move fast and break things” to “Move fast with stable infrastructure” because, as Mark Zuckerberg himself said, “We realized over time that it wasn’t helping us to move faster because we had to slow down to fix these bugs.”
Maintaining a system’s performance is impossible without the right amount of information about the system itself. As an analogy: to effectively keep your car running at a certain speed, you need a speedometer. Taking no action at all will cause the car to slow down and ultimately stop. Taking the wrong action can cause a crash.
Now imagine if there was even a 20-second delay between pressing the brake and the car reacting. The quality and the speed of the process would be annihilated; the speed of feedback has a direct effect on the quality of the process. This is why microservice teams don’t trade off speed for quality but rather achieve the latter with the former.
In a similar way, not taking action in a business will cause the whole system to stop working in the long run, thanks to entropy, while the competition will sprint ahead. Even worse, acting without clear information and on the basis of assumptions increases the risk of wasting resources and having a detrimental effect on the business itself.
Getting Better All the Time
Let’s use our recommendation-service example again. Measuring the click events and the conversion in purchases generates precious data that allows more informed decisions about increasing the resources dedicated to this microservice development. If the evidence suggests that the recommendation service drives more customers to buy the company’s products, then it could be a good idea to make even more sophisticated recommendations.
Observability is one of the key factors in microservices architectures. It includes the generation, collection, storage, and analysis of detailed information about each component of the entire system. Well-engineered microservices expose metrics that allow efficient system monitoring and trace each interaction that the customer has with it.
Observability gives engineers the information they need to adapt systems and application architectures to be more stable and resilient. This, in turn, provides a feedback loop to developers that allows for fast iteration and responsive adaptation to changing market conditions and customer needs.
Why Observability Matters
It is important to point out that observability doesn’t come for free. It needs to be engineered, and carefully planned before reaching a certain scale. In other words, after you have implemented more than a handful of microservices, you will absolutely need feedback on how they are working.
However, the advantages are worth the effort. Going forward, implementing observability will uncover areas that lack information and contribute to improved knowledge of the whole system. In theory, observability allows to answer to some questions behind strategic decisions. For example:
- Is our product’s database fast enough or do we need to invest in a more efficient one?
- Will the recommendation service sustain a 25% increase in website visits during the holiday season?
By emphasizing the importance of observability, microservices adoption can improve the overall quality of the system with positive effects on the business, shorten the response time to incidents, and decrease downtime by showing exactly which parts of the system are affected.
In the next blog post, read about the culture of continual experimentation and learning, and its relationship to microservices. And for a deeper dive, see below to request our white paper, “Microservices for Managers." You can download below.