Incident.io Uses Bloom Filters to Speed Up API 16x Faster
Original: Bloom filters: the niche trick behind a 16× faster API | Blog | incident.io
Why This Matters
Demonstrates practical application of advanced data structures to solve real database performance issues at scale
Incident.io improved their alert filtering API endpoint from 5-second P95 latency to 0.3 seconds using bloom filters. The optimization addressed performance issues for large customers with millions of alerts in their database.
Incident.io's On-call product processes alerts from customer monitoring systems and stores them in a PostgreSQL database. Their alert filtering feature allows customers to search by source, priority, teams, and catalog attributes. However, as they onboarded larger customers with millions of alerts, the filtering became slow with some customers waiting 12 seconds for results and P95 response times reaching 5 seconds. The company implemented bloom filters, a probabilistic data structure that can quickly determine if an element might be in a set. This optimization reduced the P95 latency from 5 seconds to 0.3 seconds, representing a 16x performance improvement. The bloom filter approach was chosen over alternatives like GIN indexes after evaluating trade-offs between query performance and storage requirements.