Varnish Software
Marius Magureanu
software developer
marius@varni-sh.com
Microservice
instrumentation with
Varnish
Life after APIs…
How about
Microservices?
Microservices (1/2)
• Application pattern used for the last couple
of years
• Reduces complexity by having small (micro)
services that are relatively simple
• Distributed application
Microservices (2/2)
• Increase development velocity
• Problem: Massive increase in the number of
HTTP calls
zoo
baz
bar
foo
service
directory
Varnish in a
microservice
architecture
quu
zoo
baz
bar
foo
varnish
Gains
• Centralise caching and invalidation
• Allows for stateless micro-services
• Add resiliency and monitoring
Profiling micro-services
is hard
title_lu
page_comp
artd autho
corr
30ms
10ms
55ms
40m
s
98ms
Changes needed
• Add the parent ID of call to the response

• Any annotations that should be added as
well

• ModifyVCL to add parent ID of cached
responses
GET /baz HTTP/1.1
Host: api.acme.com

Apikey:

Trace-id: 6382

Span: 6731

Parent-Span: 6636

3e707fd1d239b3978d45
https://github.com/varnish/zipnish
Thanks

Microservices 2.0