Microservices Part Two: Making the Jump
So, you’ve got some big projects in the pipeline that need to be scalable, flexible and quick to develop. After reading our blog post, you’ve decided that adopting a microservices architecture pattern is the best way forward. Here are four things to keep in mind while making the jump:
Setting up a microservices architecture for the first time is a huge task. Before the production stage, the architecture needs to be established in a productive way. It must allow developers to quickly and reliably build and test code later down the line. Interactions between each individual microservice are heavy and distributed. So, make sure your system is highly observable and traceable from the beginning. Management can also be tricky to get right. So, a strong DevOps, automation and collaboration culture will go a long way.
If you’re not starting from scratch, be aware that migrating from a monolith architecture isn’t easy. This is due to the amount of code and the way important processes with distinct responsibilities are mixed and tied together within a monolith architecture. It’s likely that you’ll want to keep the software up and running during migration. This can make extracting processes and flows very challenging. It’s important to make sure you keep these extractions organized. You must always test that the new service is behaving the same as the legacy one.
For complex processes with a lot of business logic, we have found Domain Drive Design techniques particularly useful. These help you to better understand your Domain and split it in a bounded context to facilitate the process of responsibility segregation. In turn, this leads to a better microservices ecosystem definition.
Just like implementation and migration, testing microservices also takes a lot more work compared to single applications. The approach is just the same. It starts with acceptance tests and writing code with unit and integration tests. The reason it’s more work is because this must be done for each microservice in an isolated environment. Then, contract and component testing must be carried out to ensure interactions with other services are working.
4. Going Serverless
Serverless architectures have had some big hype in recent years, but they’re not ready to support the kind of complex business logic integration found in a full microservices approach. However, they are useful for a single process that needs to be parallelized, or a task that will be executed extensively, so going serverless can work well for an isolated service within your microservice ecosystem.
As you can see, making the jump to a microservices architecture is no easy feat. But the benefits of this approach are too powerful to ignore. The demand for rapid scalability, speed to market and agile flexibility is being driven by growing user expectations, emerging technological advancements and the need to stay competitive. For these reasons, microservices should definitely become an architecture pattern that you have at your disposal. The key is to get better at identifying which projects are worth the expertise and work that’s required to establish them and consider the long term implications of limiting your project by a monolithic approach.
Join in on the conversation on Twitter!
Get the latest roundup of the most important, interesting and stories from the past week. In your inbox every Saturday by 10am.
Tech Stack: Explaining Software Architectures
Published March 20, 2020
Decade Round-Up: 5 of the Most Relevant A.I. Innovations of the 2010s
Published March 6, 2020
Using Software to Improve Insights Into Student Demographics
Published February 28, 2020