Migrating Legacy APIs into an Istio Service Mesh
When talking to customers about microservices, one of the concerns I frequently hear is how to handle legacy application migration. Organizations need clear and easy paths to migrate their existing functionality into a service mesh. Because the universe of legacy systems is so varied, including monolithic custom middleware, databases, web servers, etc., this article will focus on API gateways and RESTful services because they can take advantage of many of the features of a service mesh.
In my previous article, I showed how to build and deploy a simple Java Spring Boot-based microservice into Istio. In this article, I will build on the concepts from that article to demonstrate migrating legacy applications into Istio. We will create a simple mesh of two microservices: an NGINX-based client microservice providing an API gateway and website; and a Java Spring Boot back end microservice providing data services to the client. Many systems already have API gateways, so this demonstrates a way to bring those legacy APIs into a service mesh while maintaining the API gateway. There are also a large number of legacy monolithic Java applications that have discrete chunks of logic that could be extracted, containerized, and turned into a microservice. For a sample capability, these services work together to provide the ability to look up the capitol of a country, state or province, as well as to insert a new capitol city.