Razorpay's defensive architecture
Saahil Rathore
Site Reliability Engineer intern @CRED | Pupil @Codeforces | 3? Codechef | 6 Kyu AtCoder | SIH '23 Finalist | AWS ML Scholar ‘23 | GenAI Buildathon Finalist | Ex Python Developer @Bytive
Hey folks ,
today I stumbled upon a very interesting Amazon Web Services (AWS) blog, which outlines a multi-layered defense strategy to mitigate DDoS attacks against Razorpay 's microservice architecture.
DDoS (Distributed Denial of Service) attacks primarily use botnets which flood a server with illegitimate requests from distributed nodes, ultimately failing to serve the legitimate ones. As I was going through the blog, I discovered two major incidents the organization faced and how it led to this hybrid defensive architecture:
Since then , principal solutions architect Jasmine Maheshwari with senior engineers at Razorpay came up with an architecture that combines two of the advanced AWS security services : AWS WAF & AWS Shield.
Let's analyze it:
Primarily , Razorpay uses self-managed API called Edge, which contains an Application Load Balancer to manage the incoming client API invocation requests and routes to it's microservices.
It looks something like this:
The Application Load Balancer shown above is further configured with AWS WAF& Shield. Moreover , WAF blocks requests matching expected variables from IP Sets to routing parameters while Shield works on alarm system triggered when a DDoS attack is suspected.
However there is something more happening here, which helps in identifying attack patterns. That is to say, as Edge performs computations on each request, Razorpay generates insights for each requests to build intelligence and helps the system identify malicious patterns based on it.
Here is the architecture illustrating the same:
At every invocation, the ML model is incrementally trained to generate new insights which further strengthens the protection wall.
In conclusion, this blog was very informative which pictured the company's ingenious architecture to protect its underlying systems.
I encourage anyone reading this to check out AWS blogs here , you'll definitely learn something new , like me :)
Follow me for more such content ??.