Containerized Java REST Services on Azure App Service with a CosmosDB backend

Project Health

API Build Status: Build Status

UI Build Status: Build Status

Infrastructure Build Status: Build Status



This project was created to demonstrate end-to-end best practices building and running "enterprise-class" applications on Azure. This document explains what the project provides and why, and it provides instructions for getting started.

Enterprise-Class Applications Defined

We are using the term "enterprise-class app" to refer to an end-to-end solution that delivers the following capabilities:

OSS Technology Choices

Our team, Commercial Software Engineering (CSE), collaboratively codes with Microsoft's biggest and most important customers. We see a huge spectrum of technology choices at different customers, ranging from all-Microsoft to all-OSS. More commonly, we see a mix.

Given the wide range of technology choices, it's difficult to create a one-size-fits-all solution. For this project, we selected a set of technologies that are of interest to many of our customers.

This OSS solution uses the following OSS technologies:

Azure Technologies & Services

As with our OSS technology choices, we intentionally selected a set of Azure technologies and services that support common enterprise requirements, including:

Note: App Services is appropriate for a wide range of enterprise apps, including certain highly scaled apps, though we often recommend Azure Kubernetes Service (AKS) for apps that require certain advanced capabilities.

The solution leverages Azure Dev Ops for Continuous Integration and Delivery (CI/CD), and it deploys complete Azure environments via Azure Resource Manager (ARM) templates.

Key Benefits

Key technologies and concepts demonstrated:

Benefit Supporting Solution
Common, standard technologies
  • Java programming language
  • Spring Boot Framework, one of the most widely used frameworks for Java
  • MongoDB NoSQL API (via Azure Cosmos DB)
  • Redis Cache
  • Containerization Microservices implemented in Docker containers, hosted by the Azure App Service for Containers PaaS service.
    CI/CD pipeline Continuous integration/continuous delivery (CI/CD) is implemented using Azure DevOps with a pipeline of environments that support dev, testing and production
    Automated deployment
  • Azure ARM templates
  • App Service for Containers
  • Azure container registry
  • High Availability/Disaster Recovery (HA/DR) Full geo-replication of microservices and data, with automatic failover in the event of an issue in any region:

  • Cosmos DB deployed to multiple regions with active-active read/write
  • Session consistency to assure that user experience is consistent across failover
  • Stateless microservices deployed to multiple regions
  • Health monitoring to detect errors that require failover
  • Azure Traffic Manager redirects traffic to healthy region
  • Demonstrates insfrastructure best practices
  • Application auto-scaling
  • Minimize network latency through geo-based DNS routing
  • API authentication
  • Distributed denial of service (DDoS) protection & mitigation
  • Load and performance testing The solution includes an integrated traffic simulator to demonstrate that the solution auto-scales properly, maintaining application performance as scale increases
    Proves application resiliency through chaos testing A Chaos Monkey-style solution to shut down different portions of the architecture in order to validate that resilience measures keep everything running in the event of any single failure


    See for more information.