Microservices for Healthcare: Ensuring Near-Zero Downtime for Healthcare Applications

Resources 8 min read
In this article
Sep 26, 2023
Author akash rastogi

Application development is considered the most intricate and time-consuming stage in healthcare services. Employing conventional methods like monolithic architecture poses challenges in various aspects, including service availability, remote service access, service provisioning, scalability, and integration of healthcare systems.

Hence, it is crucial to have a less complex and more user-friendly microservice architecture for healthcare systems. Following the microservice best practices allow for easy planning and development, low-cost maintenance requirements, and agile testing.

Overview: Service Layer Breakdown of Chronic Care Application

Our client is a healthcare service provider in the chronic disease space that serves patients with multiple regular condition treatments, improves personal health, manages population health, and supports clinical decisions, all through a single platform. To provide services globally, they maintain an extensive database of 50TB from thousands of connected devices, like mobile devices, lab devices, wearables, etc., used by hospitals, patients, and clinicians.

Their data type ranges from medical imaging data (such as X-rays, MRIs, and CT scans), genomic data, clinical trial data, patient-generated data, etc., which is utilized to address & manage population health, develop health plans, process claims by payers, and more.

Pitfalls in Existing Application

Addressing Scalability to Meet Global Demand and Database Growth

The monolithic architecture hindered the ability to scale the application efficiently to accommodate the growing global demand for their services and manage growing patient databases.

This investment aimed to address their expanding needs, as their database experienced data growth by 20% to 25% from previous years. Ensuring scalability and optimal performance became crucial to maintain responsiveness, handling increasing workloads, and managing efficient handling of data transformations, & segregation of services.

The healthcare application was needed to handle a significant volume of data exchange and message routing. Data ingestion from various devices posed challenges to efficiently analyzing the data through algorithms. Therefore, it was crucial to enhance their application for effective data transformation methods and enable their AI systems to utilize the data. This aspect played a vital role in their application.

Techment’s Cutting-Edge Microservice Solution for Healthcare:

Scalable Microservices with AWS ECS

The focus was on building microservice architecture that can divide the overall system load & scale up & down depending on demand.

We followed microservice best practices to build an architecture in AWS because it divided the responsibility of service into multiple isolated & manageable services. The on-cloud infrastructure allowed scaling based on demands, which resulted in performance enhancement and cost savings on infrastructure.

We developed the key concept with microservice to isolate the following functionalities:

  • Patient domain to manage their profiles.
  • Hospital domains to manage processes & store healthcare information.
  • Practitioner domain to allow them to manage their own profile & patient records.
  • Consultation service domain to allow patients & other users to choose consultation service.

Components Used: The major components of our solution were:

  • Java and SpringBoot are implemented as individual services, running on Amazon ECS instances.
  • Amazon Elastic Container Service (ECS) to support Docker containers and easily run applications on a managed cluster of Amazon Elastic Compute Cloud (Amazon EC2) instances. We have used AWS ECS to deploy the microservices containers using EC2 instances registered with ECS Cluster.
  • AWS API Gateway to pass on the client requests, handle traffic management, route the request to multiple microservice, and collate all responses into one & respond to the client.
  • AWS SNS (Simple notification service) to get the notification from the CloudWatch Event to notify & publish notifications to the preferred communication channel and send mail to configured email ids.
  • AWS App Mesh for different components of an application to interact and manage the delivery of service requests, various mechanisms such as service discovery.
  • GitHub for Source code version management & CI/CD pipeline action using GitHub actions.

The architecture contained Amazon Elastic Container Service (Amazon ECS) for orchestrating containers to simplify management, reduce cost, and deploy the microservices containers using EC2 instances registered with ECS Cluster. This provided an efficient and flexible solution for managing containers, enabling seamless container orchestration.

Amazon ECS automatically scaled containers based on the application’s demand, i.e., the growing user base. With AWS ECS, we could set up the monitoring for containers to notify the internal team of any failures or issues.

We used AWS SNS to help fully manage messaging services for application-to-application (A2A) and application-to-person (A2P) communication. This also established a notification channel for developers about the occurrence of errors and sent mail to configured email ids.

Since healthcare data were unstructured and voluminous, they did not depend on traditional object storage, but using AWS S3 made this fast. S3 also durably stored all images, patient data, event streams, claims, billing, medical prescriptions, application error logs, etc. Because it was flexible storage, it helped in saving infrastructure costs & effort.

To store sensitive information & secrets, AWS Secrets Manager provides a comprehensive solution for effectively managing, retrieving, and rotating various types of secrets- database credentials, application credentials, API keys, and other sensitive information.

This also allowed for regular updates and refreshes of the secrets, reducing the chances of unauthorized access or misuse through the automated rotation capability.

With AWS secret manager, the secrets like encryption keys, database credentials, passwords, third-party API keys, and even arbitrary text were protected.

Microservice for Healthcare (1)


With Spring Boot, microservices can start small and iterate fast as it enables building production-ready applications. The previous application was a Java-based framework, so for developers, it was easy to use Spring Boot for microservices.

It also allowed for loose coupling between components, making managing dependencies easier and promoting modular design.

Business Value Proposition:

  • Using Amazon S3 facilitated highly scalable, secured, and low-latency data storage from the cloud. With AWS S3, we could reduce the 15% cost of additional storage infrastructure.
  • As we decoupled different components or services within an application, the downtime was reduced to near zero; hence, it became available and accessible to users.
  • The application previously had a 5% error rate, which is reduced to 1%; hence, microservice enhanced overall application performance

To Wrap:

However, the best practices of microservice is the best possible approach for implementing scalability of the application & making it interoperable with different applications, but there are specific challenges while implementing it. Multiple small components needed and maintained presented monitoring and problem-solving issues.

It required acute awareness of every element involved. Additionally, it was crucial to handle these components’ configurations reliably across several environments.

The primary focus was creating microservice in AWS that effectively cater to the business capabilities rather than solely reducing code size or cost. Microservices significantly reduced the overall complexity of the system. 

About the Author:

Akash Rastogi 

Akash Rastogi is a Senior Technology Consultant and the Head of Web Technologies. He leads web development teams to deliver user-friendly & accessible websites that are compatible with a range of hardware and web browsers. To produce outstanding digital experiences, he oversees internationalization, privacy, security, and adherence to industry standards.


I agree to receive communications from Boldare. Communications may include updates on upcoming events, useful business insights and promotional materials about our services.

More Blog

In-depth design tutorials and the best quality design and Figma assets curated by the team behind Untitled UI.