Architecting microservices for fast, sustainable flow
You are receiving this email because you subscribed to microservices.io
This month, I'm teaching an online public workshop Architecting for fast, sustainable flow: enabling DevOps and Team Topologies: 9am-11am CET/4pm-7pm Korea Time, September 23th-25th, 2024
In November, I'll be teaching workshops in Berlin and Milan. If you would like me to visit your company for workshop or architecture review, please contact me.
In the previous article, Architecting monoliths for fast, sustainable flow, I described the key challenges that you will encounter when architecting a monolith for fast flow.
In this article, which, like others in this series, is based on my workshop Architecting for fast, sustainable flow: enabling DevOps and Team Topologies I describe how to architect a microservice architecture to achieve fast, sustainable flow.
About the microservice architecture
In a nutshell, the microservice architecture is an architectural style that structures an application as a collection of two or more services that are loosely design-time coupled and independently deployable.
Both loose design-time coupling and independent deployability are essential characteristics of the microservice architecture.
Essential characteristic: loose design-time coupling
Services are loosely design-time coupled when changing one service rarely requires changing to another service. This characteristic enables each team to work independently without coordinating with other teams.
Essential characteristic: independently deployable
Services are independently deployable when they are packaged as a deployable or executable unit and are production-ready after being tested in isolation. It enables each team to frequently and independently deploy their services.
Much of the benefit of microservices is derived from these two characteristics. Let’s now look at the challenges.
Architecting microservices for fast, sustainable flow
With careful design, a microservice architecture is able to satisfy the architectural requirements for fast, sustainable flow. Let’s look at the details starting with the biggest benefit of the microservice architecture: great evolvability.
Microservices simplify technology stack evolution
One of the key benefits of the microservice architecture is that it simplifies the evolution of the application’s technology stack. Each service can, in theory, have its own technology stack. This enables a team to pick the best technology for the job. But, more importantly, it means that the application’s technology stack can evolve incrementally, one service at a time, which is far less disruptive to feature delivery. Microservices also enable teams to experiment with new technologies and determine if they are a good fit for the application.
Microservices have better observability
A monolith can be instrumented so that it emits a stream of telemetry. But a valuable feature of the microservice architecture is that the telemetry is more granular. You have insight into the behavior of individual services, i.e. subdomains or business capabilities.
Microservices accelerate the deployment pipeline but …
Another key benefit of the microservice architecture is that it accelerates the deployment pipeline. Each service has its own deployment pipeline. It’s relatively small compared to the entire application. Also, a service is tested in isolation before being deployed and so the tests are much simpler and fast than end-to-end tests. As a result, the deployment pipeline will typically be very fast. Moreover, since a service is an independently deployable unit, deploying it is much simpler and faster than deploying a monolith.
There are two challenges, however, with testing and deploying services independently. The first is cultural. An organization needs to abandon the idea of testing the entire application before deploying a change to a single service. It needs to replace end-to-end testing with techniques, such as consumer driven contract testing, and canary deployments.
The second challenge is ensuring that services are truly loosely design-time coupled. Otherwise, there’s a risk of a change accidentally causing a production outage. Let’s look more at loose design-time coupling.
Creating a loosely coupled microservice architecture requires careful design
A key challenge when designing a microservice architecture is to create a loosely design-time coupled architecture. Otherwise, you will end up with a distributed monolith, where some or all services regularly change in lockstep.
Services need to resemble icebergs. Each one must have small, stable API that encapsulates the much larger implementation.
When you define an API you are essentially making a bet about the ways in which your architecture will and will not change in the future. The service APIs are the stable parts of your architecture. You are betting that they will not change, at least not very often in ways that break the clients. Coincidentally, David Parnas wrote about this exact topic in this famous 1972 paper about modularity, “On the Criteria To Be Used in Decomposing Systems into Modules”.
Defining stable APIs requires very careful design and a deep understanding of the business domain. That’s why if you are building an application for a brand new domain you should consider starting with a monolith. You can then evolve the monolith into a microservice architecture when you learn more about the domain and understand which parts are stable and which are not.
Defining stable APIs also requires an organization to abandon the myth that a microservice architecture must consist of lots of small services. The overriding concern is that services must be loosely coupled and independently deployable even if this means that services are no longer small.
Want to learn more?
As you can see, architecting microservices for fast flow requires careful design. If you want to learn how to design a fast flow architecture, enroll in my upcoming public online workshop on architecting for fast, sustainable flow.
You will learn:
- Architectural requirements for fast, sustainable flow.
- The forces that shape an architecture and the trade-offs that you will need to make when designing an architecture.
- How to decide between the monolithic and microservice architectural styles.
- How to design a microservice architecture using dark energy and dark matter.
Need help with accelerating software delivery?
I’m available to help your organization improve agility and competitiveness through better software architecture: training workshops, architecture reviews, etc.
Learn more about how I can help
Older messages
Architecting monoliths for fast, sustainable flow
Thursday, August 22, 2024
You are receiving this email because you subscribed to microservices.io Next month, I'm teaching an online public workshop Architecting for fast, sustainable flow: enabling DevOps and Team
Reminder: Why architecting for fast, sustainable flow is important
Tuesday, August 20, 2024
You are receiving this email because you subscribed to microservices.io Next month, I'm teaching an online public workshop: Architecting for fast, sustainable flow: Enabling DevOps and Team
Why architecting for fast, sustainable flow is important
Tuesday, August 20, 2024
You are receiving this email because you subscribed to microservices.io Next month, I'm teaching an online public workshop: Architecting for fast, sustainable flow: Enabling DevOps and Team
Reminder: Better architecture thru deliberative design
Thursday, August 8, 2024
Upcoming public architecture workshops You are receiving this email because you subscribed to the microservices.io mailing list. Helping organizations accelerate software delivery You are eager to
Better architecture thru deliberative design
Tuesday, August 6, 2024
Upcoming public architecture workshops You are receiving this email because you subscribed to the microservices.io mailing list. Helping organizations accelerate software delivery You are eager to
You Might Also Like
JSK Daily for Nov 6, 2024
Wednesday, November 6, 2024
JSK Daily for Nov 6, 2024 View this email in your browser A community curated daily e-mail of JavaScript news Unveiling the New Angular 3D Circular Charts Component The Angular 3D Circular Charts
Daily Coding Problem: Problem #1600 [Easy]
Wednesday, November 6, 2024
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Amazon. Implement a stack API using only a heap. A stack implements the following
Know What You Control 🪰
Wednesday, November 6, 2024
How a bug-fixing endeavor gave me a good POV on election night. Here's a version for your browser. Hunting for the end of the long tail • November 06, 2024 Know What You Control If you're stuck
Spyglass Dispatch 003: Lina Gone • Prediction Market Victory Laps • TikTok Saved? • Apple's Smarter AI • The Return of Tim Apple
Wednesday, November 6, 2024
Lina Gone • Prediction Market Victory Laps • TikTok Saved? • Apple's Smarter AI • The Return of Tim Apple The Spyglass Dispatch is a free newsletter sent out daily on weekdays. Feel free to forward
Top Tech Deals 💰 $20 Monster Earbuds, TCL TVs, Anker Power Station, and More
Wednesday, November 6, 2024
Pre-Black Friday deals you won't want to miss. How-To Geek Logo November 6, 2024 Top Tech Deals: $20 Monster Earbuds, TCL TVs, Anker Power Station, and More Pre-Black Friday deals you won't
Zuzalu is Dead. Long Live Zuzalu! - Metamorphosis Commenced v3
Wednesday, November 6, 2024
Top Tech Content sent at Noon! NODES 2024, a Dev Conference on AI, Knowledge Graphs & Apps Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today,
The best open-source AI models
Wednesday, November 6, 2024
Drone flight goggles; Kindle Paperwhite hands-on; Best laptop deals -- ZDNET ZDNET Tech Today - US November 6, 2024 ai concept The best open-source AI models: All your free-to-use options explained
Bolster Your Cyber Defenses with CIS Controls v8.1
Wednesday, November 6, 2024
Key changes to help you mature your cybersecurity posture...
Reducing insider trading in a microservice architecture
Wednesday, November 6, 2024
You are receiving this email because you subscribed to microservices.io In November, I'll be teaching public workshops in Berlin and Milan. I hope you will enroll. My service collaboration patterns
INTERPOL Disrupts Over 22,000 Malicious Servers in Global Crackdown on Cybercrime
Wednesday, November 6, 2024
THN Daily Updates Newsletter cover Introduction to Algorithms: A Comprehensive Guide for Beginners: Unlocking Computational Thinking ($34.99 Value) FREE for a Limited Time Begin your journey into the