SlideShare a Scribd company logo
Submit Search
Upload
Login
Signup
Lost in Translation:varnishlog, varnishtest(VUG7)
Report
Iwana Chan
Follow
Software and Infrastructure Engineer at (:3[__])
Jun. 5, 2013
•
0 likes
•
4,158 views
1
of
33
Lost in Translation:varnishlog, varnishtest(VUG7)
Jun. 5, 2013
•
0 likes
•
4,158 views
Report
Iwana Chan
Follow
Software and Infrastructure Engineer at (:3[__])
Recommended
Varnish 4.0 Release Party in Tokyo発表資料
Iwana Chan
9.5K views
•
72 slides
VarnishではじめるESI
Iwana Chan
11.4K views
•
28 slides
Google ARが提供する WebAR 101
Hirokazu Egashira
820 views
•
74 slides
Apache httpd 2.4: The Cloud Killer App
Jim Jagielski
5.7K views
•
46 slides
Securing Containers - Sathyajit Bhat - Adobe - Container Conference 18
CodeOps Technologies LLP
13.1K views
•
27 slides
ApacheCon 2014 - What's New in Apache httpd 2.4
Jim Jagielski
1.2K views
•
30 slides
More Related Content
Similar to Lost in Translation:varnishlog, varnishtest(VUG7)
Container Security
Amazon Web Services
552 views
•
36 slides
Online spanish meetup #2
Alexandra N. Martinez
423 views
•
99 slides
What's New and Newer in Apache httpd-24
Jim Jagielski
1.1K views
•
36 slides
T5 Oli Aro
Javier Toledo
204 views
•
24 slides
Lessons Learned in Automating Compliance for Containers
All Things Open
396 views
•
55 slides
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...
DevOpsDays Tel Aviv
160 views
•
29 slides
Similar to Lost in Translation:varnishlog, varnishtest(VUG7)
(20)
Container Security
Amazon Web Services
•
552 views
Online spanish meetup #2
Alexandra N. Martinez
•
423 views
What's New and Newer in Apache httpd-24
Jim Jagielski
•
1.1K views
T5 Oli Aro
Javier Toledo
•
204 views
Lessons Learned in Automating Compliance for Containers
All Things Open
•
396 views
What does Serverless mean for tomorrow’s abstracted infrastructure? - Gadi Na...
DevOpsDays Tel Aviv
•
160 views
Apache HTTPD 2.4 Reverse Proxy: The Hidden Gem
Jim Jagielski
•
13.1K views
Building Secure Services using Containers
Amazon Web Services
•
505 views
Webrtc plugins for Desktop Browsers
Alexandre Gouaillard
•
2.1K views
Advanced Container Security - AWS Summit Sydney 2018
Amazon Web Services
•
837 views
AWS에서 Kubernetes 실전 활용하기::유병우::AWS Summit Seoul 2018
Amazon Web Services Korea
•
3.3K views
Dark side of the reflect
sairoutine
•
12.1K views
Qualcomm Snapdragon Processors: A Super Gaming Platform
Qualcomm Developer Network
•
2.5K views
UplinQ - qualcomm® snapdragon™ processors a super gaming platform
Satya Harish
•
325 views
Java script anywhere. What Nombas was doing pre-acquisition.
Brent Noorda
•
1.7K views
Safe peak installation guide version 2.1
Vladi Vexler
•
1K views
Asynchronous architecture (Node.js & Vert.x)
Yu Kwangjong
•
1.6K views
Apache httpd 2.4 Reverse Proxy: The Hidden Gem
Jim Jagielski
•
943 views
Geode is Not a Cache, it's an Analytics Engine
VMware Tanzu
•
225 views
VUG5: Varnish at Opera Software
Cosimo Streppone
•
2.5K views
More from Iwana Chan
Varnish Cache inline-C/VMOD guidebook
Iwana Chan
2.9K views
•
46 slides
社内勉強会資料(Varnish Module)
Iwana Chan
7K views
•
35 slides
VarnishCache入門Rev2.1
Iwana Chan
7.8K views
•
66 slides
tokyo.vcl発表資料(VarnishCache3.0新機能とVUPの仕方)
Iwana Chan
3.4K views
•
36 slides
Varnishのログの眺め方
Iwana Chan
4.7K views
•
16 slides
できる!Varnish ~もう一歩踏み出すためのTips~
Iwana Chan
2.7K views
•
14 slides
More from Iwana Chan
(7)
Varnish Cache inline-C/VMOD guidebook
Iwana Chan
•
2.9K views
社内勉強会資料(Varnish Module)
Iwana Chan
•
7K views
VarnishCache入門Rev2.1
Iwana Chan
•
7.8K views
tokyo.vcl発表資料(VarnishCache3.0新機能とVUPの仕方)
Iwana Chan
•
3.4K views
Varnishのログの眺め方
Iwana Chan
•
4.7K views
できる!Varnish ~もう一歩踏み出すためのTips~
Iwana Chan
•
2.7K views
画像キャッシュだけじゃないVarnish(qpstudy02 飛び入りLT)
Iwana Chan
•
1.7K views
Lost in Translation:varnishlog, varnishtest(VUG7)
1.
Copyright © GREE,
Inc. All Rights Reserved.Copyright © GREE, Inc. All Rights Reserved. Lost in Translation: varnishlog, varnishtest ~The Story of a Successful Migration~ GREE, inc. Shohei Tanaka Varnish User Group Meeting 7 Friday, May 31st 2013
2.
Copyright © GREE,
Inc. All Rights Reserved. Who am I Shohei Tanaka (@xcir) - Call me iwana-chan - GREE, inc. - Joined 2013/01~ - Tokyo, Japan - Activities at varnish project - VMOD author - ldap, redirect, parsereq, awsrest and more.. - Wrote Japanese Varnish guidebook - Other - blog http://blog.xcir.net/ - github http://github.com/xcir/
3.
Copyright © GREE,
Inc. All Rights Reserved. Migration from legacy system Finished without any downtime - Platform downtime was not an option - Domain / backend has more than a hundred columns - Very high - Traffic - Connection/sec - Request/sec - Many target device types - PC - Smartphone - Mobile phone (No support for keep-alive)
4.
Copyright © GREE,
Inc. All Rights Reserved. New system Server layout - 3 layer model - Use Hash director - Objects won't be duplicated across L2 pool - ImageOperation - Apache + Varnish - Create thumbs - mod_small_light - Generate barcode(QR) - GREE original
5.
Copyright © GREE,
Inc. All Rights Reserved. New system VCL layout - Common settings - Same for all server roles - Security, ACL, Normalize.... - Individual server role settings - Backend, Rewrite... - Divide action by - Type (categorized domain) - Domain (can't categorize)
6.
Copyright © GREE,
Inc. All Rights Reserved. Why Varnish? GREE had never used it - VCL - Very powerful DSL - Fits into existing system - Healthcheck - Varnishtest - Can define the behavior of the server, client, varnish. - Useful tools - varnishncsa and varnishlog are very useful - libvarnishapi can connect to VSL easily - And I love Varnish ;-)
7.
Copyright © GREE,
Inc. All Rights Reserved. Testing, Testing, Testing! We used varnishtest - Different package for common and server roles - Unit tests for common settings - Integration tests for common + server role
8.
Copyright © GREE,
Inc. All Rights Reserved. varnishtest(failed log) I love it, but it's difficult to read
9.
Copyright © GREE,
Inc. All Rights Reserved. varnishtest(failed log) I love it, but it's difficult to read
10.
Copyright © GREE,
Inc. All Rights Reserved. vtctrans.py Human readable ;) - Sort by - Event - Error output - Header and expected result - Macro define https://github.com/xcir/vtctrans
11.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Event varnishtest vtctrans
12.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Event varnishtest vtctrans
13.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Macro list varnishtest vtctrans
14.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Macro list varnishtest vtctrans
15.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Header and expected result vtctrans varnishtest
16.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Header and expected result vtctrans varnishtest
17.
Copyright © GREE,
Inc. All Rights Reserved. Performance tuning Measure, don't guess - Nevertheless, capacity planning is important :) - runtime parameters - server specs, placement - fault tolerance (keep service up even when a rack fails) - Measure with production servers, it's the most important thing - Useful commands - varnishncsa -m "txstatus:^[45]" - varnishstat - varnishhist -m "rxheader:Host: foo" - varnishlog -m "rxurl:/foo/bar" - Used varnishncsa and varnishlog alot
18.
Copyright © GREE,
Inc. All Rights Reserved. varnishlog ugly
19.
Copyright © GREE,
Inc. All Rights Reserved. vsltrans.py(old:vltrans.php) beautiful! - Sort by - Error output - VCL action - variable - hash and vary - can use multiple -m option https://github.com/xcir/vsltrans
20.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot General, Error, Hash, Vary info vsltrans and more... varnishlog
21.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot General, Error, Hash, Vary info vsltrans and more... varnishlog
22.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Action vsltrans varnishlog
23.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Action vsltrans varnishlog
24.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Variable vsltrans varnishlog
25.
Copyright © GREE,
Inc. All Rights Reserved. Screenshot Variable vsltrans varnishlog
26.
Copyright © GREE,
Inc. All Rights Reserved. More measurements - By different host - Cache hit rate - Transfer size per sec - Request per sec - By directory (specify depth) - Cache hit rate - Transfer size per sec - Request per sec - And more...
27.
Copyright © GREE,
Inc. All Rights Reserved. Why do we need a detailed measurements? - Hit rate is summarized by default - Different costs for different objects - Dynamic object: high cost - Static object: low cost - It's necessary to separate results by object cost - Need to consider system cost instead of just Varnish hit rate - However you cannot do this with just the default commands That's where libvarnishapi comes in
28.
Copyright © GREE,
Inc. All Rights Reserved. libvarnishapi.so - VSL access is easy with libvarnishapi - uses varnishlog, varnishncsa - Used Python ctypes and it proved to be very simple to use - Sample code https://github.com/xcir/python-varnishapi
29.
Copyright © GREE,
Inc. All Rights Reserved. python-varnishapi sample - VSL data output sample - Made it slightly more readable ;)
30.
Copyright © GREE,
Inc. All Rights Reserved. python-varnishapi sample
31.
Copyright © GREE,
Inc. All Rights Reserved. python-varnishapi sample
32.
Copyright © GREE,
Inc. All Rights Reserved. libvarnishapi: very easy to use Hack on with libvarnishapi and Varnish! Better than making a measuring tool from scratch
33.
Copyright © GREE,
Inc. All Rights Reserved. Thank you for your attention! Any Questions? @xcir http://blog.xcir.net/ https://github.com/xcir/vtctrans https://github.com/xcir/vsltrans https://github.com/xcir/python-varnishapi