•
2 min read
Database & Performance Engineering

At Paytm, I spent as much time keeping the data layer healthy as I did shipping features — diagnosing and fixing performance bottlenecks across four different datastores.

  • Redesigned a bulk promo-code generation job producing millions of unique codes that relied on a Cassandra materialized view for duplicate detection: partitioned the workload so each partition owned a unique code component, let workers deduplicate independently via in-memory sets, and added S3 snapshots for dedup-state recovery — eliminating database lookups for duplicate detection, removing the materialized-view dependency, and unblocking the team’s Cassandra 4 upgrade.
  • Fixed a performance bottleneck in a high-volume transaction aggregation pipeline: minute/hour/day rollup jobs were pulling all input rows and grouping them in the application. Pushed the grouping and sum/count aggregation into Cassandra itself, cutting network transfer, memory use, and processing time.
  • Cut Elasticsearch query latency 50% by using the Elasticsearch query analyzer to diagnose and fix incorrect field/query types.
  • Introduced TestContainers as the standard way to test the DAO layer across the team’s four datastores (MySQL, Elasticsearch, Cassandra, Redis).
  • Additional application-profiling and JVM-tuning work across the stack.