SlideShare a Scribd company logo
Bloom Filters for
Web Caching
Felix Gessert
Felix.gessert@baqend.com
@baqendcom
Presentation
is loading
Average: 9,3s
The Latency Problem
Loading…
-1% Revenue
100ms
-9% Visitors
400ms
500ms
-20% Traffic
If perceived speed is such an
import factor for business
...what causes slow page load times?
The Problem
Three Bottlenecks: Latency, Backend & Frontend
High Latency
Backend
Frontend
Network Latency: Impact
I. Grigorik, High performance browser networking.
O’Reilly Media, 2013.
Network Latency: Impact
I. Grigorik, High performance browser networking.
O’Reilly Media, 2013.
2× Bandwidth = Same Load Time
½ Latency ≈ ½ Load Time
Goal: Low-Latency for Dynamic Content
By Serving Data from Ubiquitous Web Caches
Low Latency
Less Processing
Idea: use HTTP Caching for dynamic data (e.g. queries)
Our Approach
Caching Dynamic Data with Bloom filters
How to keep the
browser cache up-to-
date?
How to automatically
cache complex dynamic
data in a CDN?
When is data cacheable and
for how long approximately?
In a nutshell
Problem: changes cause stale data
Stale
Data
In a nutshell
Problem: changes cause stale data
In a nutshell
Solution: Proactively Revalidate Data
Cache Sketch (Bloom filter)
updateIs still fresh? 1 0 11 0 0 10 1 1
Innovation
Solution: Proactively Revalidate Data
F. Gessert, F. Bücklers, und N. Ritter, „ORESTES: a Scalable
Database-as-a-Service Architecture for Low Latency“, in
CloudDB 2014, 2014.
F. Gessert und F. Bücklers, „ORESTES: ein System für horizontal
skalierbaren Zugriff auf Cloud-Datenbanken“, in Informatiktage
2013, 2013.
F. Gessert, S. Friedrich, W. Wingerath, M. Schaarschmidt, und
N. Ritter, „Towards a Scalable and Unified REST API for Cloud
Data Stores“, in 44. Jahrestagung der GI, Bd. 232, S. 723–734.
F. Gessert, M. Schaarschmidt, W. Wingerath, S. Friedrich, und
N. Ritter, „The Cache Sketch: Revisiting Expiration-based
Caching in the Age of Cloud Data Management“, in BTW 2015.
F. Gessert und F. Bücklers, Performanz- und
Reaktivitätssteigerung von OODBMS vermittels der Web-
Caching-Hierarchie. Bachelorarbeit, 2010.
F. Gessert und F. Bücklers, Kohärentes Web-Caching von
Datenbankobjekten im Cloud Computing. Masterarbeit 2012.
W. Wingerath, S. Friedrich, und F. Gessert, „Who Watches the
Watchmen? On the Lack of Validation in NoSQL
Benchmarking“, in BTW 2015.
M. Schaarschmidt, F. Gessert, und N. Ritter, „Towards
Automated Polyglot Persistence“, in BTW 2015.
S. Friedrich, W. Wingerath, F. Gessert, und N. Ritter, „NoSQL
OLTP Benchmarking: A Survey“, in 44. Jahrestagung der
Gesellschaft für Informatik, 2014, Bd. 232, S. 693–704.
F. Gessert, „Skalierbare NoSQL- und Cloud-Datenbanken in
Forschung und Praxis“, BTW 2015
 Bit array of length m and k independent hash functions
 insert(obj): add to set
 contains(obj): might give a false positive
What is a Bloom filter?
Compact Probabilistic Sets
https://github.com/Baqend/
Orestes-Bloomfilter
1 m
1 1 0 0 1 0 1 0 1 1
Insert y
h1h2 h3
y
Query x
1 m
1 1 0 0 1 0 1 0 1 1
h1h2 h3
=1?
n y
contained
1 4 020
Browser
Cache
CDN
Bloom filters for Caching
End-to-End Example
1 4 020
Browser
Cache
CDN
Bloom filters for Caching
End-to-End Example
Gets Time-to-Live
Estimation by the server
1 4 020
Browser
Cache
CDN
Bloom filters for Caching
End-to-End Example
1 4 020
Browser
Cache
CDN
Bloom filters for Caching
End-to-End Example
1 4 020
purge(obj)
hashB(oid)hashA(oid)
3
Browser
Cache
CDN
1
Bloom filters for Caching
End-to-End Example
1 4 020 31 1 110
Flat(Counting Bloomfilter)
Browser
Cache
CDN
1
Bloom filters for Caching
End-to-End Example
1 4 020 31 1 110
hashB(oid)hashA(oid)
Browser
Cache
CDN
1
Bloom filters for Caching
End-to-End Example
1 4 020 31 1 110
hashB(oid)hashA(oid)
Browser
Cache
CDN
1
Bloom filters for Caching
End-to-End Example
1 4 020
hashB(oid)hashA(oid)
1 1 110
Browser
Cache
CDN
Bloom filters for Caching
End-to-End Example
1 4 020
hashB(oid)hashA(oid)
1 1 110
Browser
Cache
CDN
Bloom filters for Caching
End-to-End Example
𝑓 ≈ 1 − 𝑒−
𝑘𝑛
𝑚
𝑘
𝑘 = ln 2 ⋅ (
𝑛
𝑚
)
False-Positive
Rate:
Hash-
Functions:
With 20.000 distinct updates and 5% error rate: 11 Kbyte
Consistency Guarantees: Δ-Atomicity, Read-Your-Writes, Monotonic
Reads, Monotonic Writes, Causal Consistency
Show me some Code!
End-to-End Example
<script src="//baqend.global.ssl.fastly.net/js-
sdk/latest/baqend.min.js"></script>
Loads the JS SDK including
the Bloom filter logic
DB.connect('my-app');
Connects to the backend &
loads the Bloom filter
DB.News.load('2dsfhj3902h3c').then(myCB);
DB.Todo.find()
.notEqual('done', true)
.resultList(myCB);
Load & query data using the Bloom
filter + Browser Cache
Show me some Code!
End-to-End Example
<script src="//baqend.global.ssl.fastly.net/js-
sdk/latest/baqend.min.js"></script>
Loads the JS SDK including
the Bloom filter logic
DB.connect('my-app');
Connects to the backend &
loads the Bloom filter
DB.News.load('2dsfhj3902h3c').then(myCB);
DB.Todo.find()
.notEqual('done', true)
.resultList(myCB);
Load & query data using the Bloom
filter + Browser Cache
Try this: www.baqend.com#tutorial
Ziel mit InnoRampUpOur Mission at Baqend:
„Kick load times in the
ass using Bloom filters“
www.baqend.com
@Baqendcom

More Related Content

PDF
Web Performance – die effektivsten Techniken aus der Praxis
PDF
Cache Sketches: Using Bloom Filters and Web Caching Against Slow Load Times
PDF
Intro to Baqend
PDF
Speed Kit: Getting Websites out of the Web Performance Stone Age
PDF
MongoDB .local Bengaluru 2019: MongoDB Atlas Data Lake Technical Deep Dive
PPTX
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
PDF
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
PPTX
A Free New World: Atlas Free Tier and How It Was Born
Web Performance – die effektivsten Techniken aus der Praxis
Cache Sketches: Using Bloom Filters and Web Caching Against Slow Load Times
Intro to Baqend
Speed Kit: Getting Websites out of the Web Performance Stone Age
MongoDB .local Bengaluru 2019: MongoDB Atlas Data Lake Technical Deep Dive
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
MongoDB .local Bengaluru 2019: New Encryption Capabilities in MongoDB 4.2: A ...
A Free New World: Atlas Free Tier and How It Was Born

What's hot (20)

PPTX
Augmenting Mongo DB with treasure data
PPTX
Managing Multi-Tenant SaaS Applications at Scale
PDF
MongoDB on Azure
PPTX
Eagle6 Enterprise Situational Awareness
PPTX
MongoDB World 2016: Keynote
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
PDF
MongoDB .local Chicago 2019: MongoDB Atlas Data Lake Technical Deep Dive
PPTX
An Introduction to MongoDB Compass
PPTX
Private Cloud Self-Service at Scale
PPTX
Managing Cloud Security Design and Implementation in a Ransomware World
PPTX
It's a Dangerous World
PDF
Cassandra 2.0 (Introduction)
PPTX
Webinar: The Anatomy of the Cloudant Data Layer
PPTX
Introducing MongoDB Atlas
PPTX
NDC Sydney - Analyzing StackExchange with Azure Data Lake
PDF
MongoDB .local Munich 2019: Mastering MongoDB on Kubernetes – MongoDB Enterpr...
PPTX
Why Organizations are Looking at Alternative Database Technologies – Introduc...
PDF
Data persistence using pouchdb and couchdb
PPTX
Introduction to MongoDB
PPTX
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
Augmenting Mongo DB with treasure data
Managing Multi-Tenant SaaS Applications at Scale
MongoDB on Azure
Eagle6 Enterprise Situational Awareness
MongoDB World 2016: Keynote
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local Chicago 2019: MongoDB Atlas Data Lake Technical Deep Dive
An Introduction to MongoDB Compass
Private Cloud Self-Service at Scale
Managing Cloud Security Design and Implementation in a Ransomware World
It's a Dangerous World
Cassandra 2.0 (Introduction)
Webinar: The Anatomy of the Cloudant Data Layer
Introducing MongoDB Atlas
NDC Sydney - Analyzing StackExchange with Azure Data Lake
MongoDB .local Munich 2019: Mastering MongoDB on Kubernetes – MongoDB Enterpr...
Why Organizations are Looking at Alternative Database Technologies – Introduc...
Data persistence using pouchdb and couchdb
Introduction to MongoDB
MongoDB Evenings DC: Get MEAN and Lean with Docker and Kubernetes
Ad

Viewers also liked (12)

PDF
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
PDF
Building an Angular 2 App
PDF
Cloud Databases in Research and Practice
PDF
Pitch auf den Hamburger IT-Strategietagen
PPTX
Bloom filters
PPT
New zealand bloom filter
PDF
Mongo db parse-v17
PDF
Clinton Gormley – Elasticsearch Query DSL – Not just for wizards…- NoSQL matt...
PPT
Bloom filter
PDF
Bloom filter
PPTX
Bloom filters
PDF
Apache Hadoop YARN, NameNode HA, HDFS Federation
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building an Angular 2 App
Cloud Databases in Research and Practice
Pitch auf den Hamburger IT-Strategietagen
Bloom filters
New zealand bloom filter
Mongo db parse-v17
Clinton Gormley – Elasticsearch Query DSL – Not just for wizards…- NoSQL matt...
Bloom filter
Bloom filter
Bloom filters
Apache Hadoop YARN, NameNode HA, HDFS Federation
Ad

Similar to Bloom Filters for Web Caching - Lightning Talk (20)

PPTX
Web Performance
PPTX
[Hanoi-August 13] Tech Talk on Caching Solutions
PPTX
Mini-Training: To cache or not to cache
PPTX
PPTX
Lecture_3.pptx
PPTX
Caching and Its Main Types
PPTX
Cache Rules Everything Around Me - Momentum - October 2022.pptx
PPTX
Cache Rules Everything Around Me - DevIntersection - December 2022
PDF
Spring One 2 GX 2014 - CACHING WITH SPRING: ADVANCED TOPICS AND BEST PRACTICES
PPTX
Selecting the right cache framework
PDF
[B5]memcached scalability-bag lru-deview-100
PPT
World Wide Web Caching
PDF
An Optimization Technique of Web Caching using Fuzzy Inference System
PDF
Improve Presto Architectural Decisions with Shadow Cache
PPTX
Web Caching Systems improve web performance by storing frequently accessed re...
PPTX
CREAM - That Conference Austin - January 2024.pptx
PDF
HTTP headers that make your website go faster
PPTX
Cache is king
PDF
HitBand: A Prefetching Model to Increase Hit Rate and Reduce Bandwidth Consum...
PDF
HTTP headers that will make your website go faster
Web Performance
[Hanoi-August 13] Tech Talk on Caching Solutions
Mini-Training: To cache or not to cache
Lecture_3.pptx
Caching and Its Main Types
Cache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - DevIntersection - December 2022
Spring One 2 GX 2014 - CACHING WITH SPRING: ADVANCED TOPICS AND BEST PRACTICES
Selecting the right cache framework
[B5]memcached scalability-bag lru-deview-100
World Wide Web Caching
An Optimization Technique of Web Caching using Fuzzy Inference System
Improve Presto Architectural Decisions with Shadow Cache
Web Caching Systems improve web performance by storing frequently accessed re...
CREAM - That Conference Austin - January 2024.pptx
HTTP headers that make your website go faster
Cache is king
HitBand: A Prefetching Model to Increase Hit Rate and Reduce Bandwidth Consum...
HTTP headers that will make your website go faster

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Machine learning based COVID-19 study performance prediction
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Spectroscopy.pptx food analysis technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
KodekX | Application Modernization Development
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Machine learning based COVID-19 study performance prediction
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Programs and apps: productivity, graphics, security and other tools
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
MIND Revenue Release Quarter 2 2025 Press Release
Digital-Transformation-Roadmap-for-Companies.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Spectroscopy.pptx food analysis technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Reach Out and Touch Someone: Haptics and Empathic Computing
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
KodekX | Application Modernization Development
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx
Spectral efficient network and resource selection model in 5G networks

Bloom Filters for Web Caching - Lightning Talk

  • 1. Bloom Filters for Web Caching Felix Gessert Felix.gessert@baqend.com @baqendcom
  • 3. Average: 9,3s The Latency Problem Loading… -1% Revenue 100ms -9% Visitors 400ms 500ms -20% Traffic
  • 4. If perceived speed is such an import factor for business ...what causes slow page load times?
  • 5. The Problem Three Bottlenecks: Latency, Backend & Frontend High Latency Backend Frontend
  • 6. Network Latency: Impact I. Grigorik, High performance browser networking. O’Reilly Media, 2013.
  • 7. Network Latency: Impact I. Grigorik, High performance browser networking. O’Reilly Media, 2013. 2× Bandwidth = Same Load Time ½ Latency ≈ ½ Load Time
  • 8. Goal: Low-Latency for Dynamic Content By Serving Data from Ubiquitous Web Caches Low Latency Less Processing
  • 9. Idea: use HTTP Caching for dynamic data (e.g. queries) Our Approach Caching Dynamic Data with Bloom filters How to keep the browser cache up-to- date? How to automatically cache complex dynamic data in a CDN? When is data cacheable and for how long approximately?
  • 10. In a nutshell Problem: changes cause stale data
  • 11. Stale Data In a nutshell Problem: changes cause stale data
  • 12. In a nutshell Solution: Proactively Revalidate Data Cache Sketch (Bloom filter) updateIs still fresh? 1 0 11 0 0 10 1 1
  • 13. Innovation Solution: Proactively Revalidate Data F. Gessert, F. Bücklers, und N. Ritter, „ORESTES: a Scalable Database-as-a-Service Architecture for Low Latency“, in CloudDB 2014, 2014. F. Gessert und F. Bücklers, „ORESTES: ein System für horizontal skalierbaren Zugriff auf Cloud-Datenbanken“, in Informatiktage 2013, 2013. F. Gessert, S. Friedrich, W. Wingerath, M. Schaarschmidt, und N. Ritter, „Towards a Scalable and Unified REST API for Cloud Data Stores“, in 44. Jahrestagung der GI, Bd. 232, S. 723–734. F. Gessert, M. Schaarschmidt, W. Wingerath, S. Friedrich, und N. Ritter, „The Cache Sketch: Revisiting Expiration-based Caching in the Age of Cloud Data Management“, in BTW 2015. F. Gessert und F. Bücklers, Performanz- und Reaktivitätssteigerung von OODBMS vermittels der Web- Caching-Hierarchie. Bachelorarbeit, 2010. F. Gessert und F. Bücklers, Kohärentes Web-Caching von Datenbankobjekten im Cloud Computing. Masterarbeit 2012. W. Wingerath, S. Friedrich, und F. Gessert, „Who Watches the Watchmen? On the Lack of Validation in NoSQL Benchmarking“, in BTW 2015. M. Schaarschmidt, F. Gessert, und N. Ritter, „Towards Automated Polyglot Persistence“, in BTW 2015. S. Friedrich, W. Wingerath, F. Gessert, und N. Ritter, „NoSQL OLTP Benchmarking: A Survey“, in 44. Jahrestagung der Gesellschaft für Informatik, 2014, Bd. 232, S. 693–704. F. Gessert, „Skalierbare NoSQL- und Cloud-Datenbanken in Forschung und Praxis“, BTW 2015
  • 14.  Bit array of length m and k independent hash functions  insert(obj): add to set  contains(obj): might give a false positive What is a Bloom filter? Compact Probabilistic Sets https://github.com/Baqend/ Orestes-Bloomfilter 1 m 1 1 0 0 1 0 1 0 1 1 Insert y h1h2 h3 y Query x 1 m 1 1 0 0 1 0 1 0 1 1 h1h2 h3 =1? n y contained
  • 15. 1 4 020 Browser Cache CDN Bloom filters for Caching End-to-End Example
  • 16. 1 4 020 Browser Cache CDN Bloom filters for Caching End-to-End Example Gets Time-to-Live Estimation by the server
  • 17. 1 4 020 Browser Cache CDN Bloom filters for Caching End-to-End Example
  • 18. 1 4 020 Browser Cache CDN Bloom filters for Caching End-to-End Example
  • 20. 1 4 020 31 1 110 Flat(Counting Bloomfilter) Browser Cache CDN 1 Bloom filters for Caching End-to-End Example
  • 21. 1 4 020 31 1 110 hashB(oid)hashA(oid) Browser Cache CDN 1 Bloom filters for Caching End-to-End Example
  • 22. 1 4 020 31 1 110 hashB(oid)hashA(oid) Browser Cache CDN 1 Bloom filters for Caching End-to-End Example
  • 23. 1 4 020 hashB(oid)hashA(oid) 1 1 110 Browser Cache CDN Bloom filters for Caching End-to-End Example
  • 24. 1 4 020 hashB(oid)hashA(oid) 1 1 110 Browser Cache CDN Bloom filters for Caching End-to-End Example 𝑓 ≈ 1 − 𝑒− 𝑘𝑛 𝑚 𝑘 𝑘 = ln 2 ⋅ ( 𝑛 𝑚 ) False-Positive Rate: Hash- Functions: With 20.000 distinct updates and 5% error rate: 11 Kbyte Consistency Guarantees: Δ-Atomicity, Read-Your-Writes, Monotonic Reads, Monotonic Writes, Causal Consistency
  • 25. Show me some Code! End-to-End Example <script src="//baqend.global.ssl.fastly.net/js- sdk/latest/baqend.min.js"></script> Loads the JS SDK including the Bloom filter logic DB.connect('my-app'); Connects to the backend & loads the Bloom filter DB.News.load('2dsfhj3902h3c').then(myCB); DB.Todo.find() .notEqual('done', true) .resultList(myCB); Load & query data using the Bloom filter + Browser Cache
  • 26. Show me some Code! End-to-End Example <script src="//baqend.global.ssl.fastly.net/js- sdk/latest/baqend.min.js"></script> Loads the JS SDK including the Bloom filter logic DB.connect('my-app'); Connects to the backend & loads the Bloom filter DB.News.load('2dsfhj3902h3c').then(myCB); DB.Todo.find() .notEqual('done', true) .resultList(myCB); Load & query data using the Bloom filter + Browser Cache Try this: www.baqend.com#tutorial
  • 27. Ziel mit InnoRampUpOur Mission at Baqend: „Kick load times in the ass using Bloom filters“ www.baqend.com @Baqendcom