SlideShare a Scribd company logo
22th of January, 2015
How to reduce the load of
your web server
With Varnish
by Clément Beudot
22th of January, 2015
Introduction
● What is Varnish
● Purpose of Varnish
● Varnish Request Life Cycle
● Performances : Apache vs Varnish
● Strength & Limitations
● Advanced features
22th of January, 2015
Quick Quiz !
Calculate, without using your smartphone
45 x 12
22th of January, 2015
Quick Quiz !
Calculate, without using your smartphone
45 x 12 = 540
22th of January, 2015
Recurring Content
22th of January, 2015
What is Varnish
● HTTP Reverse Proxy (HTTP Accelerator)
● Varnish 1.0 released in 2006, now version 4.0.2
● Varnish written in C
CLIENT VARNISH Web Server
22th of January, 2015
Purpose of Varnish
● Scaling at thousands of req/s
● Caching recurring content
● Caching static resources
● Reducing load of your web servers
22th of January, 2015
Varnish Request Life Cycle
Few words to know first before seeing it !
1. HIT : requested resource has been found in the cache
2. MISS : requested resource not found.
3. PASS : bypass of varnish
4. PIPE : direct passthrough to the backend (streams)
22th of January, 2015
Varnish Request Life Cycle
Cache Miss
RECV
HASH PIPE
HIT MISS
PASS
FETCH
DELIVER
WEB SERVER
22th of January, 2015
Varnish Request Life Cycle
Cache Hit
RECV
HASH PIPE
HIT MISS
PASS
FETCH
DELIVER
WEB SERVER
22th of January, 2015
Varnish Request Life Cycle
Cache Pass
RECV
HASH PIPE
HIT MISS
PASS
FETCH
DELIVER
WEB SERVER
22th of January, 2015
Varnish Request Life Cycle
Cache Pipe
RECV
HASH PIPE
HIT MISS
PASS
FETCH
DELIVER
WEB SERVER
22th of January, 2015
Performances :
Apache vs Varnish
Using Varnish on a low complexity page
** SIEGE 2.70
** Preparing 200 concurrent users.
Transactions: 2298 hits
Availability: 100.00 %
Elapsed time: 29.83 secs
Data transferred: 5.70 MB
Response time: 0.00 secs
Transaction rate: 77.04 trans/sec
Longest transaction: 0.01 secs
Shortest transaction: 0.00 secs
** SIEGE 2.70
** Preparing 200 concurrent users.
Transactions: 1763 hits
Availability: 100.00 %
Elapsed time: 29.99 secs
Data transferred: 4.36 MB
Response time: 0.76 secs
Transaction rate: 58.79 trans/sec
Longest transaction: 1.88 secs
Shortest transaction: 0.07 secs
22th of January, 2015
Performances :
Apache vs Varnish
Using Varnish on high complexity page
** SIEGE 2.70
** Preparing 200 concurrent users.
Transactions: 2298 hits
Availability: 100.00 %
Elapsed time: 29.83 secs
Data transferred: 5.70 MB
Response time: 0.00 secs
Transaction rate: 77.04 trans/sec
Longest transaction: 0.01
Shortest transaction: 0.00
** SIEGE 2.70
** Preparing 200 concurrent users.
Transactions: 65 hits
Availability: 100.00 %
Elapsed time: 29.59 secs
Data transferred: 1.35 MB
Response time: 14.97 secs
Transaction rate: 2.20 trans/sec
Longest transaction: 28.22 secs
Shortest transaction: 1.39 secs
** SIEGE 2.70
** Preparing 200 concurrent users.
Transactions: 2390 hits
Availability: 100.00 %
Elapsed time: 29.84 secs
Data transferred: 49.49 MB
Response time: 0.00 secs
Transaction rate: 80.09 trans/sec
Longest transaction: 0.01 secs
Shortest transaction: 0.00 secs
22th of January, 2015
Performances :
Apache vs Varnish
Really easy for Varnish !
22th of January, 2015
Varnish Strengths
● Scaling to thousands of reqs/ s
● Load Balancing capability with Backend Health Check
● Ability to Manage the request life cycle
● Easy to partially integrate in your S.I
22th of January, 2015
Varnish Limitations
● HTTPS
● Only designed for GET & HEAD request
● Hates Cookies & HTTP Auth Headers
● Not recommended on 32 bits servers
● Using Varnish for a logged user on your website
22th of January, 2015
Varnish Limitations
22th of January, 2015
Varnish :
Advanced Features & Assets
● E.S.I. Support
● Control varnish via CLI or dedicated modules
● “Always online”
22th of January, 2015
How to reduce
the load of your web server
with varnish - Summary
● HTTP Accelerator / HTTP Reverse Proxy
● Get rid of recurring content cost
● Scale at “nearly” zero cost
● And finally … reduce the load of your web server by
avoiding unnecessary calculation.
22th of January, 2015
How to reduce
the load of your web server
with varnish
Thank You
22th of January, 2015
How to reduce
the load of your web server
with varnish
Questions ?
How
to install it ?
Do I really need Varnish ?
Can I cache in a file instead of
RAM ?
How I can change the
TTL for a page ?
What if all my
backends are dead ?
Can I use varnish for my
logged users ?
Is Varnish really useful
for static content ?
Can I load balance on
multiple backends ?
How much RAM do I
need ?
29th of January, 2015
Join the community !
(in Paris)
Social networks :
● Follow us on Twitter : https://twitter.com/steamlearn
● Like us on Facebook : https://www.facebook.com/steamlearn
SteamLearn is an Inovia initiative : inovia.fr
You wish to be in the audience ? Join the meetup group!
http://www.meetup.com/Steam-Learn/

More Related Content

What's hot

Varnish Cache - step by step
Varnish Cache - step by stepVarnish Cache - step by step
Varnish Cache - step by step
Per Buer
 

What's hot (14)

Microservices
MicroservicesMicroservices
Microservices
 
Embedded Recipes 2017 - Wayland is coming - Fabien Lahoudère
Embedded Recipes 2017 - Wayland is coming - Fabien LahoudèreEmbedded Recipes 2017 - Wayland is coming - Fabien Lahoudère
Embedded Recipes 2017 - Wayland is coming - Fabien Lahoudère
 
MQTT
MQTTMQTT
MQTT
 
Magento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed OptimizationMagento Meetup New Delhi- Magento2 Speed Optimization
Magento Meetup New Delhi- Magento2 Speed Optimization
 
Introducing managed infrastructure services from Digital Network and OVHcloud
Introducing managed infrastructure services from Digital Network and OVHcloudIntroducing managed infrastructure services from Digital Network and OVHcloud
Introducing managed infrastructure services from Digital Network and OVHcloud
 
Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016
Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016
Jimmie Lindstrom, Braintree_ePayment Workshop @ Open Commerce Conference 2016
 
Rigadevdays - Communication in a microservice architecture
Rigadevdays  - Communication in a microservice architectureRigadevdays  - Communication in a microservice architecture
Rigadevdays - Communication in a microservice architecture
 
Managed WordPress Demystified
Managed WordPress DemystifiedManaged WordPress Demystified
Managed WordPress Demystified
 
How to achieve scalable environments using kubernetes and vmss on azure cloud
How to achieve scalable environments using kubernetes and vmss on azure cloudHow to achieve scalable environments using kubernetes and vmss on azure cloud
How to achieve scalable environments using kubernetes and vmss on azure cloud
 
From big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutionsFrom big data to AI, power your data with OVHcloud solutions
From big data to AI, power your data with OVHcloud solutions
 
Varnish Cache - step by step
Varnish Cache - step by stepVarnish Cache - step by step
Varnish Cache - step by step
 
Exposing Business Functionalities with SOA, Integration and API Management
Exposing Business Functionalities with SOA, Integration and API ManagementExposing Business Functionalities with SOA, Integration and API Management
Exposing Business Functionalities with SOA, Integration and API Management
 
Industrialise your deployment: Infrastructure as Code on OVHcloud Public Cloud
Industrialise your deployment: Infrastructure as Code on OVHcloud Public CloudIndustrialise your deployment: Infrastructure as Code on OVHcloud Public Cloud
Industrialise your deployment: Infrastructure as Code on OVHcloud Public Cloud
 
Sharing Best Practices and Recommendations from the Integration Battlefield
Sharing Best Practices and Recommendations from the Integration BattlefieldSharing Best Practices and Recommendations from the Integration Battlefield
Sharing Best Practices and Recommendations from the Integration Battlefield
 

Viewers also liked

NewSQL Database Overview
NewSQL Database OverviewNewSQL Database Overview
NewSQL Database Overview
Steve Min
 

Viewers also liked (6)

Varnish
VarnishVarnish
Varnish
 
SQL? NoSQL? NewSQL?!? What’s a Java developer to do? - JDC2012 Cairo, Egypt
SQL? NoSQL? NewSQL?!? What’s a Java developer to do? - JDC2012 Cairo, EgyptSQL? NoSQL? NewSQL?!? What’s a Java developer to do? - JDC2012 Cairo, Egypt
SQL? NoSQL? NewSQL?!? What’s a Java developer to do? - JDC2012 Cairo, Egypt
 
VarnishCache入門Rev2.1
VarnishCache入門Rev2.1VarnishCache入門Rev2.1
VarnishCache入門Rev2.1
 
NewSQL Database Overview
NewSQL Database OverviewNewSQL Database Overview
NewSQL Database Overview
 
Global Netflix Platform
Global Netflix PlatformGlobal Netflix Platform
Global Netflix Platform
 
Netflix Global Cloud Architecture
Netflix Global Cloud ArchitectureNetflix Global Cloud Architecture
Netflix Global Cloud Architecture
 

Similar to Steam Learn : Varnish or How to reduce the load of your web server

Similar to Steam Learn : Varnish or How to reduce the load of your web server (20)

WordPress performance tuning
WordPress performance tuningWordPress performance tuning
WordPress performance tuning
 
Varnish e caching di applicazioni Rails
Varnish e caching di applicazioni RailsVarnish e caching di applicazioni Rails
Varnish e caching di applicazioni Rails
 
OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...
OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...
OSDC 2012 | Ultra-performant dynamic websites with Varnish by Dr. Chriatian W...
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
VN Tech Seminor Vol.1
VN Tech Seminor Vol.1VN Tech Seminor Vol.1
VN Tech Seminor Vol.1
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 
Varnish & Magento TechTalk @Lyracons
Varnish & Magento TechTalk @LyraconsVarnish & Magento TechTalk @Lyracons
Varnish & Magento TechTalk @Lyracons
 
Delivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINXDelivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINX
 
Supercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the EdgeSupercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the Edge
 
Scaling Marketplace to 10,000 Add-Ons - Arun Bhalla
Scaling Marketplace to 10,000 Add-Ons  - Arun BhallaScaling Marketplace to 10,000 Add-Ons  - Arun Bhalla
Scaling Marketplace to 10,000 Add-Ons - Arun Bhalla
 
Extending Your Applications to the Edge with CDNs
Extending Your Applications to the Edge with CDNsExtending Your Applications to the Edge with CDNs
Extending Your Applications to the Edge with CDNs
 
Caching 101
Caching 101Caching 101
Caching 101
 
Increasing velocity via serless semantics
Increasing velocity via serless semanticsIncreasing velocity via serless semantics
Increasing velocity via serless semantics
 
Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]
 
Mage uk-2013-1345-chris-wells-131030120920-phpapp01
Mage uk-2013-1345-chris-wells-131030120920-phpapp01Mage uk-2013-1345-chris-wells-131030120920-phpapp01
Mage uk-2013-1345-chris-wells-131030120920-phpapp01
 
The Importance of Site Performance and Simple Steps to Achieve It
The Importance of Site Performance and Simple Steps to Achieve ItThe Importance of Site Performance and Simple Steps to Achieve It
The Importance of Site Performance and Simple Steps to Achieve It
 
Altitude SF 2017: Optimizing your hit rate
Altitude SF 2017: Optimizing your hit rateAltitude SF 2017: Optimizing your hit rate
Altitude SF 2017: Optimizing your hit rate
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
Optimizing website performance
Optimizing website performanceOptimizing website performance
Optimizing website performance
 
Apache Sling as a Microservices Gateway
Apache Sling as a Microservices GatewayApache Sling as a Microservices Gateway
Apache Sling as a Microservices Gateway
 

More from inovia

More from inovia (20)

10 tips for Redux at scale
10 tips for Redux at scale10 tips for Redux at scale
10 tips for Redux at scale
 
10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services10 essentials steps for kafka streaming services
10 essentials steps for kafka streaming services
 
Redux at scale
Redux at scaleRedux at scale
Redux at scale
 
DocuSign's Road to react
DocuSign's Road to reactDocuSign's Road to react
DocuSign's Road to react
 
API Gateway: Nginx way
API Gateway: Nginx wayAPI Gateway: Nginx way
API Gateway: Nginx way
 
Kafka: meetup microservice
Kafka: meetup microserviceKafka: meetup microservice
Kafka: meetup microservice
 
Microservice: starting point
Microservice:  starting pointMicroservice:  starting point
Microservice: starting point
 
Correlation id (tid)
Correlation id (tid)Correlation id (tid)
Correlation id (tid)
 
Meetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservicesMeetic back end redesign - Meetup microservices
Meetic back end redesign - Meetup microservices
 
Security in microservices architectures
Security in microservices architecturesSecurity in microservices architectures
Security in microservices architectures
 
Building a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice ApplicationsBuilding a Secure, Performant Network Fabric for Microservice Applications
Building a Secure, Performant Network Fabric for Microservice Applications
 
Microservices vs SOA
Microservices vs SOAMicroservices vs SOA
Microservices vs SOA
 
CQRS, an introduction by JC Bohin
CQRS, an introduction by JC BohinCQRS, an introduction by JC Bohin
CQRS, an introduction by JC Bohin
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Oauth2, open-id connect with microservices
Oauth2, open-id connect with microservicesOauth2, open-id connect with microservices
Oauth2, open-id connect with microservices
 
You probably don't need microservices
You probably don't need microservicesYou probably don't need microservices
You probably don't need microservices
 
Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?Api Gateway - What's the use of an api gateway?
Api Gateway - What's the use of an api gateway?
 
Steam Learn: An introduction to Redis
Steam Learn: An introduction to RedisSteam Learn: An introduction to Redis
Steam Learn: An introduction to Redis
 
Steam Learn: Speedrun et TAS
Steam Learn: Speedrun et TASSteam Learn: Speedrun et TAS
Steam Learn: Speedrun et TAS
 
Steam Learn: Asynchronous Javascript
Steam Learn: Asynchronous JavascriptSteam Learn: Asynchronous Javascript
Steam Learn: Asynchronous Javascript
 

Recently uploaded

Recently uploaded (20)

GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 

Steam Learn : Varnish or How to reduce the load of your web server

  • 1. 22th of January, 2015 How to reduce the load of your web server With Varnish by Clément Beudot
  • 2. 22th of January, 2015 Introduction ● What is Varnish ● Purpose of Varnish ● Varnish Request Life Cycle ● Performances : Apache vs Varnish ● Strength & Limitations ● Advanced features
  • 3. 22th of January, 2015 Quick Quiz ! Calculate, without using your smartphone 45 x 12
  • 4. 22th of January, 2015 Quick Quiz ! Calculate, without using your smartphone 45 x 12 = 540
  • 5. 22th of January, 2015 Recurring Content
  • 6. 22th of January, 2015 What is Varnish ● HTTP Reverse Proxy (HTTP Accelerator) ● Varnish 1.0 released in 2006, now version 4.0.2 ● Varnish written in C CLIENT VARNISH Web Server
  • 7. 22th of January, 2015 Purpose of Varnish ● Scaling at thousands of req/s ● Caching recurring content ● Caching static resources ● Reducing load of your web servers
  • 8. 22th of January, 2015 Varnish Request Life Cycle Few words to know first before seeing it ! 1. HIT : requested resource has been found in the cache 2. MISS : requested resource not found. 3. PASS : bypass of varnish 4. PIPE : direct passthrough to the backend (streams)
  • 9. 22th of January, 2015 Varnish Request Life Cycle Cache Miss RECV HASH PIPE HIT MISS PASS FETCH DELIVER WEB SERVER
  • 10. 22th of January, 2015 Varnish Request Life Cycle Cache Hit RECV HASH PIPE HIT MISS PASS FETCH DELIVER WEB SERVER
  • 11. 22th of January, 2015 Varnish Request Life Cycle Cache Pass RECV HASH PIPE HIT MISS PASS FETCH DELIVER WEB SERVER
  • 12. 22th of January, 2015 Varnish Request Life Cycle Cache Pipe RECV HASH PIPE HIT MISS PASS FETCH DELIVER WEB SERVER
  • 13. 22th of January, 2015 Performances : Apache vs Varnish Using Varnish on a low complexity page ** SIEGE 2.70 ** Preparing 200 concurrent users. Transactions: 2298 hits Availability: 100.00 % Elapsed time: 29.83 secs Data transferred: 5.70 MB Response time: 0.00 secs Transaction rate: 77.04 trans/sec Longest transaction: 0.01 secs Shortest transaction: 0.00 secs ** SIEGE 2.70 ** Preparing 200 concurrent users. Transactions: 1763 hits Availability: 100.00 % Elapsed time: 29.99 secs Data transferred: 4.36 MB Response time: 0.76 secs Transaction rate: 58.79 trans/sec Longest transaction: 1.88 secs Shortest transaction: 0.07 secs
  • 14. 22th of January, 2015 Performances : Apache vs Varnish Using Varnish on high complexity page ** SIEGE 2.70 ** Preparing 200 concurrent users. Transactions: 2298 hits Availability: 100.00 % Elapsed time: 29.83 secs Data transferred: 5.70 MB Response time: 0.00 secs Transaction rate: 77.04 trans/sec Longest transaction: 0.01 Shortest transaction: 0.00 ** SIEGE 2.70 ** Preparing 200 concurrent users. Transactions: 65 hits Availability: 100.00 % Elapsed time: 29.59 secs Data transferred: 1.35 MB Response time: 14.97 secs Transaction rate: 2.20 trans/sec Longest transaction: 28.22 secs Shortest transaction: 1.39 secs ** SIEGE 2.70 ** Preparing 200 concurrent users. Transactions: 2390 hits Availability: 100.00 % Elapsed time: 29.84 secs Data transferred: 49.49 MB Response time: 0.00 secs Transaction rate: 80.09 trans/sec Longest transaction: 0.01 secs Shortest transaction: 0.00 secs
  • 15. 22th of January, 2015 Performances : Apache vs Varnish Really easy for Varnish !
  • 16. 22th of January, 2015 Varnish Strengths ● Scaling to thousands of reqs/ s ● Load Balancing capability with Backend Health Check ● Ability to Manage the request life cycle ● Easy to partially integrate in your S.I
  • 17. 22th of January, 2015 Varnish Limitations ● HTTPS ● Only designed for GET & HEAD request ● Hates Cookies & HTTP Auth Headers ● Not recommended on 32 bits servers ● Using Varnish for a logged user on your website
  • 18. 22th of January, 2015 Varnish Limitations
  • 19. 22th of January, 2015 Varnish : Advanced Features & Assets ● E.S.I. Support ● Control varnish via CLI or dedicated modules ● “Always online”
  • 20. 22th of January, 2015 How to reduce the load of your web server with varnish - Summary ● HTTP Accelerator / HTTP Reverse Proxy ● Get rid of recurring content cost ● Scale at “nearly” zero cost ● And finally … reduce the load of your web server by avoiding unnecessary calculation.
  • 21. 22th of January, 2015 How to reduce the load of your web server with varnish Thank You
  • 22. 22th of January, 2015 How to reduce the load of your web server with varnish Questions ? How to install it ? Do I really need Varnish ? Can I cache in a file instead of RAM ? How I can change the TTL for a page ? What if all my backends are dead ? Can I use varnish for my logged users ? Is Varnish really useful for static content ? Can I load balance on multiple backends ? How much RAM do I need ?
  • 23. 29th of January, 2015 Join the community ! (in Paris) Social networks : ● Follow us on Twitter : https://twitter.com/steamlearn ● Like us on Facebook : https://www.facebook.com/steamlearn SteamLearn is an Inovia initiative : inovia.fr You wish to be in the audience ? Join the meetup group! http://www.meetup.com/Steam-Learn/