https://www.gravatar.com/avatar/d1887febcaf8696ac01dcde5de86fe04?s=240&d=mp

Sandesh Damkondwar

How we redesigned and rearchitected our Merchant Experience

Originally published on Razorpay Engineering

Journey on how we made the merchant experience better — Part 1: Engineering Process

https://miro.medium.com/v2/resize:fit:1400/1*TsOs5EAAoPd84u27Xw_nVQ.jpeg

TL;DR

At Razorpay, we were experiencing user dropouts for a variety of reasons, particularly during the onboarding process, which resulted in an 89% user dropout.

Because of the architecture limitations, it was hard and challenging for us to give merchants a better experience that was fast, consistent, and had few dropouts.

High Availability on Razorpay Payments Dashboard

Originally published on Razorpay Engineering

Our journey of delivering a product with the least downtime.

https://miro.medium.com/v2/resize:fit:1400/1*AvkKHeYupfK-0XOLUujsQw.png

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

  • The crash-free session rate (percentage of sessions with no UI crashes) at times was as low as ~50%
  • At times, there were around 7000 crashes per hour on average — the majority of these were false alerts which impacted MTTD of real issues
  • The MTTA (Mean Time to Acknowledge) of the incidents was more than 2 hours
  • There were no proper checks on the build and deployment pipelines

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

How to Use Middlewares in Node

In this article, we would be seeing middlewares in NodeJS and how we would use them in our application.

What are middlewares in Node.Js?

Middlewares are functions used in connecting a bunch of isolated systems to interact and perform certain tasks. For example, think of a switch as a component and bulb as another independent component where a wire acts as a middleware to connect these both and give us the required output (In this case, electricity to light the bulb).

Generate a NodeJS Flamechart

Here’s how you can generate a Node flame graph with linux perf(1). Note that perf(1) needs to run as root, but the perf.map file node generates might be owned by a different user. If that’s the case, you’ll need to change its ownership to root as well — otherwise perf(1) will not be able to use it to translate JS stack frames.

$ uname -a

Linux demo 3.2.0-74-virtual #109-Ubuntu SMP Tue Dec 9 17:04:48 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux