Wellsheet’s EHR Transitions from Heroku to AWS with Cloud303

DevOps

Containerization

  • 3 October 2023
Share this post
AWS Funding Secured by Cloud303
  • Well-Architected
  • Migration Acceleration Program 2.0

About the Customer

Wellsheet is an intra-electronic health record (EHR), speciality-agnostic cloud platform that prioritizes clinical content within physician workflow with machine learning. Wellsheet provides a predictive clinical workflow platform that uses the Fast Healthcare Interoperability Resources (FHIR) API standards to work within an existing EHR to surface the most relevant content for clinicians in a view that is contextualized and prioritized for their needs.

Executive Summary

Wellsheet is an intra-electronic health record (EHR) platform that prioritizes clinical content within physician workflow with machine learning.

Its AI-powered workflow is intuitive and integrated with Epic and Cerner to reduce a clinician’s time in the EHR, lessening clinician burnout and improving the quality of patient care.

Wellsheet is being used by clinicians on the frontline battling COVID-19 to provide real-time diagnostic result alerts; visibility of all patients being tested or confirmed with COVID-19 by location, by attending physician, and by associated isolation status; and reduced exposure through shared workspaces.

The application was hosted in Heroku, which is a container-based cloud platform that offers Platform as a Service (Paas). However, as the application grew in usage and popularity, Wellsheet began to realize Heroku was not the right fit anymore due to certain significant limitations.

Among the biggest drawbacks Wellsheet faced with Heroku were the high costs and the inability to access the underlying code and infrastructure.

The Challenge

Cost

Wellsheet is a demanding EHR application. It requires changes to its backend infrastructure to be made in tandem with the growth of the platform. While Heroku fit the bill in the beginning, costs began to rise as time went on. This was mainly due to the way Heroku customers are charged based on the number and size of “Dynos” used. Dynos is a Heroku-proprietary Linux container where application processes are run. These Dynos can add up and cost a fortune in the long run, especially for an app as big as Wellsheet's.

Rigidity

As the Wellsheet platform grew with added intricacies to its infrastructure, Heroku’s fully-managed nature was holding them back. While it was convenient in the beginning, Wellsheet engineers eventually found it cumbersome because they could not tailor their back-end infrastructure according to the application’s needs due to Heroku automatically provisioning resources such as storage and database for the application. This proved to be a stumbling block in Wellsheet’s freedom to scale the application.

Scalability

Wellsheet was also desperate to hasten their exit from the Heroku ecosystem because of how tightly coupled the entire architecture was set up in Heroku. This proved to be a major disadvantage of being hosted in Heroku – it is not primed to support the complexities that microservices entail. The technological possibilities in the healthcare industry are endless, and Wellsheet sought a system that could cater to these possibilities. This meant that they needed to break out of their existing monolith on Heroku and dive into microservices, which would allow them to scale to their needs .

Why Cloud303?

  • Automation Expertise Cloud303 excels in automating tedious and complex tasks, making development and operations more efficient. Our expertise in CI/CD pipelines, Infrastructure as Code, containerization and automated testing ensures a faster time-to-market and more robust DevOps strategy.
  • Scalability and Performance With a deep understanding of microservices, containerization, and orchestration, Cloud303 provides scalable solutions that can handle varying workloads without sacrificing performance, ensuring that your systems can handle future demands.
  • Collaboration and Culture Recognizing that DevOps is as much about people and culture as it is about tools and processes, Cloud303 helps foster a culture of collaboration between development and operations teams to facilitate better teamwork and collective ownership of projects.
  • Proven Track Record Cloud303 has a strong history of successful partnerships within the Microsoft industry. Our commitment to excellence, reliability, and client-focused solutions have made us a trusted partner.

Engagement Overview

Cloud303's engagements follow a streamlined five-phase lifecycle: Requirements, Design, Implementation, Testing, and Maintenance. Initially, a comprehensive assessment is conducted through a Well-Architected Review to identify client needs. This is followed by a scoping call to fine-tune the architectural design, upon which a Statement of Work (SoW) is agreed and signed.

The implementation phase kicks in next, closely adhering to the approved designs. Rigorous testing ensures that all components meet the client's specifications and industry standards. Finally, clients have the option to either manage the deployed solutions themselves or to enroll in Cloud303's Managed Services for ongoing maintenance, an option many choose due to their high satisfaction with the services provided.

The Solution

After migrating the workload from Heroku, the application was decoupled into microservices using Docker. Wellsheet, which used to be hosted in a single container in Heroku, could now have its backend functions deployed into multiple containers in Amazon Elastic Container Services (ECS) on EC2, using the compute-optimized c5.2xlarge instance type.

Using CloudFormation, the application's compute resources was spread in private subnets over multiple availability zones in an autoscaling group behind an Application Load Balancer in the North Virginia region for high availability in a three-tier VPC. IaC drift detection, built in-house, was configured to ensure that all infrastructure deployments and changes are standardized and made exclusively via CloudFormation.

The pipeline was orchestrated using CircleCI as the build server integrated with GitHub as the version control system. Cloud303 built the Docker image on CircleCI, pushed the Docker image to an Amazon Elastic Container Registry (ECR), and then deployed it to ECS on EC2.

Various forms of testing, such as unit, integration and UI layer tests, for all environments (development, staging, production) were implemented for the entire CI process, making software delivery smoother, faster and more predictable.

All testing of the application's backend was conducted in a development environment. Topic branches based off the main branch were used for feature and bug fixes. These feature branches isolate work in progress from the completed work in the main branch. Development and testing are isolated into stages to detect problems earlier, and feedback loops are faster, allowing for more efficient debugging.

ECS cluster auto scaling (CAS) was enabled to provide more control over the scaling of the EC2 instances within the cluster. The ECS Service was configured to send metrics to CloudWatch, which triggers an alarm to add more tasks to the ECS Service, with the capacity provider set up to target the autoscaling group.

As part of HIPAA compliance, the entire infrastructure was encrypted at rest and in transit. Encryption was managed with KMS-CMK, including automatic annual key rotation - a HIPAA requirement. Wellsheet also needed to access data from their partner hospitals in a secure fashion, so Cloud303 deployed Transit Gateway into a separate VPC, along with a Network Load Balancer, to ensure data remained in a private network and remained HIPAA-compliant.

Engineer Quote

The robust toolset and best practices from Cloud303 made the migration from Heroku smooth and efficient. The use of Docker and ECS has enabled us to easily deploy and scale our application. It's been a fantastic journey to see how much more we can now achieve.

Xhefri Toro Principal Solutions Architect, Cloud303

Outcomes

By moving to AWS, Wellsheet has not only cut costs but also gained significant advantages in terms of performance, scalability, and compliance. It's a win-win situation for both the healthcare providers using the Wellsheet platform and the IT team managing it.

Latency: The new AWS infrastructure has reduced API latency by 25% compared to the previous Heroku setup.

Resource Utilization: With the optimized c5.2xlarge EC2 instances, CPU and memory utilization has been more efficient, reducing wastage by up to 30%.

Autoscaling: With the new ECS cluster auto-scaling, Wellsheet can now handle 3x more concurrent users during peak times without any performance degradation.

Microservices: The decoupling into microservices has allowed for independent scaling of various application components, making it easier to manage and scale horizontally.

Heroku dynos were very expensive for the computing resources Wellsheet were getting. For roughly the same price as a Heroku “2x” dyno with 1GB RAM, they could have rented an Amazon c3.large EC2 instance with 3.75GB RAM. A TCO analysis estimated that Wellsheet would spend around $15,000-18,000 a month on AWS as opposed to about $30,000 on Heroku. This amounted to at least $15,000 in savings per month.

A TCO analysis estimated that Wellsheet would spend around $15,000-18,000 a month on AWS as opposed to about $30,000 on Heroku.