Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Consider the Azure services most suitable for hosting your application

Now that you have familiarized yourself with the application you will be migrating to Azure, as the next step, you will need to consider different compute options you have at your disposal for hosting this application.

The four primary options you will take into account are Azure App Service, Azure Kubernetes Service, Azure Container Apps and Azure Spring Apps. Given that the Spring Petclinic application consists of multiple microservices working together to provide the functionality you reviewed in the previous task, what would you consider to be the most suitable option? Before you answer this question, review the following requirements:

  • The Spring Petclinic application should be accessible via a public endpoint to any user (anonymously).
  • The new implementation of Spring Petclinic should eliminate the need to manually upgrade and manage the underlying infrastructure. Instead, the application should use the platform-as-a-service (PaaS) model.
  • Spring Petclinic implementation needs to adhere to the principles of the microservices architecture, with each component of the application running as a microservice and granular control over cross-component communication. The application will evolve into a solution that will provide automatic and independent scaling of each component and extend to include additional microservices.
  • Since you are starting from a Java Spring Cloud application, it would be nice to have in case any of the target services would provide you any out of the box Spring Cloud components.

Consider any additional steps you may need to perform to migrate the Spring Petclinic application to the target service.

Fill out the following table based on your analysis:

  Azure App Service Azure Kubernetes Service Azure Spring Apps Azure Container Apps
Public endpoint available        
Auto-upgrade underlying hardware        
Run microservices        
Additional advantages        
Additional disadvantages        

Step by step guidance

  • Each of the 4 options supports a public endpoint that can be accessed anonymously.
  • Each of the 4 options supports automatic upgrades and eliminates the need to manage the underlying infrastructure.
    • With Azure App Service, upgrades are automatic. All underlying infrastructure is managed by the platform.
    • With Azure Kubernetes Service (AKS), you can enable automatic upgrades based on the channel of your choice (patch, stable, rapid, node-image). The underlying infrastructure consists of VM’s that you provision as part of agent pools, however you don’t manage them directly.
    • With Azure Container App, upgrades are automatic. All underlying infrastructure is managed by the platform.
    • With Azure Spring Apps, all tasks related to upgrading and managing the underlying infrastructure are taken care of by the platform. While Azure Spring Apps is built on top of an AKS cluster, that cluster is fully managed.
  • AKS, ACA and Azure Spring Apps offer a convenient approach to implementing the microservices architecture. They also provide support for Spring Boot applications. If you decided to choose Azure App Service, you would need to create a new web app instance for each microservice, while both AKS and Azure Spring require only a single instance of the service. AKS also facilitates controlling traffic flow between microservices by using network policies. And with ACA, you need to create a separate container app for each microservice but in the same secured boundary , i.e container app environment.
  • Azure Spring Apps offers an easy migration path for existing Spring Boot applications. This would be an advantage for your existing application.
  • Azure Container Apps eliminates any administrative overhead required to run a Kubernetes cluster. This simplifies the operational model.
  • AKS would require an extra migration step that involves containerizing all components. You will also need to implement Azure Container Registry to store and deploy your container images from or you could use a publicly available Docker repository.
  • Running and operating an AKS cluster introduces an additional effort.
  • Azure App Service scalability is more limited than AKS or Azure Spring Apps Service.
  • Both Azure Spring Apps and Azure Container Apps have built in components for Spring Cloud components. This will give you less services you’ll need to deploy and operate.

Given the above constraints and feature sets, in the case of the Spring Petclinic application, Azure Spring Apps, Azure Kubernetes Service and Azure Container Apps represent the most viable implementation choices.