How to use microservices with Azure Service Fabric
By Alex Bennett, Firebrand Training
Most applications are made up of multiple component parts, with each part providing a discrete service for your application. Traditional apps and their component parts (known as monolithic applications) are deployed to a single server. If you want to scale the application for high availability, you would add a second server and deploy another copy of your application.
Similarly, if you wanted to increase performance, you must replicate your application on a second server, adding a load balancer in front of it to distribute load.
But what if one part of your application needs to scale but the others don’t? What if their high availability needs are different (stateless or stateful), or what if you need to rollout a code update? Joining us to discuss monolithic applications and microservices is Mike Brown, Lead Azure Instructor at Firebrand Training.
Monoliths vs Microservices
With a monolithic application, a code roll-out could cause downtime to the whole application, and so would failure to an individual component. Plus, each component has to be scaled together which can get expensive.
In microservices architecture, each component part of an application can be separated out. Each component part becomes a service that can run, scale and be updated independently of the others. This means you can target resources where they are needed, reduce costs and increase performance and reliability.
That said, microservices do introduce fresh challenges to developers: how do the separate services of an application communicate with one another? How do we monitor, scale, update and secure these microservices?
Enter Microsoft Azure Service Fabric
Azure Service Fabric, a platform designed to take away some of the complexity of running microservice applications, is the answer. This distributed systems platform makes it far easier to package, deploy and manage scalable microservices and containers. Plus, it’s designed for cloud-first, but can also be used within hybrid scenarios.
It allows you to build applications composed of microservices that run at a high density on a shared pool of machines – called a cluster. If you were to build this on-premises, matching the performance of Service Fabric would be far too expensive. Instead, Azure SF gives you the infrastructure to do this.
Instead of having to worry about building these elements and handling interconnectivity between different parts of your services, Azure Service Fabric handles the heavy lifting. This means you can concentrate on the elements that drive your business, like the code itself.
Ultimately, developers and administrators will be able to avoid complex infrastructure problems and focus on implementing mission-critical workloads that are scalable and reliable.
Service Fabric already powers many of Microsoft’s services, including Azure SQL Database, Azure Cosmos DB, Cortana, Power BI, Dynamics 365, Skype for Business and more. It provides:
- High Availability
- Hyper-Scale
- Rolling Upgrades and Automated Rollback
- Support for both stateless and stateful applications
- Health Monitoring
- Container Orchestration and Lifecycle Management
- Balancing of resources across the Service Fabric cluster
Azure Service Fabric also integrates with other Azure services like API Management, DocumentDB and Azure Functions. It supports any code and allows you to create clusters on other public or hybrid clouds.
Service Fabric on Linux was recently introduced, allowing you to run microservices applications for Service Fabric for both Windows Server and Linux.
How to learn more about Microservices on Azure
To find out more about Azure Service Fabric, start with Microsoft’s extensive documentation, which includes tutorials, samples and how-to guides.
Microsoft also host a relevant microservices course on the Microsoft Virtual Academy. Exploring Microservices in Docker and Microsoft Azure is a great introduction to microservices on Azure, as it compares the functionality of microservices and containers.
This virtual course forms a great accompaniment for professionals that have passed (or are aiming to attempt) the Developing Microsoft Azure Solutions exam (70-532). By attending this MVA course and passing the 70-532 exam, you and your team will build a foundation in Azure development with a focus on microservices.