Submit Search
Upload
Caching on the web
•
0 likes
•
392 views
Jean Carlo Emer
Follow
This talk covers one of the secrets of high scalability and performance.
Read less
Read more
Technology
Report
Share
Report
Share
1 of 80
Download now
Download to read offline
Recommended
World Wide Web Caching
World Wide Web Caching
ersanbilik
Understanding Web Cache
Understanding Web Cache
ProdigyView
Caching Strategies
Caching Strategies
Michal Špaček
Building low latency java applications with ehcache
Building low latency java applications with ehcache
Chris Westin
Rest services caching
Rest services caching
Sperasoft
WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)
jaredwsmith
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
Spark::red
Caching in Drupal 8
Caching in Drupal 8
valuebound
Recommended
World Wide Web Caching
World Wide Web Caching
ersanbilik
Understanding Web Cache
Understanding Web Cache
ProdigyView
Caching Strategies
Caching Strategies
Michal Špaček
Building low latency java applications with ehcache
Building low latency java applications with ehcache
Chris Westin
Rest services caching
Rest services caching
Sperasoft
WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)
jaredwsmith
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
Spark::red
Caching in Drupal 8
Caching in Drupal 8
valuebound
Caching
Caching
saravanan_k83
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Felix Gessert
Implementing High Performance Drupal Sites
Implementing High Performance Drupal Sites
Shri Kumar
Ui perf
Ui perf
Franz Allan See
How to reduce database load using Memcache
How to reduce database load using Memcache
valuebound
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
Zero Point Development
High Performance Drupal
High Performance Drupal
Chapter Three
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sites
wpnepal
Scaling wordpress for high traffic
Scaling wordpress for high traffic
Roshan Bhattarai
WordPress Need For Speed
WordPress Need For Speed
pdeschen
Caching for J2ee Enterprise Applications
Caching for J2ee Enterprise Applications
Debajani Mohanty
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
Anam Ahmed
Drupal performance optimization Best Practices
Drupal performance optimization Best Practices
Ratnesh kumar, CSM
Rails Caching: Secrets From the Edge
Rails Caching: Secrets From the Edge
Fastly
5 Reasons to Upgrade Ehcache to BigMemory Go
5 Reasons to Upgrade Ehcache to BigMemory Go
Terracotta, a product line at Software AG
Browser Caching
Browser Caching
Jaiswal Siddharth
Accelerating Rails with edge caching
Accelerating Rails with edge caching
Michael May
Memcached Presentation
Memcached Presentation
Asif Ali
Performance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra Kumar
Swatantra Kumar
Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010
Jason Ragsdale
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabric
Wim Van den Broeck
Web Site Optimization
Web Site Optimization
Sunil Patil
More Related Content
What's hot
Caching
Caching
saravanan_k83
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Felix Gessert
Implementing High Performance Drupal Sites
Implementing High Performance Drupal Sites
Shri Kumar
Ui perf
Ui perf
Franz Allan See
How to reduce database load using Memcache
How to reduce database load using Memcache
valuebound
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
Zero Point Development
High Performance Drupal
High Performance Drupal
Chapter Three
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sites
wpnepal
Scaling wordpress for high traffic
Scaling wordpress for high traffic
Roshan Bhattarai
WordPress Need For Speed
WordPress Need For Speed
pdeschen
Caching for J2ee Enterprise Applications
Caching for J2ee Enterprise Applications
Debajani Mohanty
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
Anam Ahmed
Drupal performance optimization Best Practices
Drupal performance optimization Best Practices
Ratnesh kumar, CSM
Rails Caching: Secrets From the Edge
Rails Caching: Secrets From the Edge
Fastly
5 Reasons to Upgrade Ehcache to BigMemory Go
5 Reasons to Upgrade Ehcache to BigMemory Go
Terracotta, a product line at Software AG
Browser Caching
Browser Caching
Jaiswal Siddharth
Accelerating Rails with edge caching
Accelerating Rails with edge caching
Michael May
Memcached Presentation
Memcached Presentation
Asif Ali
Performance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra Kumar
Swatantra Kumar
Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010
Jason Ragsdale
What's hot
(20)
Caching
Caching
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Implementing High Performance Drupal Sites
Implementing High Performance Drupal Sites
Ui perf
Ui perf
How to reduce database load using Memcache
How to reduce database load using Memcache
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
High Performance Drupal
High Performance Drupal
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sites
Scaling wordpress for high traffic
Scaling wordpress for high traffic
WordPress Need For Speed
WordPress Need For Speed
Caching for J2ee Enterprise Applications
Caching for J2ee Enterprise Applications
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
Drupal performance optimization Best Practices
Drupal performance optimization Best Practices
Rails Caching: Secrets From the Edge
Rails Caching: Secrets From the Edge
5 Reasons to Upgrade Ehcache to BigMemory Go
5 Reasons to Upgrade Ehcache to BigMemory Go
Browser Caching
Browser Caching
Accelerating Rails with edge caching
Accelerating Rails with edge caching
Memcached Presentation
Memcached Presentation
Performance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra Kumar
Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010
Similar to Caching on the web
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabric
Wim Van den Broeck
Web Site Optimization
Web Site Optimization
Sunil Patil
Web site optimization
Web site optimization
Sunil Patil
Caching By Nyros Developer
Caching By Nyros Developer
Nyros Technologies
Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
Betclic Everest Group Tech Team
Nginx Scalable Stack
Nginx Scalable Stack
Bruno Paiuca
Clug 2011 March web server optimisation
Clug 2011 March web server optimisation
grooverdan
cache concepts and varnish-cache
cache concepts and varnish-cache
Marc Cortinas Val
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
Brian Huff
Jax Ajax Architecture
Jax Ajax Architecture
Alois Reitbauer
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Amazon Web Services
21 Www Web Services
21 Www Web Services
royans
Day 7 - Make it Fast
Day 7 - Make it Fast
Barry Jones
Application Scalability in Server Farms - NCache
Application Scalability in Server Farms - NCache
Alachisoft
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
Amazon Web Services
"Fast / Resilient / .NET – What to Choose?" Serhiy Kalinets
"Fast / Resilient / .NET – What to Choose?" Serhiy Kalinets
Fwdays
Content Caching with NGINX and NGINX Plus
Content Caching with NGINX and NGINX Plus
Kevin Jones
Cdn technology overview
Cdn technology overview
Yoohyun Kim
Rails Caching Secrets from the Edge
Rails Caching Secrets from the Edge
Michael May
W-JAX Performance Workshop - Web and AJAX
W-JAX Performance Workshop - Web and AJAX
Alois Reitbauer
Similar to Caching on the web
(20)
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabric
Web Site Optimization
Web Site Optimization
Web site optimization
Web site optimization
Caching By Nyros Developer
Caching By Nyros Developer
Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
Nginx Scalable Stack
Nginx Scalable Stack
Clug 2011 March web server optimisation
Clug 2011 March web server optimisation
cache concepts and varnish-cache
cache concepts and varnish-cache
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
Jax Ajax Architecture
Jax Ajax Architecture
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
21 Www Web Services
21 Www Web Services
Day 7 - Make it Fast
Day 7 - Make it Fast
Application Scalability in Server Farms - NCache
Application Scalability in Server Farms - NCache
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
"Fast / Resilient / .NET – What to Choose?" Serhiy Kalinets
"Fast / Resilient / .NET – What to Choose?" Serhiy Kalinets
Content Caching with NGINX and NGINX Plus
Content Caching with NGINX and NGINX Plus
Cdn technology overview
Cdn technology overview
Rails Caching Secrets from the Edge
Rails Caching Secrets from the Edge
W-JAX Performance Workshop - Web and AJAX
W-JAX Performance Workshop - Web and AJAX
Recently uploaded
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
ThousandEyes
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Memoori
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Deakin University
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
null - The Open Security Community
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
null - The Open Security Community
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Enterprise Knowledge
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
LBM Solutions
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
BookNet Canada
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Recently uploaded
(20)
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Caching on the web
1.
Cachingon the web @jcemer
2.
jcemer.com twitter.com/jcemer
3.
4.
Cache is a
hardware or software component that stores data so future requests for that data can be served faster - Wikipedia
5.
Caching and RAM is
the answer to everything - about Flickr Architecture
6.
Caching is one
of the secrets of high scalability and performance
7.
Where could cache
be present on the web? • Browser • Network • Server • Application
8.
Browsercaching
9.
Caching would be useless
if it did not significantly improve performance - HTTP/1.1 specification
10.
The user might reuse
assets during navigation
11.
• Documents • Images •
Scripts and CSS • Asynchronous Requests What could be cached?
12.
HTTP headers have
the responsibility to define if a response could be cached and for how long
13.
GET /main.css HTTP/1.1 Host:
jcemer.com
14.
GET /main.css HTTP/1.1 Host:
jcemer.com HTTP/1.1 200 Date: Tue, 13 Sep 2016 13:32:50 GMT Cache-Control: max-age=604800 <Response Data>
15.
allows the response
to be stored in cache Cache-Control: max-age=604800 Response header
16.
CSS is requested
once during navigation 😄 😄
17.
The browser requests
it again only if the cache expires or if the user force refreshes the page
18.
allow to add
more info about the resource Last-Modified: Mon, 12 Sep 2016 22:06:39 GMT Etag: W/"337e7-8HrLmYe6UGIUDolQeGLoyw" Response headers
19.
GET /main.css HTTP/1.1 Host:
jcemer.com HTTP/1.1 200 OK Date: Tue, 13 Sep 2016 13:32:50 GMT Last-Modified: Mon, 12 Sep 2016 15:23:17 GMT Cache-Control: max-age=604800 new
20.
allow reuse the
cached resource if it didn’t change If-Modified-Since: Mon, 12 Sep 2016 15:23:17 GMT If-Match: W/"337e7-8HrLmYe6UGIUDolQeGLoyw" Request headers
21.
GET /main.css HTTP/1.1 Host:
jcemer.com If-Modified-Since: Mon, 12 Sep 2016 15:23:17 GMT
22.
GET /main.css HTTP/1.1 Host:
jcemer.com If-Modified-Since: Mon, 12 Sep 2016 15:23:17 GMT HTTP/1.1 304 Not Modified Date: Tue, 13 Sep 2016 13:32:50 GMT Cache-Control: max-age=604800 HTTP/1.1 200 OK Date: Tue, 13 Sep 2016 13:32:50 GMT Last-Modified: Mon, 12 Sep 2016 15:23:17 GMT <Response Data> <No Response Data>
23.
A Website with
the HTTP headers wisely defined will provide a better experience for the users
24.
Networkcaching
25.
Content Delivery Network (CDN)
is a globally distributed network of proxy servers - Wikipedia
26.
allows proxy servers to
cache the content Cache-control: public
27.
Servercaching
28.
Finally, the control is
all on your hand, developer!
29.
Cache server
30.
The cache server
stay between the user and the application or other servers
31.
• Shared documents •
Images • Scripts and CSS • Asynchronous Requests What could be cached?
32.
• Varnish • Squid •
nginx Tools https://varnish-cache.org http://www.squid-cache.org https://www.nginx.com
33.
location / { proxy_pass
http://otherserver; } the nginx intermediates the client request’s
34.
nginx cache server
35.
proxy_cache_path /path/to/cache; location /
{ proxy_pass http://otherserver; proxy_cache cache; } caching!
36.
😄 nginx cache server
37.
The proxy caches content
relying only on the application HTTP headers
38.
t1 t2 t1 request at a different
time
39.
😓 … t1 t1 t1 x3
40.
proxy_cache_lock on; proxy_cache_lock_timeout 180; allow
the proxy to delegate only the first of similar requests at a time
41.
t1 t1 😄x1
42.
All clients are
waiting until receive the response when the first request returns
43.
What happen in case
of failures? 🤒
44.
allows to delivery
expired content in case of failure proxy_cache_use_stale timeout error http_500;
45.
😄 🤒
46.
The proxy could improve
the fault tolerance of the application
47.
proxy_cache_use_stale updating; delivers expired
content for the subsequent similar requests
48.
Appcaching
49.
Caching on the
app reduces the time of specific operations
50.
• Complex computations •
Data shared across requests What could be cached?
51.
def price @price ||=
Price.new(unit_price, category) end
52.
Memoization stores the results
to avoid future calculations
53.
A global code memoization
is going to last in-memory during all the application execution cycle
54.
$price = Price.new(unit_price,
category) 😓
55.
cache.fetch("cat#{cat_id}", expires_in: 1.minute)
do CatagoryTax.new(cat_id) end http://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html ActiveSupport::Cache::Store
56.
Rails Caching API allows
store and reuse data during an amount of time across requests
57.
https://github.com/ptarjan/node-cache/issues/77 😓
58.
🔥
59.
Rails Memory Caching wisely
prunes the cached data when it exceeds the allotted memory size
60.
One of the
ways to scale an application is through adding more application instances (scale horizontally) 😓
61.
62.
Load balancer App instances
63.
Never assumes that anything
cached in memory or on disk will be available on a future request https://12factor.net/processes
64.
Any storage could
be used to share cache data between instances but the Key-value Storages are the most common
65.
• Redis • Memcached Key-value
Storages http://redis.io http://memcached.org
66.
67.
These tools have different
policies to prune the amount of cached data
68.
Cache Storages might
also be fault tolerable with replication and persistence http://redis.io/topics/persistence http://redis.io/topics/replication http://redis.io/topics/sentinel
69.
70.
Race condition happens when
different application instances fetch for a not cached data at the same time 😓
71.
expired data! 😁
72.
cache.fetch(key, race_condition_ttl: 10.seconds)
do heavy_db_computation end http://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html ActiveSupport::Cache::Store
73.
😁 😳
74.
It is difficult
to completely eliminate cache updating race conditions issues with multiple application instances
75.
A solution for
that is to update the cache data outside the application flow and just consume cached data on the application
76.
1. Obey the HTTP
headers
77.
2. Caching is important
78.
3. Measure the miss/hits
of the caching strategy
79.
4. Evaluate carefully the
caching strategy options
80.
Thanks!@jcemer
Download now