Transitioning to Microservices
The engineering director for Cisco Networking Academy platform outlines how to to approach the transition to microservices including best practices.
Save 35% off the list price* of the related book or multi-format eBook (EPUB + MOBI + PDF) with discount code ARTICLE.
* See informit.com/terms
By this point you know what microservices are and how they work. If you’re still reading, I have accomplished my first goal: piquing your interest enough that you are considering implementing microservices yourself! Now it’s time to get down to brass tacks: namely, the very critical topic of how to approach the transition to microservices.
The Need for Transition
You’ll recall that a monolithic application is very large (in terms of lines of code [LoC]) and complex (in terms of functions interdependencies, data, etc.), serving hundreds of thousands of users across geographical regions and requiring several developers and IT engineers. A monolithic app may look something like Figure 4.1.
Figure 4.1 Basic structure of a monolithic app
Sometimes, even with all these characteristics, the application might run fine at first. You may not encounter challenges in terms of application scalability or performance. But with time and usage, issues will arise, and they may be different for different applications. For example, for a cloud or web application, you may hit scalability issues due to more users consuming your services, or it may become costly and hard to release regular new updates due to longer build times and regression testing. As shown in Figure 4.2, monolithic application users or the developers may experience one or more issues listed on the right.
Figure 4.2 Potential issues with a monolithic app
That’s when a migration to microservices may start sounding like more than a trendy idea; it will sound like a lifesaver. We already learned a bit about microservices in previous chapters, so we know our transition will look something like the application shown in Figure 4.3.
Figure 4.3 Transition from monolithic to microservices
So, how do we go about making such a change? There are two possible scenarios: creating a brand-new application or converting or migrating a monolithic application that already exists. The latter scenario is far more likely, but it is worth knowing the ins and outs of both scenarios regardless of the current situation.