sd®Let’s talk ↗
← All field notes
FIELD NOTES

High Availability on Razorpay Payments Dashboard

Originally published on Razorpay Engineering

Our journey of delivering a product with the least downtime.

Hero

The Payments Dashboard is the face of Razorpay business, which every merchant uses to check the order, payment, settlements, and do many other everyday activities. Hence, it is essential to provide a seamless, crash-free experience to our merchants on the Payments Dashboard.

The Problem Was Serious

These crashes were hindering the day-to-day operations of our merchants. Solving this problem was critical for our business.

Solutioning Was Challenging

We Love Challenges

With our solution, we:

How We Did It

1. Narrowed Down the Errors to the Right Owner

This was perhaps the most difficult piece since multiple teams were contributing to the codebase.

Custom ErrorBoundary Component

Custom Dashboard for Error Monitoring

2. Identified and Fixed the Issues

Before (crashes at ~7000 errors/hour on average):

Before: Crashes at 7000/hr

After (crashes dropped to ~28 errors/hour):

After: Crashes at 28/hr

3. Added Checks to Avoid New Issues

Solving the existing issues was just solving the current challenges. We wanted to avoid new issues popping into production.

Checks at pre-commit:

Checks at post-commit:

Checks at deployment:

Halt deployment on Automation

Halt deployment on Pre-production

Stronger checks on the build pipeline, PR, and deployment:

Stronger checks on build pipeline

Stronger checks on PR

Stronger checks on deployment

These checks resulted in avoiding more than 10 bad deployments which had breaking changes in the last 3 months.

4. Reduced the Incidents & MTTA

We realized that no system can be built foolproof despite adding all possible checks while building and deploying. So, we integrated our error monitoring tool with PagerDuty to report critical incidents immediately to our engineers through a phone call.

Every week, we conducted action review logs with the stakeholders to reduce the number of incidents and the MTTA.

Incidents dropped to 7/month from 40/month

5. Faster Rollbacks in Case of Incidents

We created a new, simple revert pipeline — a one-click start and one-click approval process. The entire revert process takes 2–3 minutes to restore to an older stable version of the Dashboard (which used to take ~30 minutes initially).

What Lies Ahead