RazorPay Benefitting from AWS
AWS (Amazon Web Services) is a comprehensive, evolving cloud computing platform provided by Amazon that includes a mixture of infrastructure as a service (IaaS), platform as a service (PaaS) and packaged software as a service (SaaS) offerings. AWS services can offer an organization tools such as compute power, database storage and content delivery services.
AWS has a staggering 31% market share in the cloud service industry and leading it. That means a huge chunk of the internet runs on AWS’s infrastructure.
Lets see how not just MNC but early stage start-up uses and benefit from use case featured in AWS Case Study.
Founded in 2015 and headquartered in Bangalore, India, Razorpay provides payment-gateway services used by more than 30,000 merchants. This fintech company is currently having the biggest market share in payment’s gateway and rapidly diversified into many product vertical. And they did not do this by focusing on the infrastructure, but rather on product and customer. Thanks to AWS for making it possible and helping out Raporpay overcoming this challenge.
“Forty percent of online transactions in India were failing, causing a sizable financial loss for the country’s merchants,” says Shashank Mehta, Product Director at Razorpay
Razorpay needed an infrastructure that could support the above objectives as well as a predicted rapid increase in demand post launch. The infrastructure also needed to support fluctuations in demand. These changes could occur due to increases in payment transaction volumes during certain times of the day; when market conditions changed; or when the government made far-reaching policy changes. Furthermore, the infrastructure had to deliver the reliability required for Razorpay and its merchants to operate e-commerce services continuously. “These companies could not afford downtime because it would directly affect their revenue and ultimately their reputation among current and prospective customers,” says Mehta. Razorpay also needed to minimize latency to provide performance that enabled merchants to deliver a fast, competitive user experience. “Delivering such an experience is vital in the world of e-commerce where dissatisfied customers can move to a competitor’s website in seconds,” says Mehta
The AWS Magic
After conducting a detailed evaluation of the Amazon Web Services (AWS) Cloud and other cloud providers, Razorpay opted to deploy its payment-gateway and associated systems on AWS. “The other providers did not have the reliability we needed at that point, whereas AWS could deliver high availability, rapid scalability, and seamless performance, as well as services that could automate functions such as load balancing, domain name system management, storage, and queueing,” says Mehta. “AWS also complied with the Payment Card Industry Data Security Standard (PCI DSS), ensuring we could accept transactions from branded cards from companies such as Visa, MasterCard, and American Express.”
Razorpay’s in-house team then designed and deployed an infrastructure for the business in the US East (Northern Virginia) Region. The infrastructure included Amazon Elastic Compute Cloud (Amazon EC2) instances running in an Auto Scaling group that automates the process of scaling resources to meet demand, as well as AWS CodeDeploy to automate application deployments to Amazon EC2 instances. Razorpay uses Elastic Load Balancing to distribute application traffic across Amazon EC2 instances to optimize application performance, Amazon ElastiCache to provide a cloud-based in-memory data store and cache, and Amazon Relational Database Service (Amazon RDS) to run a MySQL database of payment-transaction details including payment methods used. The company also uses Amazon Simple Storage Service (Amazon S3) to store static assets, and AWS Lambda to run serverless compute resources.
When AWS decided to launch an Asia Pacific (Mumbai) Region in June 2016, it presented opportunities for Razorpay to reduce latency and fulfill data-sovereignty requirements. The business was planning applications and services that needed to comply with legislation that required sensitive data about Indian merchants and customers to be located within India. The business started to review options for migrating its AWS infrastructure from the US East (Northern Virginia) Region to the Asia Pacific (Mumbai) Region. “We spoke to AWS and their representatives gave us a few options for the data migration,” says Mehta, “The critical nature of our business for merchants meant we had to complete the project with downtime of less than 10 minutes.”
After considering its options, Razorpay chose to take advantage of the cross-region replication features of the Amazon Aurora relational database engine. “We decided to use Amazon Aurora to set up a slave of our master MySQL database in the US East Region, and since this service supports cross-region replication, we could set up a replica Amazon Aurora in Asia Pacific (Mumbai) Region and seamlessly transfer data across,” says Mehta.
Razorpay set up the replication process the day before the migration was scheduled to ensure a smooth data flow between the regions as required. During the migration process, Razorpay shut down replication and moved its domain name system (DNS) to the Mumbai data center. Rapid DNS propagation helped ensure the process was completed with minimum disruption to merchants.
Benefits of AWS
- Pay as you go, has helped the startup to have the cost to minimum.
- Rapid Scalability, Availability, Security Compliance and almost close to zero downtime
- Completed migration to Amazon Asia Pacific South (Mumbai) Region with less than four minutes downtime
- Reduced latency from 400 milliseconds to about 10 milliseconds
- Supported 150% increase in traffic with no impact on performance or availability
The major advantage for us in using AWS has been in our ability to focus on our applications rather than on our infrastructure.”
You can start by using the free tier service of AWS, EC2 and experience first hand what cloud could do for you and your project. Tip: Terminate the system and Keep checking the bill section timely, otherwise you have to pay which was not willing.
More detailed explanations of the various services and how to use them in future blogs. Till then keep clapping.