Medlife Uses AWS to Efficiently Manage Containers and SMS

Source: crn.in

India’s healthcare system is vast and dispersed, with both public and private systems in place and varying degrees of quality between rural and urban clinics. Providers are often spread across great distances, and patients may have to visit three or more sites to access care. Medlife was launched in 2014 as an online pharmacy and one-stop healthcare platform, offering consultation with in-house doctors via outbound calls, as well as lab services at its diagnostic center in Bangalore. Catering to around 3,000 cities across India, Medlife currently owns and operates 40 proprietary fulfillment centers to provide a seamless customer experience.

Secure Service Delivery for SMS

Medlife was born on the cloud, choosing Amazon Web Services (AWS) for the maturity of its offerings. Because Medlife is a healthcare company, data privacy is paramount. The fact that AWS possesses certification, such as ISO 27001 and ISO 9001, gave Medlife confidence that its data would be secure.

The startup began using Amazon Simple Notification Service (Amazon SNS) to send Short Message Service (SMS) texts to customers following reports about some data that might have been compromised by third-party vendors. “We didn’t want to compromise data security. Hence, we went ahead with Amazon SNS due to the additional security that it had to offer, and the delivery timespans were quite fast,” says Pranesh Vittal, database architect at Medlife.

SMS is a widely used communication channel in India, where the number of mobile subscribers outnumbers that of people with email addresses. Medlife sends up to three messages to customers, who are expecting delivery of their medicine, to confirm details such as order receipt and estimated delivery time. With its previous provider, there were issues with dropped messages, which resulted in lost orders and hence lost revenue. Since migrating to Amazon SNS, the service level agreement for SMS notifications has improved from 92 percent to 97 percent and is continuing to see improvement. Medlife now monitors messaging status and security features using Amazon CloudWatch and is alerted to any anomaly in usage patterns.

From Meta to Micro

Medlife has always been DevOps-oriented and has recently shifted from a meta architecture to a microservices approach using Amazon Elastic Container Service (Amazon ECS). In just two years they have grown from 5 to 40 microservices, which mostly pertain to orders, procurement, and inventory management. Most of these microservices are managed using container services, and this has

helped streamline the business by accelerating the time from prototyping to production. Decoupling the application’s core features has enabled DevOps engineers to deploy changes more frequently. The team was previously doing two releases a week—now it is doing two a day.

“Amazon ECS works like a charm for setting up our containers and deployments,” says Vittal. As early adopters of new technology, Medlife was among the first users of Amazon ECS after it launched in Mumbai in December 2017, having already used the service out of Singapore. “AWS provides us with a great ecosystem to innovate, prototype, experiment, and finally take things to production in a fast manner, which in turn helps grow our business,” he adds.

Automation and Autoscaling

The AWS Managed Services offering, the DevOps principles, and a microservices approach have all contributed to Medlife’s success. “Given that we had a high degree of automation, we were able to manage our production environment with a very small team, which was a huge cost benefit,” Vittal says. Medlife has experienced a surge in customers in the past eight months, recording 10 times the growth from its second to third year of operations.

“AWS is extremely helpful in scaling up whenever we need it,” Vittal says. “The autoscaling works miraculously well, especially during surges. Everything has contributed to us servicing more orders. We just have to concentrate on our business growth and let AWS manage the infrastructure.”

Machine-Learning Mindset

As part of its automation toolkit, Medlife runs several machine-learning (ML) algorithms on AWS. One of these is its proprietary stock prediction tool, which must maintain sub-second latency to accurately match each order to the corresponding stock. The company has recently invested a lot of time in setting up Amazon Elastic MapReduce (Amazon EMR) clusters to support ML operations as well as batch processing, inventory prediction, and other analytics-related use cases.

Predictably, Medlife’s online pharmacy experiences spikes in traffic during marketing campaigns. Previously, the database often became slow during such heavy-traffic periods. Medlife uses MongoDB for its primary database, which is deployed on Amazon Elastic Cloud Compute (Amazon EC2) instances. Vittal and his team of architects were impressed with the performance of Amazon ElastiCache for Redis while conducting a proof of concept to address the speed challenge. Amazon ElastiCache for Redis now serves as a caching layer for some of the static data to help reduce the load on Medlife’s database servers.

Premium Support

Since the beginning, Medlife has welcomed help to optimize its cloud infrastructure and has recently subscribed to the AWS Premium Support package. “We take help from the AWS solutions architects before implementing anything big, so we don’t miss out on any points and make sure to do things right on our first attempt,” Vittal says. For instance, when the company was running its proof of concept for Amazon ECS, AWS engineers were instrumental in helping debug issues in a timely manner.

In particular, Medlife plans to take advantage of the AWS Trusted Advisor feature to pinpoint potential cost reductions. “AWS puts a lot of emphasis on security and cost optimization and offers the right solutions for the right problems while keeping costs in mind,” Vittal shares. “All of the solutions given by the AWS solutions architects have worked wonders for us when it comes to cost optimization. It’s a great feeling when you are interacting with someone who really understands your pain because you are paying more than you should be.”

Innovation remains at the forefront of Medlife’s operations. Its management is now planning a data lake to gain further customer insights and strategize the expansion of existing business verticals. Medlife is exploring the use of video and images for product validation, as well as voice and chatbots for customer care. “Any innovation by AWS certainly benefits us in improving our own applications,” says Vittal. “Even to this day, AWS operates like a startup—rolling out new features every now and then to bring more value to customers like us.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.