SlideShare a Scribd company logo
Varnish
Debugging
Martin Blix Grydeland
Senior Developer
WHO AM I?
VCL debugging
VCL debugging
● Code not reached, wrong logic or expectations
● varnishlog is the answer
● varnishncsa is not
varnishlog
$ varnishlog -g request
- Begin req 459063 rxreq
- Timestamp Start: 1474493939.499338 0.000000 0.000000
- Timestamp Req: 1474493939.499338 0.000000 0.000000
- ReqStart 1.2.3.4 38780
- ReqMethod GET
- ReqURL /
- ReqProtocol HTTP/1.1
- ReqHeader Host: example.com
- ReqHeader Accept: */*
- ReqHeader Accept-Encoding: gzip
- ReqHeader User-Agent: Mozilla/5.0 (X11; Linux x86_64) ...
- ReqHeader Connection: close
- ReqHeader X-Forwarded-For: 1.2.3.4
- VCL_call RECV
- VCL_return hash
- VCL_call HASH
- VCL_return lookup
- VCL_call MISS
...
varnishlog examples
● [5-9]xx responses:
o varnishlog -q 'RespStatus >= 500'
● Misses:
o varnishlog -q 'VCL_call ~ MISS'
● Timing details:
o varnishlog -i Timestamp
● Requests taking more than 5 seconds:
Transactions
Session
Request
Request BeReq
ESI-SubReq
BeReq
-g <session|request|vxid|raw>
The grouping of the log
records.
The default is to group by vxid.
Debugging with varnishlog
● man vsl
● printf debugging (std.log / std.syslog)
● Enable tracing (param.set vsl_mask +VCL_trace)
● Reproduce with varnishtest
Timestamps
Timestamp - Timing information
Contains timing information for the Varnish worker threads.
The format is:
%s: %f %f %f
| | | |
| | | +- Time since last timestamp
| | +---- Time since start of work unit
| +------- Absolute time of event
+----------- Event label
Timestamped events
Requests:
Start The start of request processing (first byte received or restart).
Req Complete client request received.
ReqBody Client request body processed (discarded, cached or passed to the backend).
Waitinglist Came off waitinglist.
Fetch Fetch processing finished (completely fetched or ready for streaming).
Process Processing finished, ready to deliver the client response.
Resp Delivery of response to the client finished.
Restart Client request is being restarted.
Backend requests:
Start Start of the backend fetch processing.
Bereq Backend request sent.
Beresp Backend response headers received.
BerespBody Backend response body received.
Retry Backend request is being retried.
Error Backend request failed to vcl_backend_error.
varnishtest - example
varnishtest "Hello world"
server s1 {
rxreq
expect req.http.msg == "hello"
txresp -body "world"
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
set req.http.msg = "hello";
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.body == "world"
} -run
[vagrant@centos-7-amd64 ~]$ varnishtest -v example.vtc
…
**** s1 0.4 EXPECT req.http.msg (hello) == "hello" match
…
*** c1 0.4 expect
**** c1 0.4 EXPECT resp.status (200) == "200" match
*** c1 0.4 expect
**** c1 0.4 EXPECT resp.body (world) == "world" match
…
# top TEST example.vtc passed (1.494)
support@
https://github.com/varnish/varnishgather
● Reduce round trip time
● Versions
● varnishlog
● varnishstat
● VCL
● varnishadm panic.show
● syslog
DON'T PANIC
Stability
● Crash, panic or something else
● Check varnishadm panic.show and syslog
● File a bug or get your hands dirty
Getting your hands dirty
● Not for the faint of heart
● The panic dump
● Install debugging symbols and allow coredumps
● thread apply all bt full
● My approach: backtracking
○ Defensive programming
THE END

More Related Content

What's hot

Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006
Martin Kobetic
 
NginX - good practices, tips and advanced techniques
NginX - good practices, tips and advanced techniquesNginX - good practices, tips and advanced techniques
NginX - good practices, tips and advanced techniques
Claudio Borges
 
Kubernetes at Datadog Scale
Kubernetes at Datadog ScaleKubernetes at Datadog Scale
Kubernetes at Datadog Scale
Docker, Inc.
 
Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)
Eran Harel
 
Benchmarking for HTTP/2
Benchmarking for HTTP/2Benchmarking for HTTP/2
Benchmarking for HTTP/2
Kit Chan
 
Network Programming With Anyevent
Network Programming With AnyeventNetwork Programming With Anyevent
Network Programming With Anyevent
Pedro Melo
 
Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
Wataru OKAMOTO
 
Perl Instruments
Perl InstrumentsPerl Instruments
Perl Instruments
Pedro Melo
 
Trevor McDonald - Nagios XI Under The Hood
Trevor McDonald  - Nagios XI Under The HoodTrevor McDonald  - Nagios XI Under The Hood
Trevor McDonald - Nagios XI Under The Hood
Nagios
 
Chap 19 web
Chap 19 webChap 19 web
Chap 19 web
Kenny (netman)
 
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Develcz
 
Nessus scan report using microsoft patchs scan policy - Tareq Hanaysha
Nessus scan report using microsoft patchs scan policy - Tareq HanayshaNessus scan report using microsoft patchs scan policy - Tareq Hanaysha
Nessus scan report using microsoft patchs scan policy - Tareq Hanaysha
Hanaysha
 
Nmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumerationNmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumeration
Robert Rowley
 
17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]Krisman Tarigan
 
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
NoNameCon
 
Janice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios PluginsJanice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios Plugins
Nagios
 
Importance of linux system fundamental in technical documentation reading
Importance of linux system fundamental in technical documentation readingImportance of linux system fundamental in technical documentation reading
Importance of linux system fundamental in technical documentation reading
Kenny (netman)
 
OSMC 2014: Monitoring VoIP Systems | Sebastian Damm
OSMC 2014: Monitoring VoIP Systems | Sebastian DammOSMC 2014: Monitoring VoIP Systems | Sebastian Damm
OSMC 2014: Monitoring VoIP Systems | Sebastian Damm
NETWAYS
 
Varnish SSL / TLS
Varnish SSL / TLSVarnish SSL / TLS
Varnish SSL / TLS
Varnish Software
 

What's hot (20)

Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006
 
T.Pollak y C.Yaconi - Prey
T.Pollak y C.Yaconi - PreyT.Pollak y C.Yaconi - Prey
T.Pollak y C.Yaconi - Prey
 
NginX - good practices, tips and advanced techniques
NginX - good practices, tips and advanced techniquesNginX - good practices, tips and advanced techniques
NginX - good practices, tips and advanced techniques
 
Kubernetes at Datadog Scale
Kubernetes at Datadog ScaleKubernetes at Datadog Scale
Kubernetes at Datadog Scale
 
Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)
 
Benchmarking for HTTP/2
Benchmarking for HTTP/2Benchmarking for HTTP/2
Benchmarking for HTTP/2
 
Network Programming With Anyevent
Network Programming With AnyeventNetwork Programming With Anyevent
Network Programming With Anyevent
 
Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
 
Perl Instruments
Perl InstrumentsPerl Instruments
Perl Instruments
 
Trevor McDonald - Nagios XI Under The Hood
Trevor McDonald  - Nagios XI Under The HoodTrevor McDonald  - Nagios XI Under The Hood
Trevor McDonald - Nagios XI Under The Hood
 
Chap 19 web
Chap 19 webChap 19 web
Chap 19 web
 
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
Ondřej Šika: Docker, Traefik a CI - Mějte nasazené všeny větve na kterých pra...
 
Nessus scan report using microsoft patchs scan policy - Tareq Hanaysha
Nessus scan report using microsoft patchs scan policy - Tareq HanayshaNessus scan report using microsoft patchs scan policy - Tareq Hanaysha
Nessus scan report using microsoft patchs scan policy - Tareq Hanaysha
 
Nmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumerationNmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumeration
 
17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]
 
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van...
 
Janice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios PluginsJanice Singh - Writing Custom Nagios Plugins
Janice Singh - Writing Custom Nagios Plugins
 
Importance of linux system fundamental in technical documentation reading
Importance of linux system fundamental in technical documentation readingImportance of linux system fundamental in technical documentation reading
Importance of linux system fundamental in technical documentation reading
 
OSMC 2014: Monitoring VoIP Systems | Sebastian Damm
OSMC 2014: Monitoring VoIP Systems | Sebastian DammOSMC 2014: Monitoring VoIP Systems | Sebastian Damm
OSMC 2014: Monitoring VoIP Systems | Sebastian Damm
 
Varnish SSL / TLS
Varnish SSL / TLSVarnish SSL / TLS
Varnish SSL / TLS
 

Viewers also liked

E-commerce use case
E-commerce use caseE-commerce use case
E-commerce use case
Varnish Software
 
Lightning fast with Varnish
Lightning fast with VarnishLightning fast with Varnish
Lightning fast with Varnish
Varnish Software
 
A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...
A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...
A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...
CSCJournals
 
Varnish TLS
Varnish TLSVarnish TLS
Varnish TLS
Varnish Software
 
Varnish cache en ocho pasos
Varnish cache en ocho pasosVarnish cache en ocho pasos
Varnish cache en ocho pasos
Varnish Software
 
انظمه التحكم ف الابواب
انظمه التحكم ف الابواب انظمه التحكم ف الابواب
انظمه التحكم ف الابواب
Manal Zain
 
VCL - the logic and logistics
VCL - the logic and logisticsVCL - the logic and logistics
VCL - the logic and logistics
Varnish Software
 
Weather
WeatherWeather
MSE
MSEMSE
De idea a implementación con Varnish Plus
De idea a implementación con Varnish PlusDe idea a implementación con Varnish Plus
De idea a implementación con Varnish Plus
Varnish Software
 
Secretarias, la mano derecha del poder.
Secretarias, la mano derecha del poder.Secretarias, la mano derecha del poder.
Secretarias, la mano derecha del poder.Gill Johnson
 
De idea a implementación con Varnish Plus
De idea a implementación con Varnish PlusDe idea a implementación con Varnish Plus
De idea a implementación con Varnish Plus
Carlos Abalde
 
Նոր Տարին և Սուրբ Ծնունդը Ընտանիքով
Նոր Տարին և Սուրբ Ծնունդը ԸնտանիքովՆոր Տարին և Սուրբ Ծնունդը Ընտանիքով
Նոր Տարին և Սուրբ Ծնունդը Ընտանիքով
Mark Hovsepyan
 
Access control
Access controlAccess control
Access control
Varnish Software
 
VCL - the logic and logistics
VCL - the logic and logisticsVCL - the logic and logistics
VCL - the logic and logistics
Varnish Software
 
Multi skilling Electriacl
Multi skilling ElectriaclMulti skilling Electriacl
Multi skilling ElectriaclMark Dugan
 
Secure content caching
Secure content cachingSecure content caching
Secure content caching
Varnish Software
 
Using PatSeer to search and analyze patents in Switchgear Technology
Using PatSeer to search and analyze patents in Switchgear TechnologyUsing PatSeer to search and analyze patents in Switchgear Technology
Using PatSeer to search and analyze patents in Switchgear Technology
Gridlogics
 

Viewers also liked (20)

E-commerce use case
E-commerce use caseE-commerce use case
E-commerce use case
 
Lightning fast with Varnish
Lightning fast with VarnishLightning fast with Varnish
Lightning fast with Varnish
 
A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...
A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...
A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...
 
Varnish TLS
Varnish TLSVarnish TLS
Varnish TLS
 
Varnish cache en ocho pasos
Varnish cache en ocho pasosVarnish cache en ocho pasos
Varnish cache en ocho pasos
 
انظمه التحكم ف الابواب
انظمه التحكم ف الابواب انظمه التحكم ف الابواب
انظمه التحكم ف الابواب
 
VCL - the logic and logistics
VCL - the logic and logisticsVCL - the logic and logistics
VCL - the logic and logistics
 
Weather
WeatherWeather
Weather
 
MSE
MSEMSE
MSE
 
3582_0001
3582_00013582_0001
3582_0001
 
De idea a implementación con Varnish Plus
De idea a implementación con Varnish PlusDe idea a implementación con Varnish Plus
De idea a implementación con Varnish Plus
 
Secretarias, la mano derecha del poder.
Secretarias, la mano derecha del poder.Secretarias, la mano derecha del poder.
Secretarias, la mano derecha del poder.
 
SCOPE Certificate
SCOPE CertificateSCOPE Certificate
SCOPE Certificate
 
De idea a implementación con Varnish Plus
De idea a implementación con Varnish PlusDe idea a implementación con Varnish Plus
De idea a implementación con Varnish Plus
 
Նոր Տարին և Սուրբ Ծնունդը Ընտանիքով
Նոր Տարին և Սուրբ Ծնունդը ԸնտանիքովՆոր Տարին և Սուրբ Ծնունդը Ընտանիքով
Նոր Տարին և Սուրբ Ծնունդը Ընտանիքով
 
Access control
Access controlAccess control
Access control
 
VCL - the logic and logistics
VCL - the logic and logisticsVCL - the logic and logistics
VCL - the logic and logistics
 
Multi skilling Electriacl
Multi skilling ElectriaclMulti skilling Electriacl
Multi skilling Electriacl
 
Secure content caching
Secure content cachingSecure content caching
Secure content caching
 
Using PatSeer to search and analyze patents in Switchgear Technology
Using PatSeer to search and analyze patents in Switchgear TechnologyUsing PatSeer to search and analyze patents in Switchgear Technology
Using PatSeer to search and analyze patents in Switchgear Technology
 

Similar to Debugging varnish

Debugging your varnish instance
Debugging your varnish instanceDebugging your varnish instance
Debugging your varnish instance
Varnish Software
 
HTTP logging met Varnishlog - PHPWVL 2022
HTTP logging met Varnishlog - PHPWVL 2022HTTP logging met Varnishlog - PHPWVL 2022
HTTP logging met Varnishlog - PHPWVL 2022
Thijs Feryn
 
Varnish @ Velocity Ignite
Varnish @ Velocity IgniteVarnish @ Velocity Ignite
Varnish @ Velocity IgniteArtur Bergman
 
Varnish presentation for the Symfony Zaragoza user group
Varnish presentation for the Symfony Zaragoza user groupVarnish presentation for the Symfony Zaragoza user group
Varnish presentation for the Symfony Zaragoza user group
Jorge Nerín
 
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in OsloVarnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Per Buer
 
PHP London Dec 2013 - Varnish - The 9 circles of hell
PHP London Dec 2013 - Varnish - The 9 circles of hellPHP London Dec 2013 - Varnish - The 9 circles of hell
PHP London Dec 2013 - Varnish - The 9 circles of hell
luis-ferro
 
Supercharging Content Delivery with Varnish
Supercharging Content Delivery with VarnishSupercharging Content Delivery with Varnish
Supercharging Content Delivery with Varnish
Samantha Quiñones
 
Varnish Cache
Varnish CacheVarnish Cache
Varnish Cache
Mahbub E Elahi (Ron)
 
Varnish
VarnishVarnish
Varnish
Shaopeng He
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
Łukasz Jagiełło
 
Nginx internals
Nginx internalsNginx internals
Nginx internalsliqiang xu
 
Varnish qconsp 2011
Varnish qconsp 2011Varnish qconsp 2011
Varnish qconsp 2011
Flavio Torres
 
Learn nginx in 90mins
Learn nginx in 90minsLearn nginx in 90mins
Learn nginx in 90mins
Larry Cai
 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera Software
Cosimo Streppone
 
Apache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and TomcatApache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and Tomcat
Jean-Frederic Clere
 
Go 1.8 'new' networking features
Go 1.8 'new' networking featuresGo 1.8 'new' networking features
Go 1.8 'new' networking features
strikr .
 
Ubic-public
Ubic-publicUbic-public
Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101
Fastly
 
Nginx
NginxNginx

Similar to Debugging varnish (20)

Debugging your varnish instance
Debugging your varnish instanceDebugging your varnish instance
Debugging your varnish instance
 
HTTP logging met Varnishlog - PHPWVL 2022
HTTP logging met Varnishlog - PHPWVL 2022HTTP logging met Varnishlog - PHPWVL 2022
HTTP logging met Varnishlog - PHPWVL 2022
 
Varnish @ Velocity Ignite
Varnish @ Velocity IgniteVarnish @ Velocity Ignite
Varnish @ Velocity Ignite
 
Varnish presentation for the Symfony Zaragoza user group
Varnish presentation for the Symfony Zaragoza user groupVarnish presentation for the Symfony Zaragoza user group
Varnish presentation for the Symfony Zaragoza user group
 
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in OsloVarnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
 
PHP London Dec 2013 - Varnish - The 9 circles of hell
PHP London Dec 2013 - Varnish - The 9 circles of hellPHP London Dec 2013 - Varnish - The 9 circles of hell
PHP London Dec 2013 - Varnish - The 9 circles of hell
 
Supercharging Content Delivery with Varnish
Supercharging Content Delivery with VarnishSupercharging Content Delivery with Varnish
Supercharging Content Delivery with Varnish
 
Varnish Cache
Varnish CacheVarnish Cache
Varnish Cache
 
Varnish
VarnishVarnish
Varnish
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
Nginx internals
Nginx internalsNginx internals
Nginx internals
 
Varnish qconsp 2011
Varnish qconsp 2011Varnish qconsp 2011
Varnish qconsp 2011
 
Learn nginx in 90mins
Learn nginx in 90minsLearn nginx in 90mins
Learn nginx in 90mins
 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera Software
 
Apache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and TomcatApache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and Tomcat
 
Go 1.8 'new' networking features
Go 1.8 'new' networking featuresGo 1.8 'new' networking features
Go 1.8 'new' networking features
 
Ubic
UbicUbic
Ubic
 
Ubic-public
Ubic-publicUbic-public
Ubic-public
 
Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101
 
Nginx
NginxNginx
Nginx
 

More from Varnish Software

Ask Me Anything on authentication & authorisation in Varnish
Ask Me Anything on authentication & authorisation in VarnishAsk Me Anything on authentication & authorisation in Varnish
Ask Me Anything on authentication & authorisation in Varnish
Varnish Software
 
Boozt.com Use Case
Boozt.com Use CaseBoozt.com Use Case
Boozt.com Use Case
Varnish Software
 
Akamai connector for varnish
Akamai connector for varnishAkamai connector for varnish
Akamai connector for varnish
Varnish Software
 
Varnish High Availability
Varnish High AvailabilityVarnish High Availability
Varnish High Availability
Varnish Software
 
PostNord: Copy On Write
PostNord: Copy On WritePostNord: Copy On Write
PostNord: Copy On Write
Varnish Software
 
Varnish extend
Varnish extendVarnish extend
Varnish extend
Varnish Software
 
Streaming with Varnish
Streaming with VarnishStreaming with Varnish
Streaming with Varnish
Varnish Software
 
Edgestash
EdgestashEdgestash
Edgestash
Varnish Software
 
What is new in varnish plus
What is new in varnish plusWhat is new in varnish plus
What is new in varnish plus
Varnish Software
 
Varnish Extend demo
Varnish Extend demoVarnish Extend demo
Varnish Extend demo
Varnish Software
 
Varnish extend introduction
Varnish extend introductionVarnish extend introduction
Varnish extend introduction
Varnish Software
 
Cedexis introduction
Cedexis introductionCedexis introduction
Cedexis introduction
Varnish Software
 
Microservices
MicroservicesMicroservices
Microservices
Varnish Software
 
Varnishtest
VarnishtestVarnishtest
Varnishtest
Varnish Software
 
Varnish plus con paywall avanzado en la voz de galicia
Varnish plus con paywall avanzado en la voz de galiciaVarnish plus con paywall avanzado en la voz de galicia
Varnish plus con paywall avanzado en la voz de galicia
Varnish Software
 
Detalles técnicos e impacto de negocio de varnish plus
Detalles técnicos e impacto de negocio de varnish plusDetalles técnicos e impacto de negocio de varnish plus
Detalles técnicos e impacto de negocio de varnish plus
Varnish Software
 
Debugging forensics
Debugging forensicsDebugging forensics
Debugging forensics
Varnish Software
 
SFR use case
SFR use caseSFR use case
SFR use case
Varnish Software
 
Kering use case
Kering use caseKering use case
Kering use case
Varnish Software
 
Handelsbanken use case
Handelsbanken use caseHandelsbanken use case
Handelsbanken use case
Varnish Software
 

More from Varnish Software (20)

Ask Me Anything on authentication & authorisation in Varnish
Ask Me Anything on authentication & authorisation in VarnishAsk Me Anything on authentication & authorisation in Varnish
Ask Me Anything on authentication & authorisation in Varnish
 
Boozt.com Use Case
Boozt.com Use CaseBoozt.com Use Case
Boozt.com Use Case
 
Akamai connector for varnish
Akamai connector for varnishAkamai connector for varnish
Akamai connector for varnish
 
Varnish High Availability
Varnish High AvailabilityVarnish High Availability
Varnish High Availability
 
PostNord: Copy On Write
PostNord: Copy On WritePostNord: Copy On Write
PostNord: Copy On Write
 
Varnish extend
Varnish extendVarnish extend
Varnish extend
 
Streaming with Varnish
Streaming with VarnishStreaming with Varnish
Streaming with Varnish
 
Edgestash
EdgestashEdgestash
Edgestash
 
What is new in varnish plus
What is new in varnish plusWhat is new in varnish plus
What is new in varnish plus
 
Varnish Extend demo
Varnish Extend demoVarnish Extend demo
Varnish Extend demo
 
Varnish extend introduction
Varnish extend introductionVarnish extend introduction
Varnish extend introduction
 
Cedexis introduction
Cedexis introductionCedexis introduction
Cedexis introduction
 
Microservices
MicroservicesMicroservices
Microservices
 
Varnishtest
VarnishtestVarnishtest
Varnishtest
 
Varnish plus con paywall avanzado en la voz de galicia
Varnish plus con paywall avanzado en la voz de galiciaVarnish plus con paywall avanzado en la voz de galicia
Varnish plus con paywall avanzado en la voz de galicia
 
Detalles técnicos e impacto de negocio de varnish plus
Detalles técnicos e impacto de negocio de varnish plusDetalles técnicos e impacto de negocio de varnish plus
Detalles técnicos e impacto de negocio de varnish plus
 
Debugging forensics
Debugging forensicsDebugging forensics
Debugging forensics
 
SFR use case
SFR use caseSFR use case
SFR use case
 
Kering use case
Kering use caseKering use case
Kering use case
 
Handelsbanken use case
Handelsbanken use caseHandelsbanken use case
Handelsbanken use case
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 

Debugging varnish

  • 1.
  • 3. Martin Blix Grydeland Senior Developer WHO AM I?
  • 5. VCL debugging ● Code not reached, wrong logic or expectations ● varnishlog is the answer ● varnishncsa is not
  • 6. varnishlog $ varnishlog -g request - Begin req 459063 rxreq - Timestamp Start: 1474493939.499338 0.000000 0.000000 - Timestamp Req: 1474493939.499338 0.000000 0.000000 - ReqStart 1.2.3.4 38780 - ReqMethod GET - ReqURL / - ReqProtocol HTTP/1.1 - ReqHeader Host: example.com - ReqHeader Accept: */* - ReqHeader Accept-Encoding: gzip - ReqHeader User-Agent: Mozilla/5.0 (X11; Linux x86_64) ... - ReqHeader Connection: close - ReqHeader X-Forwarded-For: 1.2.3.4 - VCL_call RECV - VCL_return hash - VCL_call HASH - VCL_return lookup - VCL_call MISS ...
  • 7. varnishlog examples ● [5-9]xx responses: o varnishlog -q 'RespStatus >= 500' ● Misses: o varnishlog -q 'VCL_call ~ MISS' ● Timing details: o varnishlog -i Timestamp ● Requests taking more than 5 seconds:
  • 8. Transactions Session Request Request BeReq ESI-SubReq BeReq -g <session|request|vxid|raw> The grouping of the log records. The default is to group by vxid.
  • 9. Debugging with varnishlog ● man vsl ● printf debugging (std.log / std.syslog) ● Enable tracing (param.set vsl_mask +VCL_trace) ● Reproduce with varnishtest
  • 10. Timestamps Timestamp - Timing information Contains timing information for the Varnish worker threads. The format is: %s: %f %f %f | | | | | | | +- Time since last timestamp | | +---- Time since start of work unit | +------- Absolute time of event +----------- Event label
  • 11. Timestamped events Requests: Start The start of request processing (first byte received or restart). Req Complete client request received. ReqBody Client request body processed (discarded, cached or passed to the backend). Waitinglist Came off waitinglist. Fetch Fetch processing finished (completely fetched or ready for streaming). Process Processing finished, ready to deliver the client response. Resp Delivery of response to the client finished. Restart Client request is being restarted. Backend requests: Start Start of the backend fetch processing. Bereq Backend request sent. Beresp Backend response headers received. BerespBody Backend response body received. Retry Backend request is being retried. Error Backend request failed to vcl_backend_error.
  • 12. varnishtest - example varnishtest "Hello world" server s1 { rxreq expect req.http.msg == "hello" txresp -body "world" } -start varnish v1 -vcl+backend { sub vcl_recv { set req.http.msg = "hello"; } } -start client c1 { txreq rxresp expect resp.status == 200 expect resp.body == "world" } -run [vagrant@centos-7-amd64 ~]$ varnishtest -v example.vtc … **** s1 0.4 EXPECT req.http.msg (hello) == "hello" match … *** c1 0.4 expect **** c1 0.4 EXPECT resp.status (200) == "200" match *** c1 0.4 expect **** c1 0.4 EXPECT resp.body (world) == "world" match … # top TEST example.vtc passed (1.494)
  • 14. https://github.com/varnish/varnishgather ● Reduce round trip time ● Versions ● varnishlog ● varnishstat ● VCL ● varnishadm panic.show ● syslog
  • 16. Stability ● Crash, panic or something else ● Check varnishadm panic.show and syslog ● File a bug or get your hands dirty
  • 17. Getting your hands dirty ● Not for the faint of heart ● The panic dump ● Install debugging symbols and allow coredumps ● thread apply all bt full ● My approach: backtracking ○ Defensive programming