Pratilipi Improves User Experience and Gains Millions of Users with AWS

Elevenia

Meeting a Growing Demand for Non-English Content

Startup Pratilipi is an Indian language storytelling platform that offers books, short stories, and essays in nine Indian languages including Hindi, Gujarati, Bengali, and Marathi. It is estimated that about 90 percent of Indians do not speak English and consume content in other official languages instead. The number of internet users consuming non-English content in India currently is more than 234 million, and the figure continues to grow as more people access the internet thanks to widespread connectivity and the falling price of smartphones.

“Today, the platform has 99.999 percent availability owing to the effectiveness of those AWS managed services.”

Gauri Kanekar, Vice President of Engineering, Pratilipi

  • About Pratilipi
  • Benefits
  • AWS Services Used
  • About Pratilipi
  • Pratilipi runs a storytelling platform for users to upload books, short stories, and essays in India’s multiple official languages. More than 400 million pieces of content have been accessed on the platform.

  • Benefits
    • Seamlessly migrates to microservices
    • Focuses more resource on DevOps
    • Conducts 4,500 code deployments in 12 months
    • Reduces API latency to milliseconds
    • Achieves 99.999 percent platform availability
  • AWS Services Used

The Switch from Monolithic to Microservices

Pratilipi launched in 2015, and its CTO at the time built the platform’s single-tiered monolithic application to run on the Google Cloud Platform (GCP). When Gauri Kanekar, vice president of engineering at Pratilipi, took over platform development responsibilities in 2017, she discussed with the then CTO, Prashant Gupta, the trade-offs of rewriting the application to run in a microservices architecture. The goal was to make the application more scalable and easier to develop. Kanekar ran a proof of concept (POC) for running microservices on GCP and on Amazon Web Services (AWS).

“During our POCs, we found that microservices on the AWS Cloud was easier to control, and Kubernetes on AWS was more predictable,” says Kanekar. “With GCP, we had an auto-scale feature, but sometimes it behaved oddly, spinning up multiple virtual machines. It was unclear how we could specify the minimum or maximum number of virtual machines we wanted. With auto-scaling on AWS, we could specify the number very clearly.”

Simplifying Deployment While Cutting Overhead

The Pratilipi engineering team rewrote its application code for microservices with Amazon Elastic Container Service (Amazon ECS) as the orchestration service. Over a period of four months, the team finished the code changes, completed testing, and migrated all data from GCP to AWS. “Once we’d made the migration, even a junior member of our engineering team could deploy code without any training because of the simplicity of Amazon ECS,” says Kanekar.

Pratilipi uses Amazon Relational Database Service (Amazon RDS) to store user details as well as all published content. Platform imagery and audio are stored in Amazon Simple Storage Service (Amazon S3). Comments Kanekar, “Because Amazon RDS is a managed service, we don’t have the overhead of hiring a database administrator and allocate the saved resources towards hiring developers instead. In addition, the scalability of Amazon S3 means we can continue adding images and audio to our platform without capacity issues. Plus, we can develop our big data analytics capabilities, using Amazon S3 as a data lake.”

A Data Lake Helps Understand Users Better

Pratilipi is creating a data lake on Amazon S3 to analyze user behavior and better understand how people are reacting to marketing campaigns. Every day, Pratilipi sends out a total of six million emails to users via Amazon Simple Email Service (Amazon SES), promoting titles of books, short stories, and essays on the Pratilipi platform. It can improve the effectiveness of those emails by tailoring messaging as it understands customer behavior better. Today, Amazon Kinesis captures data from user interactions on the platform and deposits the information in Amazon S3—about 40 gigabytes a day. The data is then pulled into Pratilipi’s customer relationship management and marketing systems to understand the impact of campaigns. The engineering team also runs Amazon Athena against log files in the data lake for daily platform performance metrics.

Nine-Person Engineering Team Makes 4,500 Code Deployments in a Year

By migrating to AWS and Amazon ECS, Pratilipi has increased its pace of code development. In 2018, the nine-person Pratilipi engineering team made 4,500 code deployments. According to Kanekar, the company would have achieved just 25 percent of that figure if it had retained its monolithic application on GCP.

“For a startup with a small engineering team, being able to deploy code so easily helps us to experiment a lot,” says Kanekar. “For instance, we ran some test code to see if we could divide up data traffic to improve performance.” The company operates identical production environments in blue and green mode. It runs tests code in the blue, idle environment, using the continuous integration/continuous deployment capabilities in Amazon ECS, before switching it across to the green, live mode. “In this instance, our experiment was a success, and we deployed the code to our live environment. If it hadn’t worked, we would have killed the code quickly and moved on to another experiment.”

Improving Customer Experience with APIs Resolving in Milliseconds

In addition, Pratilipi users can access content faster since the migration to AWS. In the past, users often couldn’t access Pratilipi’s mobile platform or download content through their smartphones because of the time it took for the APIs between their devices and the platform to resolve. The company needed to fix the problem as soon as possible because many of its customers access the platform using mobile devices in parts of India where the networks are 2G. “Today, the platform has 99.999 percent availability owing to the effectiveness of those AWS managed services.” comments Kanekar.

Enhancing User Experience Propels Growth in Regular Users

Pratilipi dedicates more resources to innovation rather than infrastructure management now that its application is running in a microservices platform, with AWS managing key infrastructure services such as servers, storage, and networking. Today, the platform has 99.999 percent availability owing to the effectiveness of those AWS managed services. Kanekar believes this has been a key factor in Pratilipi’s continued growth. “Since we started running on AWS, we have seen our user numbers increase from two million to more than six million monthly active users. We can attribute part of that growth to the stability that AWS provides for a better user experience.”

Learn More