SlideShare a Scribd company logo
Create a Varnish cluster in Kubernetes
for Drupal caching
Vadym Myrgorod
Slides: http://bit.ly/k8s-varnish-drupal
Vadym Myrgorod
Using Drupal since 2008
Web App Developer
Howard Hughes Medical Institute
@dealancer1
https://www.myrgorod.net
I will make a quick intro into Varnish and Kubernetes.
We will learn how to configure Varnish cluster for Drupal 8
and run it on Kubernetes platform.
In this session
what is
Varnish?
More users means slower website
Slower website means bigger bounce rate
1. Cutting visitors off
2. Arranging visitors in an online queue
3. Buying more hardware
Approaches we won’t cover in this session
In computing, a cache is a hardware or software
component that stores data so that future requests for
that data can be served faster; the data stored in a cache
might be the result of an earlier computation or a copy of
data stored elsewhere.
Caching
Levels of caching
1
Opcode Caching
Compile PHP script into opcode and cache it.
Examples: OPcache extension.
3
Drupal Caching
Store blocks, views and other Drupal
components in memory.
Examples: Memcache, Redis.
5
Content Delivery Network
Store static assets in geographically
distributed caching system.
Examples: Cloudflare, Fastly, Akamai.
2
Database Caching
Store results of SQL queries in memory.
Examples: memcached.
4
Static Content Caching
Store static assets in memory.
Examples: Varnish, Nginx.
● Aggregated CSS files
● Aggregated JS files
● Images of various image styles
● HTML pages (for anonymous users)
Static content generated by Drupal
● Caching HTTP reverse proxy
● Speeds up delivery with a factor of 300 - 1000x
● Varnish Configuration Language (VCL)
● Can be scaled into Varnish Cluster
Backend - server which is providing
the content Varnish will accelerate.
Frontend - client facing Varnish
server.
Terms
Backend
Frontend
vcl 4.0;
backend default {
.host = "127.0.0.1";
.port = "8080";
}
sub vcl_recv {
if (req.http.host == "www.example.com") {
set req.backend_hint = default;
}
}
See following VCL example for Drupal 8 and 7:
https://www.varnish-software.com/wiki/content/tutorials/drupal/drupal_vcl.html
Minimal Varnish VCL
/etc/varnish/default.vcl
now let’s talk about
Kubernetes
1. You want to manage services you are running e.g. MySQL,
Varnish, Redis, Apache Solr, Elasticsearch...
2. You want to have an ability to migrate from one cloud
provider to another quickly.
3. You have on-premises infrastructure you need to utilize.
4. You want to use multicloud or hybrid-cloud approaches.
5. You want to have some of the cool features that
Kubernetes provides.
When using Kubernetes is a good idea
1. Scaling: runs more containers if needed.
2. Healing: restarts containers when they are down.
3. Deployment strategies: rolling updates, blue/green, canary...
4. Service discovery and load balancing: distributes access to
containers by service name.
5. Security: secret management, security policies.
6. Storage orchestration: cloud, NFS, or storage providers.
7. Flexibility and extensibility: Go is widely used in k8s world.
Things Kubernetes is good at
● Resource - endpoint in k8s API that stores a
collection of certain kind. Declared using YAML
syntax. Example: config map, secret, volume, volume
claim, pod, deployment, stateful set, service, ingress,
etc...
● Config map - stores software configuration that can
be mounted as files or passed as env variables.
● Volume - used to preserve file system after container
is restarted.
● Pod - k8s resource that represents running
container (or set set of containers).
Kubernetes resources
Config map
Pod
Deployment
Service
Ingress
Stateful Set
Volume
● Deployment - ensures certain amount of pods are
up and running.
● Stateful Set - acts as deployment for stateful
services that have specific requirements to storage
and pod identity.
● Service - provides a way to access deployments or
stateful sets using different behaviours. Creates a
common DNS record that can be used to access
pods and does load balancing.
● Ingress - manages external access to services using
various routing rules.
Kubernetes resources
Config map
Pod
Deployment
Service
Ingress
Stateful Set
Volume
nginx-deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
Minimal Kubernetes deployment and service
nginx-service.yaml:
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
app: nginx
type: NodePort
ports:
- protocol: TCP
port: 8080
targetPort: 80
nodePort: 30080
1. Apply deployment
$ kubectl apply -f nginx-deployment.yaml
2. Check deployments
$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
nginx-deployment 0/2 0 0 1s
3. Check pods
$ kubectl get pods --show-labels
NAME READY STATUS RESTARTS AGE LABELS
nginx-deployment-75675f5897-7ci7o 1/1 Running 0 18s app=nginx,pod-template-hash=3123191453
nginx-deployment-75675f5897-kzszj 1/1 Running 0 18s app=nginx,pod-template-hash=3123191453
Minimal Kubernetes deployment and service
4. Apply service
$ kubectl apply -f nginx-service.yaml
5. Check services
$ kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 41d
nginx-service NodePort 10.98.115.133 <none> 8080:30080/TCP 5m11s
6. Access nginx using node port
$ curl localhost:30080
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
...
Minimal Kubernetes deployment and service
running
Varnish in Kubernetes
To run Varnish in k8s we need to declare app deployment, app
service, Varnish deployment, Varnish service, config maps and
ingress.
Example: https://github.com/dealancer/k8s-varnish-test.
The simplest approach
varnish-deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: varnish-deployment
labels:
app: varnish
spec:
replicas: 1
selector:
matchLabels:
app: varnish
template:
metadata:
labels:
app: varnish
The simplest approach
spec:
containers:
- name: varnish
image: varnish:6.6.0
env:
- name: CACHE_SIZE
value: 128m
- name: VCL_CONFIG
value: /etc/varnish/configmap/default.vcl
volumeMounts:
- name: varnish-config
mountPath: /etc/varnish/configmap
ports:
- containerPort: 80
volumes:
- name: varnish-config
configMap:
name: varnish-configmap
varnish-configmap.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
name: varnish-configmap
labels:
app: varnish
data:
default.vcl: |
vcl 4.0;
backend default {
.host = "nginx-service";
.port = "8080";
}
sub vcl_recv {
set req.backend_hint = default;
}
The simplest approach
varnish-service.yaml:
apiVersion: v1
kind: Service
metadata:
name: varnish-service
spec:
selector:
app: nginx
type: NodePort
ports:
- protocol: TCP
port: 80
targetPort: 80
nodePort: 30081
Questions to this approach:
1. Can we eliminate App Service and let Varnish talk to
application pods (backends) directly?
2. How do we scale Varnish pods (frontends)?
3. How do we shard cache across multiple Varnish pods?
4. How do we invalidate cache in multiple Varnish pods?
The simplest approach
kube-httpcache is an open Source Kubernetes controller written in Go to run Varnish
cluster. It is a free solution comparing to Varnish Cache Plus, but it requires to configure
Varnish in certain way using VCL.
GitHub: https://github.com/mittwald/kube-httpcache.
Features:
● Monitors backend (app) and frontend (Varnish) pods.
● Dynamically update Varnish VCL and reload it on the the fly in all Varnish pods.
● Supports Go-template syntax in VCL file.
● Sends cache invalidation requests to all Varnish pods using Signaller component.
kube-httpcache
spec:
containers:
- name: cache
image: quay.io/mittwald/kube-httpcache:stable
imagePullPolicy: Always
args:
- -admin-addr=0.0.0.0
- -admin-port=6083
- -signaller-enable
- -signaller-port=8090
- -frontend-watch
- -frontend-namespace=$(NAMESPACE)
- -frontend-service=frontend-service
- -backend-watch
- -backend-namespace=$(NAMESPACE)
- -backend-service=backend-service
- -varnish-secret-file=/etc/varnish/k8s-secret/secret
- -varnish-vcl-template=/etc/varnish/tmpl/default.vcl.tmpl
- -varnish-storage=malloc,128M
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- name: template
mountPath: /etc/varnish/tmpl
- name: secret
mountPath: /etc/varnish/k8s-secret
varnish-service.yaml (part)
{{ range .Backends }}
backend be-{{ .Name }} {
.host = "{{ .Host }}";
.port = "{{ .Port }}";
}
{{- end }}
{{ range .Frontends }}
backend {{ .Name }} {
.host = "{{ .Host }}";
.port = "{{ .Port }}";
}
{{- end }}
sub vcl_init {
new lb = directors.round_robin();
{{ range .Backends -}}
lb.add_backend(be-{{ .Name }});
{{ end }}
}
sub vcl_recv {
set req.backend_hint = lb.backend();
}
Eliminate the need in backend service
In this approach cache is sharded across multiple Varnish frontends.
1. Varnish Service routes requests to a random Varnish frontend.
2. A corresponding Varnish frontend (x-shard) determined based on the
URL using hash director:
a. http://example.com/foo -> frontend 1
b. http://example.com/bar -> frontend 2
c. http://example.com/bar2 -> frontend 1
3. If x-shard is not the current Varnish frontend, request is forwarded to
x-shard.
4. Otherwise, request is handled by the current Varnish node:
a. If request is cacheable and cache exist, cached content is returned.
b. If cache does not exists, Varnish requests a backend to save cache
and serve cached content.
c. If request is cacheable request is routed to a backend.
See https://info.varnish-software.com/blog/creating-self-routing-varnish-cluster
Running Varnish cluster (sharded cache)
sub vcl_init {
# ...
new cluster = directors.hash();
{{ range .Frontends -}}
cluster.add_backend({{ .Name }}, 1);
{{ end }}
}
sub vcl_recv {
set req.backend_hint = lb.backend();
# ...
unset req.http.x-cache;
set req.backend_hint = cluster.backend(req.url);
set req.http.x-shard = req.backend_hint;
if (req.http.x-shard != server.identity) {
return(pass);
}
set req.backend_hint = lb.backend();
# ...
return(hash);
}
Running Varnish cluster (sharded cache)
Problem
In case if you horizontally scale your Varnish cluster, a
hash director will recalculate hashes for existing URLs
and will route requests to different Varnish frontends
which do not store cached content for these URLs.
Thus users will experience slowdown.
Solution
Consistent caching mechanism is provided by Varnish
through shard director. Consistent caching represents
URLs and frontends as points on the ring. Adding new
frontend, simply adds a new point on the ring.
Scaling Varnish cluster
sub vcl_init {
# ...
new cluster = directors.shard();
{{ range .Frontends -}}
cluster.add_backend({{ .Name }});
{{ end }}
cluster.set_warmup(180);
}
sub vcl_recv {
set req.backend_hint = lb.backend();
# ...
unset req.http.x-cache;
set req.backend_hint = cluster.backend(by=URL);
set req.http.x-shard = req.backend_hint;
if (req.http.x-shard != server.identity) {
return(pass);
}
set req.backend_hint = lb.backend();
# ...
return(hash);
}
Scaling Varnish cluster
Varnish Signaller:
● Is aware of all Varnish frontends running
● acts similarly to Varnish Broadcaster (component of Varnish Plus)
● broadcasts flush cache request to all Varnish frontends
● runs on port 8090
BAN requests
$ curl -H "X-Url: /path" -X BAN http://cache-service:8090
$ curl -H "Cache-Tags: node-1" -X BAN http://cache-service:8090
PURGE requests
$ curl -H "X-Host: www.example.com" -X PURGE http://cache-service:8090/path
Invalidating cache
sub vcl_recv {
# ...
if (req.method == "PURGE") {
if (client.ip !~ privileged) {
return (synth(403, "Not allowed."));
}
if (req.http.X-Host) {
set req.http.host = req.http.X-Host;
}
return (purge);
}
if (req.method == "BAN") {
if (client.ip !~ privileged) {
return (synth(403, "Not allowed."));
}
if (req.http.Cache-Tags) {
ban("obj.http.Cache-Tags ~ " + req.http.Cache-Tags);
return (synth(200, "Ban added " + req.http.host));
}
if (req.http.X-Url) {
ban("obj.http.X-Url == " + req.http.X-Url);
return (synth(200, "Ban added " + req.http.host));
}
return (synth(403, "Cache-Tags or X-Url header missing."));
}
# ...
}
Invalidating cache
1. Kubernetes Playground
https://www.katacoda.com/courses/kubernetes/playground
2. Kubernetes Patterns Book
https://www.redhat.com/cms/managed-files/cm-oreilly-kubernetes-patterns-ebook-f19824-2
01910-en.pdf
3. Article this presentation is based on
https://dealancer.medium.com/creating-a-scalable-and-resilient-varnish-cluster-using-kuber
netes-853f03ec9731
4. kube-httpcache project
https://github.com/mittwald/kube-httpcache
5. Complete VCL file for Drupal 8 and 9 (IMPORTANT)
https://gist.github.com/dealancer/968297d6ddd93df80d012af7f4093294
Resources
configuring
Drupal
1. Purge module - https://www.drupal.org/project/purge
Clreans external caching systems, reverse proxies and CDNs
2. Varnish purger - https://www.drupal.org/project/varnish_purge
Extension of Purge module to clear Varnish cache
3. Configuration URL: /admin/config/development/performance/purge
Configuring Drupal
Configuring Drupal
Configuring Drupal
Configuring Drupal
Q&A?
Slides: http://bit.ly/k8s-varnish-drupal
Please, take a survey!
Thanks!
Slides: http://bit.ly/k8s-varnish-drupal
Please, take a survey!
Ad

More Related Content

What's hot (20)

Best Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with TerraformBest Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with Terraform
DevOps.com
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
gjuljo
 
Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s Vault
AWS Germany
 
Kinh nghiệm triển khai Microservices tại Sapo.vn
Kinh nghiệm triển khai Microservices tại Sapo.vnKinh nghiệm triển khai Microservices tại Sapo.vn
Kinh nghiệm triển khai Microservices tại Sapo.vn
Dotnet Open Group
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
Khizer Naeem
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
Docker, Inc.
 
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
Amazon Web Services Korea
 
Red Hat OpenShift Operators - Operators ABC
Red Hat OpenShift Operators - Operators ABCRed Hat OpenShift Operators - Operators ABC
Red Hat OpenShift Operators - Operators ABC
Robert Bohne
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform Overview
James Falkner
 
Kubernetes #4 volume &amp; stateful set
Kubernetes #4   volume &amp; stateful setKubernetes #4   volume &amp; stateful set
Kubernetes #4 volume &amp; stateful set
Terry Cho
 
Understanding container security
Understanding container securityUnderstanding container security
Understanding container security
John Kinsella
 
Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018
Anton Babenko
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
Sneha Inguva
 
Heap Dump Analysis - AEM: Real World Issues
Heap Dump Analysis - AEM: Real World IssuesHeap Dump Analysis - AEM: Real World Issues
Heap Dump Analysis - AEM: Real World Issues
Kanika Gera
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
Christian Posta
 
Introduction to helm
Introduction to helmIntroduction to helm
Introduction to helm
Jeeva Chelladhurai
 
Introduzione a Docker (Maggio 2017) [ITA]
Introduzione a Docker (Maggio 2017) [ITA]Introduzione a Docker (Maggio 2017) [ITA]
Introduzione a Docker (Maggio 2017) [ITA]
Valerio Radice
 
Replacing Your Shared Drive with Alfresco - Open Source ECM
Replacing Your Shared Drive with Alfresco - Open Source ECMReplacing Your Shared Drive with Alfresco - Open Source ECM
Replacing Your Shared Drive with Alfresco - Open Source ECM
Alfresco Software
 
Prometheus and Grafana
Prometheus and GrafanaPrometheus and Grafana
Prometheus and Grafana
Lhouceine OUHAMZA
 
GitLab 라이선스별 특징 요약 - 인포그랩
GitLab 라이선스별 특징 요약 - 인포그랩GitLab 라이선스별 특징 요약 - 인포그랩
GitLab 라이선스별 특징 요약 - 인포그랩
InfoGrab LC
 
Best Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with TerraformBest Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with Terraform
DevOps.com
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
gjuljo
 
Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s Vault
AWS Germany
 
Kinh nghiệm triển khai Microservices tại Sapo.vn
Kinh nghiệm triển khai Microservices tại Sapo.vnKinh nghiệm triển khai Microservices tại Sapo.vn
Kinh nghiệm triển khai Microservices tại Sapo.vn
Dotnet Open Group
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
Khizer Naeem
 
Docker 101 - Nov 2016
Docker 101 - Nov 2016Docker 101 - Nov 2016
Docker 101 - Nov 2016
Docker, Inc.
 
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
Amazon Web Services Korea
 
Red Hat OpenShift Operators - Operators ABC
Red Hat OpenShift Operators - Operators ABCRed Hat OpenShift Operators - Operators ABC
Red Hat OpenShift Operators - Operators ABC
Robert Bohne
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform Overview
James Falkner
 
Kubernetes #4 volume &amp; stateful set
Kubernetes #4   volume &amp; stateful setKubernetes #4   volume &amp; stateful set
Kubernetes #4 volume &amp; stateful set
Terry Cho
 
Understanding container security
Understanding container securityUnderstanding container security
Understanding container security
John Kinsella
 
Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018
Anton Babenko
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
Sneha Inguva
 
Heap Dump Analysis - AEM: Real World Issues
Heap Dump Analysis - AEM: Real World IssuesHeap Dump Analysis - AEM: Real World Issues
Heap Dump Analysis - AEM: Real World Issues
Kanika Gera
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
Christian Posta
 
Introduzione a Docker (Maggio 2017) [ITA]
Introduzione a Docker (Maggio 2017) [ITA]Introduzione a Docker (Maggio 2017) [ITA]
Introduzione a Docker (Maggio 2017) [ITA]
Valerio Radice
 
Replacing Your Shared Drive with Alfresco - Open Source ECM
Replacing Your Shared Drive with Alfresco - Open Source ECMReplacing Your Shared Drive with Alfresco - Open Source ECM
Replacing Your Shared Drive with Alfresco - Open Source ECM
Alfresco Software
 
GitLab 라이선스별 특징 요약 - 인포그랩
GitLab 라이선스별 특징 요약 - 인포그랩GitLab 라이선스별 특징 요약 - 인포그랩
GitLab 라이선스별 특징 요약 - 인포그랩
InfoGrab LC
 

Similar to Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North America 2021 (20)

Gluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud ApplicationsGluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud Applications
Gluster.org
 
Gluster Contenarized Storage for Cloud Applications
Gluster Contenarized Storage for Cloud ApplicationsGluster Contenarized Storage for Cloud Applications
Gluster Contenarized Storage for Cloud Applications
Humble Chirammal
 
Web scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannelWeb scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannel
purpleocean
 
Drupalcamp es 2013 drupal with lxc docker and vagrant
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant
Ricardo Amaro
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
Velocidex Enterprises
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
Liran Cohen
 
5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:
Kangaroot
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
QAware GmbH
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
Mario-Leander Reimer
 
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google CloudDrupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Dropsolid
 
Autopilot : Securing Cloud Native Storage
Autopilot : Securing Cloud Native StorageAutopilot : Securing Cloud Native Storage
Autopilot : Securing Cloud Native Storage
SF Bay Cloud Native Open Infra Meetup
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
Ricardo Amaro
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
Robert Lemke
 
Automating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with PuppetAutomating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with Puppet
buildacloud
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Stefan Schimanski
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations Center
Jimmy Mesta
 
Laravel, docker, kubernetes
Laravel, docker, kubernetesLaravel, docker, kubernetes
Laravel, docker, kubernetes
Peter Mein
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
HungWei Chiu
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
Paul Czarkowski
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David Nalley
Puppet
 
Gluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud ApplicationsGluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud Applications
Gluster.org
 
Gluster Contenarized Storage for Cloud Applications
Gluster Contenarized Storage for Cloud ApplicationsGluster Contenarized Storage for Cloud Applications
Gluster Contenarized Storage for Cloud Applications
Humble Chirammal
 
Web scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannelWeb scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannel
purpleocean
 
Drupalcamp es 2013 drupal with lxc docker and vagrant
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant
Ricardo Amaro
 
Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3Digital Forensics and Incident Response in The Cloud Part 3
Digital Forensics and Incident Response in The Cloud Part 3
Velocidex Enterprises
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
Liran Cohen
 
5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:
Kangaroot
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
QAware GmbH
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
Mario-Leander Reimer
 
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google CloudDrupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Dropsolid
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
Ricardo Amaro
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
Robert Lemke
 
Automating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with PuppetAutomating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with Puppet
buildacloud
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Stefan Schimanski
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations Center
Jimmy Mesta
 
Laravel, docker, kubernetes
Laravel, docker, kubernetesLaravel, docker, kubernetes
Laravel, docker, kubernetes
Peter Mein
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
HungWei Chiu
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
Paul Czarkowski
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David Nalley
Puppet
 
Ad

More from Ovadiah Myrgorod (8)

How we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown UniversityHow we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown University
Ovadiah Myrgorod
 
Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8
Ovadiah Myrgorod
 
Drupal code sprint для новичков
Drupal code sprint для новичковDrupal code sprint для новичков
Drupal code sprint для новичков
Ovadiah Myrgorod
 
Open source and You. DrupalForum ZP.
Open source and You. DrupalForum ZP.Open source and You. DrupalForum ZP.
Open source and You. DrupalForum ZP.
Ovadiah Myrgorod
 
Создаем Drupal дистрибутив: от идеи до сопровождения
Создаем Drupal дистрибутив: от идеи до сопровожденияСоздаем Drupal дистрибутив: от идеи до сопровождения
Создаем Drupal дистрибутив: от идеи до сопровождения
Ovadiah Myrgorod
 
Системы управления взаимоотношениями с клиентами. Drupal CRM Core.
Системы управления взаимоотношениями с клиентами. Drupal CRM Core. Системы управления взаимоотношениями с клиентами. Drupal CRM Core.
Системы управления взаимоотношениями с клиентами. Drupal CRM Core.
Ovadiah Myrgorod
 
Drupal Camp Kyiv 2011 - OpenAcaDept – Drupal distribution for building academ...
Drupal Camp Kyiv 2011 - OpenAcaDept – Drupal distribution for building academ...Drupal Camp Kyiv 2011 - OpenAcaDept – Drupal distribution for building academ...
Drupal Camp Kyiv 2011 - OpenAcaDept – Drupal distribution for building academ...
Ovadiah Myrgorod
 
DrupalCon Chicago - Best practices for cross-browser compatibility of Drupal ...
DrupalCon Chicago - Best practices for cross-browser compatibility of Drupal ...DrupalCon Chicago - Best practices for cross-browser compatibility of Drupal ...
DrupalCon Chicago - Best practices for cross-browser compatibility of Drupal ...
Ovadiah Myrgorod
 
How we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown UniversityHow we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown University
Ovadiah Myrgorod
 
Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8
Ovadiah Myrgorod
 
Drupal code sprint для новичков
Drupal code sprint для новичковDrupal code sprint для новичков
Drupal code sprint для новичков
Ovadiah Myrgorod
 
Open source and You. DrupalForum ZP.
Open source and You. DrupalForum ZP.Open source and You. DrupalForum ZP.
Open source and You. DrupalForum ZP.
Ovadiah Myrgorod
 
Создаем Drupal дистрибутив: от идеи до сопровождения
Создаем Drupal дистрибутив: от идеи до сопровожденияСоздаем Drupal дистрибутив: от идеи до сопровождения
Создаем Drupal дистрибутив: от идеи до сопровождения
Ovadiah Myrgorod
 
Системы управления взаимоотношениями с клиентами. Drupal CRM Core.
Системы управления взаимоотношениями с клиентами. Drupal CRM Core. Системы управления взаимоотношениями с клиентами. Drupal CRM Core.
Системы управления взаимоотношениями с клиентами. Drupal CRM Core.
Ovadiah Myrgorod
 
Drupal Camp Kyiv 2011 - OpenAcaDept – Drupal distribution for building academ...
Drupal Camp Kyiv 2011 - OpenAcaDept – Drupal distribution for building academ...Drupal Camp Kyiv 2011 - OpenAcaDept – Drupal distribution for building academ...
Drupal Camp Kyiv 2011 - OpenAcaDept – Drupal distribution for building academ...
Ovadiah Myrgorod
 
DrupalCon Chicago - Best practices for cross-browser compatibility of Drupal ...
DrupalCon Chicago - Best practices for cross-browser compatibility of Drupal ...DrupalCon Chicago - Best practices for cross-browser compatibility of Drupal ...
DrupalCon Chicago - Best practices for cross-browser compatibility of Drupal ...
Ovadiah Myrgorod
 
Ad

Recently uploaded (20)

Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage DashboardsAdobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
Adobe Marketo Engage Champion Deep Dive - SFDC CRM Synch V2 & Usage Dashboards
BradBedford3
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 

Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North America 2021

  • 1. Create a Varnish cluster in Kubernetes for Drupal caching Vadym Myrgorod Slides: http://bit.ly/k8s-varnish-drupal
  • 2. Vadym Myrgorod Using Drupal since 2008 Web App Developer Howard Hughes Medical Institute @dealancer1 https://www.myrgorod.net
  • 3. I will make a quick intro into Varnish and Kubernetes. We will learn how to configure Varnish cluster for Drupal 8 and run it on Kubernetes platform. In this session
  • 5. More users means slower website
  • 6. Slower website means bigger bounce rate
  • 7. 1. Cutting visitors off 2. Arranging visitors in an online queue 3. Buying more hardware Approaches we won’t cover in this session
  • 8. In computing, a cache is a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere. Caching
  • 9. Levels of caching 1 Opcode Caching Compile PHP script into opcode and cache it. Examples: OPcache extension. 3 Drupal Caching Store blocks, views and other Drupal components in memory. Examples: Memcache, Redis. 5 Content Delivery Network Store static assets in geographically distributed caching system. Examples: Cloudflare, Fastly, Akamai. 2 Database Caching Store results of SQL queries in memory. Examples: memcached. 4 Static Content Caching Store static assets in memory. Examples: Varnish, Nginx.
  • 10. ● Aggregated CSS files ● Aggregated JS files ● Images of various image styles ● HTML pages (for anonymous users) Static content generated by Drupal
  • 11. ● Caching HTTP reverse proxy ● Speeds up delivery with a factor of 300 - 1000x ● Varnish Configuration Language (VCL) ● Can be scaled into Varnish Cluster
  • 12. Backend - server which is providing the content Varnish will accelerate. Frontend - client facing Varnish server. Terms Backend Frontend
  • 13. vcl 4.0; backend default { .host = "127.0.0.1"; .port = "8080"; } sub vcl_recv { if (req.http.host == "www.example.com") { set req.backend_hint = default; } } See following VCL example for Drupal 8 and 7: https://www.varnish-software.com/wiki/content/tutorials/drupal/drupal_vcl.html Minimal Varnish VCL /etc/varnish/default.vcl
  • 14. now let’s talk about Kubernetes
  • 15. 1. You want to manage services you are running e.g. MySQL, Varnish, Redis, Apache Solr, Elasticsearch... 2. You want to have an ability to migrate from one cloud provider to another quickly. 3. You have on-premises infrastructure you need to utilize. 4. You want to use multicloud or hybrid-cloud approaches. 5. You want to have some of the cool features that Kubernetes provides. When using Kubernetes is a good idea
  • 16. 1. Scaling: runs more containers if needed. 2. Healing: restarts containers when they are down. 3. Deployment strategies: rolling updates, blue/green, canary... 4. Service discovery and load balancing: distributes access to containers by service name. 5. Security: secret management, security policies. 6. Storage orchestration: cloud, NFS, or storage providers. 7. Flexibility and extensibility: Go is widely used in k8s world. Things Kubernetes is good at
  • 17. ● Resource - endpoint in k8s API that stores a collection of certain kind. Declared using YAML syntax. Example: config map, secret, volume, volume claim, pod, deployment, stateful set, service, ingress, etc... ● Config map - stores software configuration that can be mounted as files or passed as env variables. ● Volume - used to preserve file system after container is restarted. ● Pod - k8s resource that represents running container (or set set of containers). Kubernetes resources Config map Pod Deployment Service Ingress Stateful Set Volume
  • 18. ● Deployment - ensures certain amount of pods are up and running. ● Stateful Set - acts as deployment for stateful services that have specific requirements to storage and pod identity. ● Service - provides a way to access deployments or stateful sets using different behaviours. Creates a common DNS record that can be used to access pods and does load balancing. ● Ingress - manages external access to services using various routing rules. Kubernetes resources Config map Pod Deployment Service Ingress Stateful Set Volume
  • 19. nginx-deployment.yaml: apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 2 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 Minimal Kubernetes deployment and service nginx-service.yaml: apiVersion: v1 kind: Service metadata: name: nginx-service spec: selector: app: nginx type: NodePort ports: - protocol: TCP port: 8080 targetPort: 80 nodePort: 30080
  • 20. 1. Apply deployment $ kubectl apply -f nginx-deployment.yaml 2. Check deployments $ kubectl get deployments NAME READY UP-TO-DATE AVAILABLE AGE nginx-deployment 0/2 0 0 1s 3. Check pods $ kubectl get pods --show-labels NAME READY STATUS RESTARTS AGE LABELS nginx-deployment-75675f5897-7ci7o 1/1 Running 0 18s app=nginx,pod-template-hash=3123191453 nginx-deployment-75675f5897-kzszj 1/1 Running 0 18s app=nginx,pod-template-hash=3123191453 Minimal Kubernetes deployment and service
  • 21. 4. Apply service $ kubectl apply -f nginx-service.yaml 5. Check services $ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 41d nginx-service NodePort 10.98.115.133 <none> 8080:30080/TCP 5m11s 6. Access nginx using node port $ curl localhost:30080 <!DOCTYPE html> <html> <head> <title>Welcome to nginx!</title> ... Minimal Kubernetes deployment and service
  • 23. To run Varnish in k8s we need to declare app deployment, app service, Varnish deployment, Varnish service, config maps and ingress. Example: https://github.com/dealancer/k8s-varnish-test. The simplest approach
  • 24. varnish-deployment.yaml: apiVersion: apps/v1 kind: Deployment metadata: name: varnish-deployment labels: app: varnish spec: replicas: 1 selector: matchLabels: app: varnish template: metadata: labels: app: varnish The simplest approach spec: containers: - name: varnish image: varnish:6.6.0 env: - name: CACHE_SIZE value: 128m - name: VCL_CONFIG value: /etc/varnish/configmap/default.vcl volumeMounts: - name: varnish-config mountPath: /etc/varnish/configmap ports: - containerPort: 80 volumes: - name: varnish-config configMap: name: varnish-configmap
  • 25. varnish-configmap.yaml: apiVersion: v1 kind: ConfigMap metadata: name: varnish-configmap labels: app: varnish data: default.vcl: | vcl 4.0; backend default { .host = "nginx-service"; .port = "8080"; } sub vcl_recv { set req.backend_hint = default; } The simplest approach varnish-service.yaml: apiVersion: v1 kind: Service metadata: name: varnish-service spec: selector: app: nginx type: NodePort ports: - protocol: TCP port: 80 targetPort: 80 nodePort: 30081
  • 26. Questions to this approach: 1. Can we eliminate App Service and let Varnish talk to application pods (backends) directly? 2. How do we scale Varnish pods (frontends)? 3. How do we shard cache across multiple Varnish pods? 4. How do we invalidate cache in multiple Varnish pods? The simplest approach
  • 27. kube-httpcache is an open Source Kubernetes controller written in Go to run Varnish cluster. It is a free solution comparing to Varnish Cache Plus, but it requires to configure Varnish in certain way using VCL. GitHub: https://github.com/mittwald/kube-httpcache. Features: ● Monitors backend (app) and frontend (Varnish) pods. ● Dynamically update Varnish VCL and reload it on the the fly in all Varnish pods. ● Supports Go-template syntax in VCL file. ● Sends cache invalidation requests to all Varnish pods using Signaller component. kube-httpcache
  • 28. spec: containers: - name: cache image: quay.io/mittwald/kube-httpcache:stable imagePullPolicy: Always args: - -admin-addr=0.0.0.0 - -admin-port=6083 - -signaller-enable - -signaller-port=8090 - -frontend-watch - -frontend-namespace=$(NAMESPACE) - -frontend-service=frontend-service - -backend-watch - -backend-namespace=$(NAMESPACE) - -backend-service=backend-service - -varnish-secret-file=/etc/varnish/k8s-secret/secret - -varnish-vcl-template=/etc/varnish/tmpl/default.vcl.tmpl - -varnish-storage=malloc,128M env: - name: NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace volumeMounts: - name: template mountPath: /etc/varnish/tmpl - name: secret mountPath: /etc/varnish/k8s-secret varnish-service.yaml (part)
  • 29. {{ range .Backends }} backend be-{{ .Name }} { .host = "{{ .Host }}"; .port = "{{ .Port }}"; } {{- end }} {{ range .Frontends }} backend {{ .Name }} { .host = "{{ .Host }}"; .port = "{{ .Port }}"; } {{- end }} sub vcl_init { new lb = directors.round_robin(); {{ range .Backends -}} lb.add_backend(be-{{ .Name }}); {{ end }} } sub vcl_recv { set req.backend_hint = lb.backend(); } Eliminate the need in backend service
  • 30. In this approach cache is sharded across multiple Varnish frontends. 1. Varnish Service routes requests to a random Varnish frontend. 2. A corresponding Varnish frontend (x-shard) determined based on the URL using hash director: a. http://example.com/foo -> frontend 1 b. http://example.com/bar -> frontend 2 c. http://example.com/bar2 -> frontend 1 3. If x-shard is not the current Varnish frontend, request is forwarded to x-shard. 4. Otherwise, request is handled by the current Varnish node: a. If request is cacheable and cache exist, cached content is returned. b. If cache does not exists, Varnish requests a backend to save cache and serve cached content. c. If request is cacheable request is routed to a backend. See https://info.varnish-software.com/blog/creating-self-routing-varnish-cluster Running Varnish cluster (sharded cache)
  • 31. sub vcl_init { # ... new cluster = directors.hash(); {{ range .Frontends -}} cluster.add_backend({{ .Name }}, 1); {{ end }} } sub vcl_recv { set req.backend_hint = lb.backend(); # ... unset req.http.x-cache; set req.backend_hint = cluster.backend(req.url); set req.http.x-shard = req.backend_hint; if (req.http.x-shard != server.identity) { return(pass); } set req.backend_hint = lb.backend(); # ... return(hash); } Running Varnish cluster (sharded cache)
  • 32. Problem In case if you horizontally scale your Varnish cluster, a hash director will recalculate hashes for existing URLs and will route requests to different Varnish frontends which do not store cached content for these URLs. Thus users will experience slowdown. Solution Consistent caching mechanism is provided by Varnish through shard director. Consistent caching represents URLs and frontends as points on the ring. Adding new frontend, simply adds a new point on the ring. Scaling Varnish cluster
  • 33. sub vcl_init { # ... new cluster = directors.shard(); {{ range .Frontends -}} cluster.add_backend({{ .Name }}); {{ end }} cluster.set_warmup(180); } sub vcl_recv { set req.backend_hint = lb.backend(); # ... unset req.http.x-cache; set req.backend_hint = cluster.backend(by=URL); set req.http.x-shard = req.backend_hint; if (req.http.x-shard != server.identity) { return(pass); } set req.backend_hint = lb.backend(); # ... return(hash); } Scaling Varnish cluster
  • 34. Varnish Signaller: ● Is aware of all Varnish frontends running ● acts similarly to Varnish Broadcaster (component of Varnish Plus) ● broadcasts flush cache request to all Varnish frontends ● runs on port 8090 BAN requests $ curl -H "X-Url: /path" -X BAN http://cache-service:8090 $ curl -H "Cache-Tags: node-1" -X BAN http://cache-service:8090 PURGE requests $ curl -H "X-Host: www.example.com" -X PURGE http://cache-service:8090/path Invalidating cache
  • 35. sub vcl_recv { # ... if (req.method == "PURGE") { if (client.ip !~ privileged) { return (synth(403, "Not allowed.")); } if (req.http.X-Host) { set req.http.host = req.http.X-Host; } return (purge); } if (req.method == "BAN") { if (client.ip !~ privileged) { return (synth(403, "Not allowed.")); } if (req.http.Cache-Tags) { ban("obj.http.Cache-Tags ~ " + req.http.Cache-Tags); return (synth(200, "Ban added " + req.http.host)); } if (req.http.X-Url) { ban("obj.http.X-Url == " + req.http.X-Url); return (synth(200, "Ban added " + req.http.host)); } return (synth(403, "Cache-Tags or X-Url header missing.")); } # ... } Invalidating cache
  • 36. 1. Kubernetes Playground https://www.katacoda.com/courses/kubernetes/playground 2. Kubernetes Patterns Book https://www.redhat.com/cms/managed-files/cm-oreilly-kubernetes-patterns-ebook-f19824-2 01910-en.pdf 3. Article this presentation is based on https://dealancer.medium.com/creating-a-scalable-and-resilient-varnish-cluster-using-kuber netes-853f03ec9731 4. kube-httpcache project https://github.com/mittwald/kube-httpcache 5. Complete VCL file for Drupal 8 and 9 (IMPORTANT) https://gist.github.com/dealancer/968297d6ddd93df80d012af7f4093294 Resources
  • 38. 1. Purge module - https://www.drupal.org/project/purge Clreans external caching systems, reverse proxies and CDNs 2. Varnish purger - https://www.drupal.org/project/varnish_purge Extension of Purge module to clear Varnish cache 3. Configuration URL: /admin/config/development/performance/purge Configuring Drupal