Before AWS, 20–30 percent of our time would be spent ensuring that servers are responsive. By using AWS, we simply deploy and maybe monitor for an hour and that’s it.
Abhilash Ramakrishna Chief Technology Officer, Halodoc

Established in April 2016, Halodoc brings together two formerly separate businesses, one for tele-consultation with healthcare professionals and one for the delivery of pharmaceuticals in 30 cities across Indonesia, all through its mobile application. The two medical services were formally merged under the Halodoc brand name in May 2017. Its third product—Lab—will launch by the end of 2017 and provide in-home lab services by qualified professionals. In metropolises such as Jakarta, Indonesia, it can take up to four hours to get to the hospital and back. Halodoc aims to improve access to healthcare and medicine through its app, and has 20,000 doctors and 1,000 pharmacies in its partner network. The startup also regularly engages in corporate social responsibility, such as facilitating tele-consultations with physicians for victims of natural disasters in remote provinces.

In the past six months, the mobile app has expanded its user base from 100,000 to nearly 600,000 and continues growing every month. A new feature is launched every second week by a three-person DevOps team led by Abhilash Ramakrishna, chief technology officer at Halodoc.

Until this year, the business relied on a “mixed bag” of technology solutions, including servers from RackSpace and Digital Ocean, with minor workloads on Amazon Web Services (AWS). Ramakrishna explains, “Whenever the traffic was high for our tele-consultations service, say by threefold, we would have to do a lot of firefighting to ensure our servers continued working.” In addition, for each new release and app update, the team would spend two to three days monitoring and tuning system performance, which further drained their time and resources.

For Halodoc, latency during customer calls is a key measure of business success; ill patients don’t want to wait a long time for providers to answer their questions, and busy doctors don’t have time to wait for responses during online chats, either. The company wanted to make sure that response times—measured as latency lag time--between doctors and patients during teleconsultations would be less than five seconds for 95 percent of calls, and less than a second for 50 percent of calls.

Each member of Halodoc’s DevOps team had experience using AWS in previous companies, so they were comfortable with the AWS Management Console and could easily set up server instances. In late 2016, they began shifting more business onto AWS, starting with testing and developer environments. Once the team was confident running pre-production environments on the AWS Cloud, they started migrating business-critical workloads such as merchant delivery, closely monitoring performance.

Today the startup has 130 Amazon Elastic Compute Cloud (Amazon EC2) instances, using Reserved Instances for regular workloads and On-Demand Instances or Spot Instances to manage spikes in traffic up to three times its normal activity. “Since we moved our services to AWS and began using Auto Scaling groups with these other types of instances, a lot of our pain points have gone away,” says Ramakrishna.

Halodoc connects to an AWS Availability Zone (AZ) through the Asia Pacific (Singapore) region to ensure low latency, within its target range, for patient-doctor calls. It has about 3 terabytes of data on up to 40 database instances from Amazon Relational Database Service (Amazon RDS). The company relies on Amazon Simple Storage Service (Amazon S3) for saving documents and images such as doctor’s prescriptions. Amazon CloudFront accelerates static and dynamic content delivery, and Amazon Route 53 is used for networking. All the workloads for its new Lab in-home service, also available through the Halodoc mobile app, were built on AWS Lambda (Lambda), which allows for seamless scaling regardless of traffic volumes.

Now that more than 90 percent of workloads have been migrated to the AWS Cloud, Halodoc has automated much of its deployment and database scaling, saving both time and money, while also improving availability. “Before moving to AWS, 20–30 percent of our time would be spent ensuring that servers are responsive. By using AWS, we simply deploy and maybe monitor for an hour and that’s it. Instead of carrying out routine maintenance, our DevOps team spends time thinking about products for our users,” says Ramakrishna. This enables the business to bring new app features to market about 30 percent faster than with the previous setup.

Data integrity and persistence is also vital in the healthcare industry. The Indonesian government requires all healthcare data be maintained for at least five years. By using Amazon RDS, Halodoc ensures that data stored in its app is never lost. “Things like automatic backups, snapshots, and multi-zone availability are taken care of, so we never have to spend time on that,” Ramakrishna adds.

Like most startups, Halodoc constantly strives to reduce its operational costs. The company’s management works closely with AWS to pursue continuous cost optimization models. For example, most of the 20–30 percent cost savings achieved have come through extensive use of Reserved Instances on Amazon EC2 and Amazon RDS, instead of Spot Instances or On-Demand Instances.

Switching to Lambda has also helped trim expenses. “Lambda gives us an easier way to scale, so we can easily spin up or shut down instances,” says Ramakrishnan. “This becomes very important when launching new services like Lab, where we don’t know what to expect for demand or traffic patterns.”

In the six months since rebranding, the Halodoc app has notched over 500 percent growth in its user base. Its cloud architecture can scale seamlessly, and the improved system velocity, as well as automated monitoring through Amazon CloudWatch, enables the tech team to immediately address any bugs or other feedback received from app users.

Halodoc plans to invest heavily in continuous integration/continuous delivery (CI/CD) projects, and it is looking to adopt AWS tools to accelerate its plans. Ramakrishnan concludes, “AWS has enabled us to achieve our goals, also reaching out to give advice when we are stuck. It’s been a fantastic collaboration so far.”

Learn more about how AWS can support your expanding mobile applications.