About the Project

The company (under NDA) is one of the biggest free telemedicine solution providers which allows doctors worldwide to connect with their patients quickly, easily, and efficiently with the patient experience in mind. The platform is HIPAA, GDPR, PHIPA/PIPEDA, and HITECH compliant.

Since the lockdown, the platform has been overwhelmed with an immense request spike of 500k daily users. The infrastructure eventually required more resources that were at first ensured by vertical scaling. This solution turned out to be extremely expensive and the client's team had to contact a cloud consulting firm.

The company addressed OpsWorks Co. seeking the scaling and uptime solutions that were later successfully implemented.

Goals of the Project

Migrate the infrastructure to AWS


The company's HIPAA compliance had been ensured by a third-party contractor which provided ready-to-use servers and MySQL databases that were pre-configured to follow HIPAA requirements. Since most of the AWS tools are HIPAA compliant by-default, we decided to migrate the company's infrastructure to AWS which not only would ensure compliance and allow for quick and safe scaling, but would also optimize infrastructure expenses. Our main goal was to introduce cost reduction without affecting performance and security. We decided to avoid re-architecting at this point, but in the future we are going to build everything on top of AWS Elastic Kubernetes Service, giving us even more efficiency and availability. During the migration we discovered a bottleneck in the docker-flow-proxy configuration that was an initial single-thread, and as result Docker Swarm workers were under-utilized. After fine-tuning docker-flow-proxy, we were able to utilize all CPU cores equally and reduce the number of worker EC2 instances without affecting the overall performance.

Why AWS?

Choosing AWS as a cloud provider that can meet all company's needs seems the most sensible solution for various reasons. Starting with the coverage. The company's employees are located in several different countries, not to mention that the client's platform is available worldwide. Migrating to AWS allowed the team to ensure quick and secure service all over the world. All the services used to build the infrastructure are secure, highly available, and easy to maintain. The simplicity and the beneficial cooperation conditions with AWS became an essential factor while choosing a cloud provider. One more critical factor is that many AWS services are compliant to different security standards by default. This allowed us to eliminate the need for a third-party servers provider and cut cloud expenses threefold.

We have managed to provide an opportunity for quick application scalability (within the current budget). This solution gives an opportunity to provide services to a growing number of telemedicine application users. At the same time the total bill for the infrastructure was reduced by 3x compared to the 3rd party's infrastructure provider.
Next steps
The current infrastructure is not at its final architecture version. During the next iterations we are going to re-architect the environment implementing Amazon Elastic Kubernetes Service as a Container Orchestrator instead of Docker Swarm for better scalability and maintenance excellence. It will require additional work with the development team to make the migration smooth and flawless.
Technologies we use