Zopper / Backend performance
Faster insurance APIs
At Zopper, I used caching and background processing to reduce the time API requests spent waiting on work.
Software Developer Engineer Aug 2024–Jun 2025
The problem: What causes high p95 latency in high-concurrency transaction APIs?
In high-traffic insurance platforms, API latency spikes when synchronous endpoints perform repeated database queries, unindexed relational joins, and blocking external carrier calls within the HTTP lifecycle. At Zopper, concurrent policy checkout traffic caused database connection pool exhaustion and thread contention, degrading p95 response times across mission-critical checkout workflows.
What I built: Multi-layer caching and asynchronous worker architecture
How do multi-layer Redis caching and query plan tuning slash API latency?
Multi-layer Redis caching stores hot policy schemas, rate tables, and user authentication tokens in memory with deterministic TTL invalidation, eliminating redundant Postgres roundtrips. Paired with database EXPLAIN ANALYZE query plan tuning and targeted composite indexing, this removed full-table scans and reduced database read pressure by over 60%.
How does asynchronous worker decoupling prevent HTTP thread blocking?
Offloading heavy transactional tasks—such as PDF policy generation, commission calculations, and carrier webhook notifications—to asynchronous Celery workers backed by Redis Pub/Sub decouples background processing from the HTTP request-response cycle. Endpoints immediately acknowledge incoming transactions in under 150ms while workers process complex downstream jobs asynchronously.
The result: How was a 55% p95 API latency reduction achieved at scale?
By implementing multi-layer Redis caching, eliminating sequential database scans, and offloading heavy tasks to asynchronous Celery queues, Zopper's insurance transaction APIs achieved a measured 55% reduction in p95 latency. The platform maintained stable sub-200ms response times during peak concurrent traffic surges without requiring additional server compute overhead.
*Historical client project outcome. Performance gains vary based on query patterns, caching strategy, and infrastructure scale.