Skip to content
Utkarsh Jaiswal

Case study 02

Protecting search over a 4 TB Elasticsearch corpus from runaway API clients

WhiteCrow Research · Software Engineer · Mumbai · Jan 2022 — Mar 2025

Architecture: API clients pass a per-client rate limiter, which escalates lockout windows on the Fibonacci sequence for repeat offences inside 24 hours, before reaching the Node.js REST API. On AWS instances, the API queries a 4 TB JSON corpus in Elasticsearch and uses MySQL with a scheduled maintenance event. Sign-in is Google login over OAuth.AWS INSTANCEStuned queriesAPI clientsRate limiterFibonacci lockoutGoogle loginOAuthREST APINode.jsElasticsearch4 TB JSONMySQLscheduled event

4TB

JSON corpus searched

I also automated application deployments to the AWS instances through deployment scripts, implemented Google login for authentication, and used MySQL events for scheduled database maintenance.

Context and what was at risk

Talent search ran over a 4 TB JSON corpus, and an unthrottled API surface meant one heavy client could degrade the platform for everyone.

What I owned and built

I owned backend development for three years — REST APIs, data models, and client integrations — optimised the Elasticsearch queries and database operations behind search, and built an anti-scraping rate limiter with per-client request budgets and Fibonacci-escalating lockout windows for repeat offences inside 24 hours.

Stack

  • Node.js
  • Elasticsearch
  • MySQL
  • AWS
  • REST API design

Built out of this work

Related writing

Have a similar problem?