In my previous article, I talked about key differences between Microservices and Monolithic architecture. In the last few years we have seen an immense growth in the available options to host our services. Cloud has definitely played a key role in accelerating the adoption to the microservices architecture and making it relatively easy.
In this article I talk about different available options to host your microservices architecture.
Table of contents:
- Platforms to host microservice applications
I am sure in your day to day life you would have experienced services that would have made you wonder about the complexities associated with designing, developing, and deploying large-scale applications at cloud scale. Frequent updates to large-scale, always on applications is a challenge, no matter how well designed the application is. Just dropping microservices into virtual machines or even containers does not enable the full potential of the microservices approach, that requires a microservices application platform with DevOps-focused tooling.
A full-featured microservices application platform provides all the previously stated microservices architecture benefits of cost efficiency, scalability and 24×7 availability. It also takes these a step further. As mentioned earlier, it should choreograph safe and reliable upgrades using an extensible health model and automatic rollback. It also helps microservices to discover each other by providing a naming service, and monitors and maintains their health. For example, when scaling or healing, a microservices platform communicates updated placement information to other microservices via the naming service so that they can quickly establish or re-establish communication.
To keep microservices healthy, the platform automatically moves instances to healthy VMs or servers when the software or hardware on which they are running fails or must be restarted for upgrades. In addition, a microservices platform must be deployable in private and public clouds. This is necessary to support hybrid scenarios where workloads burst from a private cloud to a public one, and to enable public cloud dev/test with production deployment in a private cloud. Supporting multiple clouds also addresses concerns about vendor lock-in when choosing an application platform, separating the platform from the infrastructure.
This section briefly describes several popular platforms on which developers are building and deploying microservices applications today. All of the below can run on Azure infrastructure, giving you choice based upon your requirements.
The standard packaging format and resource isolation of Docker containers have made them a natural fit with microservices architectures. Docker Compose defines an application model that supports multiple Docker-packaged microservices, and Docker Swarm serves as a cluster manager across a set of infrastructure that exposes the same protocol that a single-node Docker installation does, so that it works with the broad Docker tooling ecosystem. The Azure Container Service supports both Docker Swarm and Docker Compose. More details running this on Azure can be found here.
Kubernetes is an open-source system for automating deployment, operations, and scaling of containerized applications. It groups containers that make up an application into logical units for easy management and discovery. Originally developed by Google, it builds on their experiences running large scale services such as Search and Gmail. Even some traditional PaaS solutions are merging with Kubernetes, like Apprenda. More details running Kubernetes on Azure can be found here.
Microsoft and Mesosphere have partnered to bring open source components of the Mesosphere Datacenter Operating System (DCOS), including Apache Mesos and Marathon, to Azure. The Mesosphere DCOS, powered by Mesos, is a scalable cluster manager that includes Mesosphere’s Marathon, a production-grade container orchestration tool. It is available as part of the Azure Container Service. There is also an enterprise version available from Mesosphere that runs on Azure. The Mesosphere DCOS provides microservices platform capabilities including service discovery, load-balancing, health-checks, placement constraints, and metrics aggregation. Finally, Mesosphere offers a library of certified services that provide additional capabilities, like Kafka, Chronos, Cassandra, Spark and others, which can all be installed with a single command. More details running this on Azure can be found here.
OpenShift by Red Hat is a platform-as-a-service offering that leverages Docker container-based packaging for deploying container orchestration and compute management capabilities for Kubernetes, enabling users to run containerized JBoss Middleware, multiple programming languages, databases and other application runtimes. OpenShift Enterprise 3 offers a devops experience that enables developers to automate the application build and deployment process within a secure, enterprise-grade application infrastructure. With recent support for Red Hat Enterprise Linux images in Azure, OpenShift is supported in Azure. Look for some documentation on this topic shortly.
Pivotal Cloud Foundry enables microservice architectures by combining workflow and container scheduling from Cloud Foundry with integrations for microservice patterns like service discovery, client side load balancing, circuit breakers and distributed tracing, utilizing Spring Cloud and NetflixOSS. Pivotal Cloud Foundry supports ongoing microservice operations via deployment and service management capabilities such as autoscaling, blue-green updates, health monitoring, application metrics, streaming logs and more. Learn more about running Pivotal Cloud Foundry on Azure here.
To support our own internal evolution from on-premises to cloud and from monolithic to microservice-based applications, we developed Service Fabric over ten years ago. Service Fabric powers many of our hyper-scale cloud services, including SQL DB, DocDB, Intune, Cortana and Skype for Business, as well as many internal Azure infrastructure services. We’ve taken the exact same technology and released Service Fabric as-a-service on Azure, and the standalone SDK will enable the deployment of Service Fabric applications in on-premises clusters and on other clouds. In its initial public release, Service Fabric runs on Windows with any .NET language and Linux and Java support are under development. Service Fabric has built-in support for lifecycle management, hybrid deployments, and 24×7 availability with integrated development experiences using Visual Studio. The platform offers extensible health models for both the infrastructure and microservices to enable automated health-based upgrade and automatic rollback, simplifying DevOps. Furthermore, Service Fabric supports both stateless and stateful microservices with leadership election to support data consistency and a state replication framework that supports transactions for stateful data guarantees. More details running this on Azure can be found here.