Backend performance · AWS
30× Faster Matching over 1.24M Records on AWS
Replacing sequential scans with indexed PostgreSQL queries and an event-driven Lambda and SQS pipeline cut p50 matching time from about 126 seconds to 4 seconds.
30×faster p50
126 s → 4 smedian response
1.24Mrecords
100concurrent requests
The problem
A career-matching feature scanned account records sequentially, so a single request took about two minutes at the median.
What I built
- Replaced sequential scans with normalized, indexed PostgreSQL queries.
- Moved heavy work to an event-driven path on API Gateway, Lambda and SQS, offloading large payloads to S3.
- Managed database load with PgBouncer and worker concurrency limits, and added retries with exponential backoff and idempotency.
Result
Median matching time fell from about 126 s to 4 s across 1.24M records at 100 concurrent requests.