AWS Public Sector Blog
Evolving to a Microservices Architecture in Public Sector IT Organizations: Phasing in Containers and Serverless for Microsoft .NET Applications
Imagine this scenario: it’s the last day to file a business permit renewal. You are a small business owner who goes online, completes a renewal form, and clicks “submit.” Behind the scenes, processing ensues. While you wait for the business permit to be processed, you wonder why the system doesn’t instantly accept and approve your form. Why not have the back-end processing take place separately so you can receive a notification a few minutes later with your permit attached?
User experience is defined by how well an application has been architected, developed, and deployed. In this example, if a public sector IT group chose to design an application that decoupled the tasks of accepting an online application submission and processing it, the experience could be transformative for citizens. By altering the architecture of an application to improve usability, user satisfaction will remain constant and consistent, whether there are five users or 10,000.
Improving User Experience: A Monolithic Versus a Microservices Architecture
Many public sector organizations are still developing and deploying applications under a monolithic architecture. With monolithic architectures, processes are tightly coupled and run as a single service. If one process of the application experiences a spike in demand, the entire architecture must scale. Adding or improving a monolithic application’s features becomes more complex as the code base grows. This complexity limits experimentation. Monolithic architectures also add risk for application availability because many dependent processes increase the impact of a single failure.
With a microservices architecture, an application is built as independent components that run each application process as a service. These services communicate via a well-defined interface using lightweight APIs. Services are built for business capabilities and each service performs a single function. Because they are independently run, each service can be updated, deployed, and scaled to meet demand. With the adoption of a microservices environment, an IT group can experience:
- Agility: Microservices foster an organization of small, independent teams that take ownership of their services.
- Flexible scaling: Microservices allow each service to be independently scaled to meet demand for the application feature it supports.
- Easy deployment: Microservices enable continuous integration and continuous delivery, making it easy to try out new ideas and to roll back if something doesn’t work.
A Phased Approach to Microservices
Adopting a microservices architecture can be a catalyst for organizational change. Whether altering a legacy application or writing a new one, adopting microservices will involve a phased approach.
Phase 1 – Lift and Shift: The lift and shift of an existing monolithic application into a cloud environment is a logical first step. In this initial phase, organizations can take advantage of cloud-native capabilities to improve availability, security, and data durability. This initial phase also enables a transition to a more flexible on-demand model, reducing hardware management requirements and simplifying license management. Let’s use an example of a .NET application in the AWS Cloud. Organizations can immediately enhance deployments using AWS Elastic Beanstalk and increase uptime with features such as Amazon EC2 Auto Recovery and elastic load balancing across multiple Availability Zones. Phase 1 enables improved application performance and availability and sets the foundation for taking advantage of additional cloud-native features.
Phase 2 – Evaluating the Code Base to Use Cloud-Native Features: The second step is focused on evolving the application code base to provide greater flexibility and modularity. Addressing specific items within the code can help make an architecture more flexible to take advantage of cloud-native features. For instance, many permitting applications require submission of supporting documentation. A win might involve moving static user content storage off the application server file system or database into Amazon Simple Storage Service (Amazon S3). Decoupling storage from the application servers enables the application to scale more easily, while providing cost-efficient, highly durable storage.
Evaluating the code base helps convert it into a container-friendly platform. The. NET Framework includes libraries that a user might not need – making the code base unwieldly and slowing down the deployment of a Windows container. To remedy the situation, an existing .NET Framework codebase could be converted to .NET Core, which is lighter weight and designed for cross-platform deployment. .NET Core 2.1 is supported within AWS Lambda and enables containerized deployments on both Microsoft and Linux platforms. Microsoft has published the API Portability Analyzer tool to evaluate existing .NET Framework assemblies against .NET Core to generate a report on APIs that are not portable.
Phase 3 – Containers and Serverless in a Microservices Environment: In a microservices architecture, taking our example of .NET Core, the application should now work on multiple operating systems, such as Windows, Mac, or Linux, by scaling an entire container image into a production environment across different instances in the cloud. The benefits of containers include:
- Lower Costs Deploying .NET Core applications to a Linux OS within AWS reduces Windows licensing costs.
- Greater Automation: Customers can utilize Application Load Balancers with the AWS Certificate Manager service to offload SSL/TLS encryption, reducing CPU load and making containers more efficient.
- Scaling: Container fleets can be scaled independently for automated deployment and testing. This would lead to faster code deployment and production while minimizing costs.
- Testing and Validation: Enables Blue/Green or canary configurations for zero-downtime deployments and easy rollback.
- Serverless Deployment: Enables serverless development with solutions such as AWS Fargate, which is a compute engine that allows you to run containers without managing underlying server capacity.
A Big Step towards DevOps and Automation
With application development evolving into microservices patterns, an IT organization can begin to build a DevOps model. Committing to the phases described above will evolve the development environment into a DevOps culture – bringing with it agility, faster deployment, and user-centric delivery. Visit here to learn more about adopting microservices.