As we close out 2019, we at DevOps.com wanted to highlight the five most popular articles of the year. Following is the first in our weeklong series of the Best of 2019.
Microservices are moving to the mainstream. The IDC FutureScape: Worldwide IT Industry 2019 Predictions states that by 2022, 90% of all new apps will feature microservices architecture that “improve the ability to design, debug, update and leverage third-party code.”
With so many organizations adopting or about to adopt microservices, they must be doing something right. In fact, just considering the model is a positive step toward delivering quality software, faster. However, many companies are leaving microservices benefits on the table because there are many pitfalls on the road to success. It’s about so much more than just a technology choice and starting to code microservices.
Indeed, breaking your apps into microservices isn’t enough—you have to manage them, orchestrate them and deal with the data they create and modify. Before you even touch the keyboard it’s a good idea to think about a few points of strategy to ensure success.
Here are five microservices worst practices and how to turn them around.
Implementing Microservices Without the Prerequisites
You can’t take Calculus II without taking Calculus I. Similarly, you can’t roll out microservices without the proper prerequisites. To fully leverage microservices, companies must consider modularity and domain boundaries, and the fundamental distributed systems theory should be considered and established. In addition, while each service is independent, there are operational requirements that must be met. These include DevOps; PaaS; containers or immutable VMs; service replication, registry and discovery; and proactive monitoring and alerts.
Implementing Microservices Without Making Changes to the Development Culture
The biggest mistake organizations make when moving to a microservices architecture model is underestimating how it’s changing the way they need to think about applications and especially the way they think about the teams developing those applications. Traditionally, there are many people involved in the development of an application, with each coming at it from his or her own perspective—the UI specialist, the middleware specialist, DBAs, sysadmins and so on. What worked for one might not work for the other when it gets thrown over the wall, and it often takes a lot of time and frustration to make everything work for everyone. Trying to do microservices without changing that model and mindset will almost certainly set your team up for failure. Instead, think in terms of cohesive, cross-functional teams, each fully responsible for its own unique services and its own set of customers for those services. Each team’s working with other teams as if it’s a business-to-business (B2B) relationship. It’s not an easy cultural transition, but it’s one that is essential for microservices to work.
Going Too Big and Broad Out of the Gate
An organization that goes all-in on microservices all at once is almost certain to run into problems that could completely derail the initiative altogether. Pick a small project, and staff it with people who see the potential of microservices and are excited to work with the technology. Once that project has been successfully completed, use it as a proof point to promote the further use of microservices across the organization and to get others on board.
Misplaced Expectations
Organizations are right to question the performance impact that microservices will have when migrating an existing monolithic application to a microservices model. But their concerns—and expectations—are often misplaced. Yes, there can be a performance hit when decomposing existing monolithic applications in favor of microservices. But what organizations need to understand is the goal of microservices is deployment speed over API invocation speed.
Isolating the development of a service within a team (as mentioned earlier) means the service can be updated as needed—whether that’s weekly, daily or even hourly—in response to business, competitive and security demands. In its Worldwide IT Industry 2019 Predictions report, IDC notes it is “already seeing enterprises that have shifted fully to these new approaches (and supporting tools and technologies) that dramatically accelerate their ability to push out digital innovation through their organization at 50-100 times (or more) the frequency of their traditional approaches.”
Picking the Wrong Applications to Microservice-ize
This worst practice is linked closely to the previous one. Organizations that pick the wrong applications to split into microservices or decompose an entire monolith without thinking about which parts might be best as microservices (and which would fail miserably as microservices) will have the odds stacked against them from the get-go. A financial application or a high-volume application that makes multiple calls may not be good candidates for microservices. Or, it may be that parts of these applications would work well in the microservices model even if the monolith as a whole doesn’t. The idea is to examine each legacy application carefully and to build new applications with microservices in mind from the beginning.
If you’re thinking that it takes a lot to establish a microservices foundation, you’re right. It’s a big investment, and it may take some time before there is a return on that investment. But organizations that move toward microservices in a thoughtful, purposeful way—exploiting the best practices of those that have gone before them—will likely find themselves more agile, more secure and more competitive.