Varnish - HTTP Accelerator Crash Course
Varnish is a reverse proxy web accelerator Written in C designed to improve HTTP performance by using server side caching.
In this video I’m going to go through how Varnish works, we will spin up a Varnish docker container and finally talk about the pros and cons of this tech.
Chapters
0:00 Intro
1:53 Classic HTTP Architecture
3:50 How Varnish Works
7:50 Demo HTTP
18:23 Demo HTTPS
28:43 Varnish Pros
39:26 Varnish Cons
Agenda
* Classic HTTP Architecture
* How Varnish Works?
* HTTP Setup - Varnish
* HTTPS Setup - Varnish with Caddy as TLS Terminator.
* Varnish Pros & Cons
* Summary
Pros
* Cache & prefetching documents
* Resolve DNS hostnames in documents
* Rewrite scripts to optimize code
* Load Balancing
* Backend Connection Pooling
* Varnish Modules (VMODS, e.g. rewrite headers)
* Edge side includes (personalized dynamic page)
Cons
* Cache Invalidation
* Only works on unencrypted HTTP
* For HTTPS frontend, terminate TLS
* For HTTPS backend, no solution in Varnish open source
* Can’t cache POST requests (e.g. GraphQL queries)
* HTTP/2 backends won’t benefit
docker commands
docker run --name varnish -p 8080:80 varnish
docker cp default.vcl varnish:/etc/varnish
default.vcl
vcl 4.0;
backend default {
.host = "husseinmac";
.port = "2015";
}
Cards:
Connection Pooling 2:15 https://www.youtube.com/watch?v=GTeCtIoV2Tw
Layer 4 vs Layer 7 Load balancing 6:25 https://www.youtube.com/watch?v=aKMLgFVxZYk
GET vs POST 6:48 https://www.youtube.com/watch?v=K8HJ6DN23zI
Postgres NodeJS Chrome 8:23 https://www.youtube.com/watch?v=0JNq46eFuOM
Redis 46:13 https://www.youtube.com/watch?v=sVCZo5B8ghE
TLS Termination 49:35 https://www.youtube.com/watch?v=H0bkLsUe3no
Resources
edge side includes
https://www.fastly.com/blog/using-esi-part-1-simple-edge-side-include
Cache invalidation varnish
https://www.smashingmagazine.com/2014/04/cache-invalidation-strategies-with-varnish-cache/
Varnish Doc
https://varnish-cache.org/docs/
🏭 Software Architecture Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQXNP6mQchJVP3S-3oKGEuw9
💾 Database Engineering Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQXjD0HOzN7P2tgzu7scWpl2
🛰 Network Engineering Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQUBSgBXilKhRMJ1ACqr7pTr
🏰 Load Balancing and Proxies Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQVMeBmWI2AhxULWEeo7AaMC
🐘 Postgres Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQWGrOqslniFlRcwxyY94cjj
🧮 Programming Pattern Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQV1emqxKbcP5esAf4zpqWpe
🛡 Web Security Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU3YDMRSMvzflh_qXoz9zfv
🦠 HTTP Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU6zO0drAYHFtkkyfNJw1IO
🐍 Python Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU_M83ARz8mDdr4LThzkBKX
🔆 Javascript Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQWab0g3W6ZaDM6_Buh20EWM
Support me on PayPal
https://bit.ly/33ENps4
Become a Patreon
https://www.patreon.com/join/hnasr?
Stay Awesome,
Hussein
Видео Varnish - HTTP Accelerator Crash Course канала Hussein Nasser
In this video I’m going to go through how Varnish works, we will spin up a Varnish docker container and finally talk about the pros and cons of this tech.
Chapters
0:00 Intro
1:53 Classic HTTP Architecture
3:50 How Varnish Works
7:50 Demo HTTP
18:23 Demo HTTPS
28:43 Varnish Pros
39:26 Varnish Cons
Agenda
* Classic HTTP Architecture
* How Varnish Works?
* HTTP Setup - Varnish
* HTTPS Setup - Varnish with Caddy as TLS Terminator.
* Varnish Pros & Cons
* Summary
Pros
* Cache & prefetching documents
* Resolve DNS hostnames in documents
* Rewrite scripts to optimize code
* Load Balancing
* Backend Connection Pooling
* Varnish Modules (VMODS, e.g. rewrite headers)
* Edge side includes (personalized dynamic page)
Cons
* Cache Invalidation
* Only works on unencrypted HTTP
* For HTTPS frontend, terminate TLS
* For HTTPS backend, no solution in Varnish open source
* Can’t cache POST requests (e.g. GraphQL queries)
* HTTP/2 backends won’t benefit
docker commands
docker run --name varnish -p 8080:80 varnish
docker cp default.vcl varnish:/etc/varnish
default.vcl
vcl 4.0;
backend default {
.host = "husseinmac";
.port = "2015";
}
Cards:
Connection Pooling 2:15 https://www.youtube.com/watch?v=GTeCtIoV2Tw
Layer 4 vs Layer 7 Load balancing 6:25 https://www.youtube.com/watch?v=aKMLgFVxZYk
GET vs POST 6:48 https://www.youtube.com/watch?v=K8HJ6DN23zI
Postgres NodeJS Chrome 8:23 https://www.youtube.com/watch?v=0JNq46eFuOM
Redis 46:13 https://www.youtube.com/watch?v=sVCZo5B8ghE
TLS Termination 49:35 https://www.youtube.com/watch?v=H0bkLsUe3no
Resources
edge side includes
https://www.fastly.com/blog/using-esi-part-1-simple-edge-side-include
Cache invalidation varnish
https://www.smashingmagazine.com/2014/04/cache-invalidation-strategies-with-varnish-cache/
Varnish Doc
https://varnish-cache.org/docs/
🏭 Software Architecture Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQXNP6mQchJVP3S-3oKGEuw9
💾 Database Engineering Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQXjD0HOzN7P2tgzu7scWpl2
🛰 Network Engineering Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQUBSgBXilKhRMJ1ACqr7pTr
🏰 Load Balancing and Proxies Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQVMeBmWI2AhxULWEeo7AaMC
🐘 Postgres Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQWGrOqslniFlRcwxyY94cjj
🧮 Programming Pattern Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQV1emqxKbcP5esAf4zpqWpe
🛡 Web Security Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU3YDMRSMvzflh_qXoz9zfv
🦠 HTTP Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU6zO0drAYHFtkkyfNJw1IO
🐍 Python Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQU_M83ARz8mDdr4LThzkBKX
🔆 Javascript Videos
https://www.youtube.com/playlist?list=PLQnljOFTspQWab0g3W6ZaDM6_Buh20EWM
Support me on PayPal
https://bit.ly/33ENps4
Become a Patreon
https://www.patreon.com/join/hnasr?
Stay Awesome,
Hussein
Видео Varnish - HTTP Accelerator Crash Course канала Hussein Nasser
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Varnish Cache workshop at Varnishcon 2016 by Thijs Feryn](https://i.ytimg.com/vi/ybMdQWUjp2E/default.jpg)
![Redis In-memory Database Crash Course](https://i.ytimg.com/vi/sVCZo5B8ghE/default.jpg)
![Proxy vs. Reverse Proxy (Explained by Example)](https://i.ytimg.com/vi/ozhe__GdWC8/default.jpg)
![TCP vs UDP Crash Course](https://i.ytimg.com/vi/qqRYkcta6IE/default.jpg)
![Layer 4 vs Layer 7 Proxying In Details Explained with Examples](https://i.ytimg.com/vi/ylkAc9wmKhc/default.jpg)
![Web Wordpress optimizada x25 con Varnish Cache(Probado con Apache Bench) [BRUTAL !!!!]](https://i.ytimg.com/vi/5P0DYA2Tnxk/default.jpg)
![Apache Kafka Crash Course](https://i.ytimg.com/vi/R873BlNVUB4/default.jpg)
![gRPC Crash Course - Modes, Examples, Pros & Cons and more](https://i.ytimg.com/vi/Yw4rkaTc0f8/default.jpg)
![We Need to Discuss the Microservices Madness - Scaling with Common Sense](https://i.ytimg.com/vi/NsIeAV5aFLE/default.jpg)
![Mattias Geniar - Varnish for PHP developers - Laracon EU 2016](https://i.ytimg.com/vi/nAFpkV5-vuI/default.jpg)
![LanCache Tutorial | Speed Up Steam, Origin, Uplay, Epic, Battle.net, ...](https://i.ytimg.com/vi/3bfJdtA7GtA/default.jpg)
![Thijs Feryn - Reverse caching proxies: Varnish or Nginx?](https://i.ytimg.com/vi/KldPhbWqy2U/default.jpg)
![What is Distributed Caching? Explained with Redis!](https://i.ytimg.com/vi/U3RkDLtS7uY/default.jpg)
![Why Discord Moved from MongoDB to Apache Cassandra, Let us Discuss](https://i.ytimg.com/vi/86olupkuLlU/default.jpg)
![How HTTP/2 Works, Performance, Pros & Cons and More](https://i.ytimg.com/vi/fVKPrDrEwTI/default.jpg)
![What are SSL/TLS Certificates? Why do we Need them? and How do they Work?](https://i.ytimg.com/vi/r1nJT63BFQ0/default.jpg)
![My Process of Designing and Architecting Software](https://i.ytimg.com/vi/TMamxmcurAQ/default.jpg)
![](https://i.ytimg.com/vi/MwCXf1IlhOk/default.jpg)
![How does NodeJS HTTP Server Looks Like in Wireshark?](https://i.ytimg.com/vi/73wykKgA6bY/default.jpg)
![How to Install Varnish Cache on Your Nginx Server](https://i.ytimg.com/vi/lC3rbIn2Sjc/default.jpg)