xcir

\いわなちゃん/

9月 042022
 












4


1
100g25kcal
EXV 1

 30g
/ 


(一)
(二)
(三)10~15
(四)調

OK1




1# vol.1



1


 70~80g
90~100g
1/4
()EXV 1
 20g
20gg
 1
 1
OK
  2g()
 1/21調
 

 
 
 
 


(一)
(二)
(一)
(二)
(三)
(一)
(四)30
(五)

 
 




2使1

2.5mm

OK

No5
調
調

()


Amazon










  • トマト・ジュース漬け(要はトマト缶)
  • 植物油脂(まぁオリーブオイルでしょう)
  • にんにくスライスロースト
  • 乳等を主要原料とする食品
  • 玉ねぎ
  • 食塩・砂糖
  • 酵母エキス
  • 唐辛子・ブラックペッパー・オレガノ・ホワイトペッパー
  • 香料
  • (一部に大豆・乳成分を含む)
栄養成分表100gあたり一食換算(130g)
カロリー177kcal230.1kcal
タンパク質4.4g5.72g
脂質13.8g17.94g
炭水化物8.9g11.57g
食塩相当量1.5g1.95g



 59.5%
 9.3%

調




















使





















5

使







調

(一)
(二)
(三)
(四)













30







15cc130cc24cm16g12g






880kcal230.1kcal

100g379kcal609kcal()

130g100g677kcal+68kcal

1.3

(70~80g)

130g70g
100g
70g

100g100g

使


使



使調
ロッソガルガーノオーケーストア
フィオリータ
ピノキオ
プレミアム
カルディ
ラ・プレッツィオーザ
トマト(参考)
カロリー25kcal20kcal31kcal27kcal20kcal
タンパク質1.3g0.9g1.4g1.3g0.7g
脂質0g0.2g0.1g0.2g0.1g
炭水化物5.0g4.4g6.2g5.3g4.7g
食塩相当量0.03g0.01g0.02g0.03g0g



使



high brix

25kcal



 


EXV






30

使使
 


使













117.94g使114g

使100g32g






公式の画像でもやっぱダマっぽい何かが見える













使


使



調調


/使





 28使 





/

S&B使








(59.5%) >  > (9.3%) >  > 





調





調








調


 Posted by at 12:59 PM
7月 252022
 

はじめに


HTTPRFCRFC91XX

HTTP  RFC 3(HTTP/3Cache-Status

HTTPHTTP/2

HTTP/2HTTP/1.1Accept-Encoding使

RFC7231Hypertext Transfer Protocol (HTTP/1.1): Semantics and ContentHTTP/1.1

RFC9110HTTP/2RFC

HTTP/2Section 8

HTTP/2 is intended to be as compatible as possible with current uses of HTTP. This means that, from the application perspective, the features of the protocol are largely unchanged. To achieve this, all request and response semantics are preserved, although the syntax of conveying those semantics has changed.
Thus, the specification and requirements of HTTP/1.1 Semantics and Content [RFC7231], Conditional Requests [RFC7232], Range Requests [RFC7233], Caching [RFC7234], and Authentication [RFC7235] are applicable to HTTP/2. Selected portions of HTTP/1.1 Message Syntax and Routing [RFC7230], such as the HTTP and HTTPS URI schemes, are also applicable in HTTP/2, but the expression of those semantics for this protocol are defined in the sections below.

8. HTTP Message Exchanges RFC7540



HTTP/2 is an instantiation of the HTTP message abstraction (Section 6 of [HTTP]).
8. Expressing HTTP Semantics in HTTP/2 RFC9113





RFC9111HTTP Caching(must-understand)使



RFC7234

no-cachemax-age

no-cache

RFC7234no-cache



Web


 

RFCGithub

https://github.com/httpwg/http-core/issues?q=is%3Aissue+is%3Aclosed+label%3Acaching+sort%3Acreated-asc

max-age=3600quoteSHOULD NOTMUST NOT 

quote

Quoted cache-control directives #128

4.2 使GMT


RFC2616#19.3GMTMUST GMT使GMTMUST 

RFC7234#4.2GMTUTCSHOULD

UTCGMTGMTGMT

UTC in dates #472

5.4 Pragma: no-cache


Pragma: no-cacheHTTP/1.0Cache-Control

: Pragma #140

5.5 Warning


Warning 使

Warning: 112 - "network down" "Sat, 25 Aug 2012 23:34:45 GMT"

使

Warning #139

4.3.3 5xx


(5xx)

(OR)(5xx)
(OR)
(Stale4.2.4)



Validation failures #462

4.2.1 


ExpiresCache-Controlmax-age 

RFC7234#4.2.1Stale MUST/SHOULD/MAYencouraged 

no-store 

Staleno-store



Expiresmax-ageStale
max-ageno-cacheno-cache
max-ageStale



Handling duplicate directives (part II) #460

5.1 Age


Age1

DevToolAge(X, XX) 

(SHOULD)



Revisiting Age error handling #471

5.2.1 MAY


Cache-Control 

max-age=0no-cacheCDNProxy(HTTP)

MUST 
This section defines cache request directives. They are advisory; caches MAY implement them, but are not required to.
(意訳)このセクションでは要求ディレクティブを定義します。これらの実装は必須ではありません。(実装してもよい(MAY))

 





: Request Cache-Control directives #129

5.2.2.3 must-understand


jxckCache-Control: must-understand  

RFC7234#3the response status code is understood by the cache 

999200 

cache-control: max-age=60999CDNProxy



 

cache-control(max-age)

 

Range206IMS/INM304 

Cache-Controlmax-age 

range0~1KB2061~2KBrange0~1KB 



must-understand

must-understand 

206304max-age

must-understand 

no-store(SHOULD)

cache-control: max-age=60, must-understand, no-store

must-understandRFC7234#5.2.3, RFC9111#5.2.3 

cache-control: max-age=60, no-store

 no-store

must-understand

no-store(SHOULD)

: Status codes and caching #120

3.1 


(RFC9110#6.5)

(Header)(Trailer)flano_yukiHTTP



()(MAY)
(MUST NOT)





RFC9110#6.5

3 


 

must-understandcache-controlMAY

RFC7234private

RFC7234



Cache-Controlno-store
sharedCache-Controlprivate
sharedAuthorization

Expires
Cache-Controlmax-age
sharedCache-Controls-maxage


Cache-Controlpublic





RFC9111



206304Cache-Controlmust-understand
Cache-Controlno-store
sharedCache-Controlprivateprivate
sharedAuthorization

Cache-Controlpublic
sharedCache-Controlprivate
Expires
Cache-Controlmax-age
sharedCache-Controls-maxage





RFC9110#151xx 

no-storemust-understandmust-understand 


4 




cache-controlPragma

URI
使
Vary
Cache-ControlPragmano-cacheRFC9111
Cache-Controlno-cache

Fresh
Stale


Appendix B. Changes from RFC 7234


 Posted by at 10:55 PM
4月 182022
 


調


調調Web 

ExpiresCache-Control
ETagLast-Modified
Web  p124



TTLCache-Control: max-age / Expires







便RFC


(RFC7234)

RFC


 RFC7234 Caching RFCStrongWeak

Strong/WeakValidatorLast-ModifiedETagRFC7232#2

ETagetag: W/6226c295-200f3W/etag: 6226c295-200f3W/(Weak validator)

RFC


HTTP

CSS1TTL



Cache-Control: max-age=86400
ETag
Last-Modified



TTL

TTL使

TTL
If-None-Match
使ETag/Last-Modified

200
304

(If-Match)使If-Modified-Since/If-None-Match



TTLTTL
TTL



RFC7234

RFC7234Fresh()Stale()



TTLFresh
TTLStale



Fresh使Stale使RFC7324#4

使Fresh

Fresh
Fresh使



TTLFreshTTLStale
TTLFresh



FreshStale


Cache-Controlmax-ageExpiresTTLTTLDateLast-ModifiedTTLHTTP

Fresh

TTLEtagTTL



HTTPWeb(3)
TTLFreshStale



2



 Posted by at 10:39 PM
11月 242021
 

ESI(pesi)VMODVMOD

(xcounter)Github actionsdeb

varnish-modules

VMOD使.so

debrpm

https://github.com/xcir/vmod-packager

使docker, curl, jq使
xcir@build01:~/git/vmod-packager$ cd src
xcir@build01:~/git/vmod-packager/src$ git clone https://github.com/varnish/varnish-modules.git
xcir@build01:~/git/vmod-packager/src$ cd ..
xcir@build01:~/git/vmod-packager$ ./vmod-packager.sh -e 0.19 varnish-modules
...
##################################################
        docker image: vmod-packager/focal:7.0.0-1
                Dist: focal
     Varnish Version: 7.0.0
         Varnish VRT: 140
           VMOD name: varnish-modules
        VMOD Version: 140.0.19
              Status: SUCCESS

xcir@build01:~/git/vmod-packager$ ls pkgs/debs/varnish-modules/
varnish-modules_140.0.19~focal-1_amd64.build      varnish-modules_140.0.19~focal-1_amd64.changes  varnish-modules-dbgsym_140.0.19~focal-1_amd64.ddeb
varnish-modules_140.0.19~focal-1_amd64.buildinfo  varnish-modules_140.0.19~focal-1_amd64.deb



rpm
xcir@build01:~/git/vmod-packager$ ./vmod-packager.sh -d centos8 -e 0.19 varnish-modules
...
##################################################
        docker image: vmod-packager/centos8:7.0.0-1
                Dist: centos8
     Varnish Version: 7.0.0
         Varnish VRT: 140
           VMOD name: varnish-modules
        VMOD Version: 140.0.19
              Status: SUCCESS

xcir@build01:~/git/vmod-packager$ ls pkgs/rpms/varnish-modules/
varnish-modules-140.0.19-1.el8.src.rpm  varnish-modules-140.0.19-1.el8.x86_64.rpm





./autogen.sh(./bootstrap) + ./configure + make





libvdp-pesi
xcir@build01:~/git/vmod-packager$ cd src/
xcir@build01:~/git/vmod-packager/src$ git clone https://gitlab.com/uplex/varnish/libvdp-pesi.git

xcir@build01:~/git/vmod-packager/src$ cd libvdp-pesi/
xcir@build01:~/git/vmod-packager/src/libvdp-pesi$ git checkout -b 7.0 remotes/origin/7.0
xcir@build01:~/git/vmod-packager/src$ cat libvdp-pesi_init.sh 
#!/bin/sh

cp -rp ${VMP_ROOT_DIR}/src/m4 ${VMP_WORK_DIR}/src/m4

xcir@build01:~/git/vmod-packager/src$ cat libvdp-pesi_config.sh 
#!/bin/sh

./autogen.sh
./configure VARNISHSRC=/tmp/varnish/src

xcir@build01:~/git/vmod-packager$ ./vmod-packager.sh -f  src/libvdp-pesi
...

##################################################
        docker image: vmod-packager/focal:7.0.0-1
                Dist: focal
     Varnish Version: 7.0.0
         Varnish VRT: 140
           VMOD name: libvdp-pesi
        VMOD Version: 140.0.1
   Enable fixed mode
              Status: SUCCESS

xcir@build01:~/git/vmod-packager$ dpkg --info pkgs/debs/libvdp-pesi/libvdp-pesi_140.0.1~focal-1_amd64.deb 
 new Debian package, version 2.0.
 size 56760 bytes: control archive=816 bytes.
     309 bytes,    11 lines      control              
     711 bytes,    10 lines      md5sums              
 Package: libvdp-pesi
 Version: 140.0.1~focal-1
 Architecture: amd64
 Maintainer: libvdp-pesi <example@localhost>
 Installed-Size: 141
 Depends: libc6 (>= 2.14), varnish (= 7.0.0)
 Replaces: libvdp-pesi (<< 140)
 Section: web
 Priority: optional
 Homepage: https://github.com/xcir/
 Description: packed by vmod-packager

[VMOD]_init.sh
m4

使depends[VMOD]_env.sh

libvdp-pesiconfigurevarnish [VMOD]_config.sh

-f使libvdp-pesiVarnish

VMOD

src使vmodclone
for i in `find src/  -mindepth 1 -maxdepth 1 -type d` ; do echo $i;cd $i ;git pull; cd ..;cd .. ; done

./vmod-packager.sh -v 7.0.1 -t -e `date +%Y%m%d` `find src/  -mindepth 1 -maxdepth 1 -type d`

find pkgs/debs/ -type f -name *.deb|grep `date +%Y%m%d`| xargs -i cp -p {} [コピー先]



使README
使
VMOD




copyrightdescription
使

9月 252021
 

VarnishEnterpriseESIcommunity使UPLEX

ESI便


vmodVarnishVarnish

VarnishVarnish


OSUbuntu 20.04 LTS
Varnish7.0.0 (454733b82a3279a1603516b4f0a07f8bad4bcd55)
vmod_pesimaster (52cd44e3d8944825d1d84a01c70002a509048c74)

pesi使7.0

Varnishpesi
ubuntu@proxy:~/tmp$ ll
total 16
drwxrwxr-x  4 ubuntu ubuntu 4096 Sep 25 21:38 ./
drwxr-xr-x 12 ubuntu ubuntu 4096 Sep 25 21:37 ../
drwxrwxr-x  3 ubuntu ubuntu 4096 Sep 20 23:33 libvdp-pesi-master/
drwxrwxr-x 15 ubuntu ubuntu 4096 Sep 24 02:18 varnish-cache-master/



Varnishautogen.sh / configure / make
ubuntu@proxy:~/tmp$ cd varnish-cache-master/
ubuntu@proxy:~/tmp/varnish-cache-master$ ./autogen.sh
ubuntu@proxy:~/tmp/varnish-cache-master$ ./configure
ubuntu@proxy:~/tmp/varnish-cache-master$ make

make install

pesivarnishm4
ubuntu@proxy:~/tmp$ cd libvdp-pesi-master/
ubuntu@proxy:~/tmp/libvdp-pesi-master$ cp -rp ../varnish-cache-master/m4 ./

configure.acVarnishtrunkVarnish7.0.0
ubuntu@proxy:~/tmp/libvdp-pesi-master$ diff configure.ac ../org/configure.ac
56c56
< VARNISH_PREREQ([7.0.0])
---
> VARNISH_PREREQ([trunk])


src/Makefile.am1PR
ubuntu@proxy:~/tmp/libvdp-pesi-master$ diff src/Makefile.am ../org/src/Makefile.am
72,73d71
< vmod_pesi_debug.lo: vcc_pesi_debug_if.h
<


/


Varnish
ubuntu@proxy:~/tmp/libvdp-pesi-master$ ./autogen.sh
ubuntu@proxy:~/tmp/libvdp-pesi-master$ ./configure VARNISHSRC=/home/ubuntu/tmp/varnish-cache-master

ubuntu@proxy:~/tmp/libvdp-pesi-master$ make
ubuntu@proxy:~/tmp/libvdp-pesi-master$ make check
ubuntu@proxy:~/tmp/libvdp-pesi-master$ sudo make install



使


使
import pesi;

sub vcl_backend_response {
  set beresp.do_esi=true;
}

sub vcl_deliver{
  pesi.activate();
}

使 README 

ESIESI
$ cat esi1.html
<html>
<body>
        <esi:include src="./time.php?t=1&s=1"/>
        <esi:include src="./time.php?t=2&s=2"/>
        <esi:include src="./time.php?t=3&s=3"/>

</body>
</html>


$ cat time.php
<?php
$s=(int)$_GET['s'];
if($s >10)$s=10;
if($s==0) $s=1;
echo $_GET['t'];
echo "&nbsp;";
echo "start:".date(DateTime::ISO8601);
echo "&nbsp;";
sleep($s);
echo "end:".date(DateTime::ISO8601);
echo "<br>\r\n";


1,2,3PHPinclude

ESI


1+2+36

ESI


(esi1.html)ESIfetch

ESI

ESI

<html>
<body>
        <esi:include src="./time.php?t=C%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D1%26s%3D1%22%2F%3EC%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D1%26s%3D1%22%2F%3E&s=1"/>
        <esi:include src="./time.php?t=C%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D2%26s%3D2%22%2F%3EC%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D2%26s%3D2%22%2F%3E&s=2"/>
        <esi:include src="./time.php?t=C%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D3%26s%3D3%22%2F%3EC%3Cesi%3Ainclude+src%3D%22.%2Ftime.php%3Ft%3D3%26s%3D3%22%2F%3E&s=3"/>
</body>
</html>

url
C<esi:include src="./time.php?t=1&s=1"/>C<esi:include src="./time.php?t=1&s=1"/>
C<esi:include src="./time.php?t=2&s=2"/>C<esi:include src="./time.php?t=2&s=2"/>
C<esi:include src="./time.php?t=3&s=3"/>C<esi:include src="./time.php?t=3&s=3"/>

ESI2include
+ sleep=1
|+ sleep=1
|+ sleep=1
+ sleep=2
|+ sleep=2
|+ sleep=2
+ sleep=3
|+ sleep=3
|+ sleep=3

ESI

ESI


ESI

使


ESI

ESIESIESI(pesi.activate)

ESIESIpanicVarnishrestart

README


Varnish

4月 292021
 

使
MDNCache-Control(MDN)()

HTTPProxyReverseProxy



CDN

CDN





(private cache)
(shared cache)

2
(cache-controlpublic/private)

API
APIshared
private

sharedprivate


private/shared2

API

privateshared
使CDN
private/shared使


CDNWeb3
[][Proxy][CDN]



Proxy
CDN



使
CDN使
3




private cacheshared cache

ProxyProxy/CDN

ProxyCDN

shared cache

Proxy
ProxyCDN
ProxyCDNshared


種類クライアントとの対応格納できる場所
private1:1ローカル
shared1:nローカル・経路上・ゲートウェイ

ローカル・経路上のキャッシュを併用しよう











使private cache shared cache


privateshared2

privateshared
shared

CDN

Cache-Control


RFCRFC72342

Although caching is an entirely OPTIONAL feature of HTTP,
it can be assumed that reusing a cached response is desirable 
and that such reuse is the default behavior when no requirement
or local configuration prevents it.
HTTP
RFC7234#2



Cache-Control
TTL
TTLCache-Controlmax-ageTTLRFC7234#4.2.2

Last-ModifiedDate2使TTL

12(10%)

TTL = (Date  Last-Modified) / 10

Cache-Control

使


使2

TTL

Cache-Control

no-cacheno-storeno-cacheno-store

no-cache

no-store

Cache-Control


example.netF5

Cache-Control: max-age=604800Cache-Control: max-age=0ctrl+F5no-cache

Cache-Control

max-ageTTLTTLmax-age=00

max-agemax-age

no-cache/no-store

no-store

no-store

CDNProxyF5
CDN



Cache-Control

xhr

Cache-Control


Cache-Control

no-storeCDN使調

200Cache-ControlX

TTL


sharedmax-age=36001
1

30Age: 180030

Age > max-age

TTL


Cache-Control
Cache-ControlCDN使調
2








 Posted by at 9:32 PM
3月 032021
 

twitterWeb

 



HTTPCDNHTTPCDNCDN使WebVTuber
Web

HTTP使Web
使Web
CDN
CDNCDN

CDN使


便

CDN11






456
amazon.com調

Web












RFC
HTTPRFCRFC




2
Proxy/CDN3
Proxy/CDN46
7




2
WebCDN使

3HTTPHTTP
RFC使
Web
js/css
CDN使使

4ProxyCDN
3RFC
45

5
Proxy
ProxyCDNFastly

6CDNCDN使
Fastly
CDNCDNCDNCDN
CDN使5
CDN

7
CDNCDN使

CDN

VarnishVarnish

2022/04/13) 33
3




CDN使6


CDN使3Cache-Control5CDN使




5
CDN使Web

4

 便



no-cache

使

no-store

no-cache使no-store




no-storeno-cache

TTL

no-cacheno-storecache-controlcache-control

(max-age)CDNProxyno-cache
F5no-store

no-store

no-storeno-cachemax-age=0max-age=0






この本を書く前から、このような問題意識を持っていたのですが、2017年にとあるサイトのキャッシュ事故でCDNが話題になった際にCDNとの付き合い方という記事を書きました。

実はこれは元々社内向けに書いていて満足していたのですが(結構何か起きたりすると社内向けに記事を書いたりすることが多くて他にも割と出したら面白そうなネタがいくつか)TwitterかQiitaで、動的コンテンツをキャッシュするなんて・・・みたいな投稿を見かけていやそうじゃないとカッとなって書いた記憶があります。



はじめまして。出版社、技術評論社の野田と申します。
書籍企画へのご協力、執筆をお願いしたく連絡差し上げました。

現時点ではまだVarnish-Cache入門のような書籍になるか、
あるいはCDN含め配信全体を俯瞰的に解説する本になるかも未定なのですが、
Webサービスやシステムのための「リバースプロキシ」や「キャッシュ」「配信最適化」の入門書を企画しております。

PDF版のVarnish
Cache入門や貴ブログのCDNに関する記事(****)を拝読し、
ぜひ執筆お願いできないかと今回連絡差し上げました。

もしご興味お持ちいただけるようなら、
企画の狙い、最終的にはどういう形の書籍になるかの複数のプランなどお伝えにお訪ね(もしくは企画書の送付)いたします。


ご検討よろしくお願いいたします



議事録
 大まかな方向性
 進めるならWebサイトのコンテンツやアプリケーション向けアセット「配信本」。目的意識に近い。
 キャッシュ本は説明しきれないし、varnish-cacheは商業書籍にするほど人気があるものではない。
 ユーザーに近いところから徐々に配信を最適化する手法を解説していく。
 CDNを使えば万事解決というものではなく、むしろその前の段階が重要なのでCDN以前についてもしっかり解説し最終的にCDNを使う方法について解説するような構成。
 ブラウザー、リバースプロキシ、アプリ、CDN…というような構成で進める。
 内容補足
 CDNをちゃんと使う前の最低限から始める 1:nのキャッシュ
 CDNは最後に…
 どのCDNを紹介するか GREEはAkamaiを使っているが読者向けにはFastlyだろう Akamaiは想定読者がそもそも使えない
 Akamai/Fastly/CloudFront
 レビューしてくれるか、内容をヒアリングできるか。
 大規模ならではという話があると面白いかも varnishのマイグレーションとか大変な話は大規模
 キャッシュさせるサーバーについて UbuntuとRHEL系(CentOS)
 varnish, nginx, apacheの三択。書籍としてはたぶんvarnish中心。 
 読者の課題とこの本の意義。
 小規模、中規模だと適切にキャッシュを使えていないことがある。そういうところが適切に使えるようになるために、配信やキャッシュについて一冊にまとめる本を出すことには意義があるだろう。大規模は概ね適切に使えているはず(例外もあるが…)。
 eg. 4/1、エイプリルフールで落ちる中小サイト…。
 eg.
 メディア掲載などでPV増が起きた肝心なときに落ちてしまい機を逃すサイト…。
 こういった代表的な例が考えられるが、適切に配信できていない中小サイト(の運営企業の担当者)が読者対象。大企業は配信を見る人がいるが、そういう人がいないところ。
 本のつくり
 192p ~ 256pぐらい。技術書としては短め。

~256p稿markdowncacoogithubissue

締め切りとは何だったのか


2018稿2


Vary3,4,53Vary5Vary
調

稿2019githubissue
1







twitter


HTTP













稿Vary



()





ISBN


編集すごいと再認識したのと、この本ができたのは自分と編集の見ている問題意識が一致していたからだろうなと思いました(めっちゃ驚いた

さいごに

ということでキャッシュと関連技術のクソ分厚い本書きました。
ぜひぜひ買ってくださいね!あと感想とかレビューもらえるとすっごくうれしいです。


 Posted by at 11:40 AM
9月 042019
 

Varnish6.0.4/6.2.1
(VSV00003/CVE-2019-15892)
VarnishHTTP(keep-alive)assertVarnish


 6.1.0~6.1.16.2.0
6.2.1
6.0.0~6.0.3
6.0.4

6.0.0(LTS4.1)assert

VCL


VCL


keepaliveConnection: Close


VCL
C使

6.2.0
6.1.1
6.0.3


(6.0.4)


6.2.16.0.46.0

std.ip


std.ipIP80p
80使


VMLVIVU-list使
9/15

5月 092019
 

Vanrish6.2.0
 201943HTTP/3(bugwashh3)

Python2.73.4



 6.2.03/153/29
 Python2.7.xEOL

vmod


vmod
 vmodvccfunc/eventvmod_
 
$Event event_function


int v_matchproto_(vmod_event_f)
event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)


int v_matchproto_(vmod_event_f)
vmod_event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)

 
 VCL_BLOB使
 vmod_privvrt_blob
 rename(->priv->blob) 
VRT_API9
int v_matchproto_(vmod_event_f)
#if VRT_MAJOR_VERSION > 8U
  vmod_event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
#else
  event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
#endif


VUT


VUT
VUT
signal


ExpKillExpRearm


 shm_reclen/vcl_dir/vmod_dir
 vcl_reclen/vcl_path/vmod_path

/

thread_pool_stack

VCL

req.is_hitmiss/req.is_hitpass


vcl_hitreturn(miss)

/

debugvcl_keep


 VCLCso
 /var/lib/varnish/[instance-name]/[vcl-name]/vgc.c
 varnishtest便

banttl使


obj.age/ttl/grace/keep使ban
5
ban obj.age > 5h


param.reset(varnishadm/varnish-cli)

varnishadmjson


6.0.26.1.0json
6.1.16.0.2json6.2.0

clijson使

stat


6.0.2stat6.2.0

lookup(#2854)


lookupmutex
RPS

resp.filters


6.1.0beresp.filtersresp
 使VDP filter
 使master

vmod_std


real->integerreal2integertime->integertime2integerfallback
integer
std.integer(real=1.23)

duration/bytes/integer/real/time
real2integer/real2time/time2integer/time2real

vmod_directorslookup


vcl_init/fini使
new l2_cache = directors.hash();
l2_cache.add_backend(cache01, 1.0);


new l2_cache = directors.hash();
l2_cache.add_backend(directors.lookup("cache01"), 1.0);



varnishncsa/varnishlogratelimit(R)
-R 10/2m



varnishstat
+/-0.1

http/2active stream(#2916,2923)


stream=0activemax_concurrent_streams1
stream openrefuse
使使

10月 282018
 

6.1.0(varnishhist)IRC6.1.1
6.1.06.1.1

PRLTS()6.0.2

6.0.0/6.0.16.1.1(6.0.2)

使
HTTP/2 (6.1.1/6.0.26.1.0/6.0.1)
proxy protocol
UDS
pipe


6.1.x6.0.x


6.1.x
VCL6.0
vmoddirector API


backendstorageVFPVCL
VFP(VarnishBody)
gzipZopfli(ESI)
VarnishVDP6.1.x
trunkVDP(2019/03)

VarnishLTS


Varnish

4.1.x5.x
Releases & Downloads

(MLIRC)
VarnishSoftware(VS)VarnishCachePlusLTS
 Please backport #2077 to 5.1.x 
Plus6.0.1r24.1.10r56.0.x4.1.xLTS
6.0Plus4.1.x
4.1.x使6.0.x

6.1.16.0.2


6.0.2(VFP6.1)
6.1.1bugfix


HostHTTP/1.1400(#2631)
HTTP/1.1Host
builtin.vcl
For HTTP/1.1 requests, Host is mandatory


max_vcl/max_vcl_handling
varnishreloadvcl
(vcl.list)
max_vclvcl100max_vcl_handling
01warning()2VCL
使VCL(warn)
warnvcl.discard

backend_local_error_holddown/backend_remote_error_holddown



backend_local_error_holddownEADDRNOTAVAILEACCESSEPERM
backend_remote_error_holddownECONNREFUSEDENETUNREACH



thread_pool_watchdog
h2Varnish



restart(thread_pool_max)
h2h2

VCL



req.ttlreq.ttlreq.grace

importvmodimport

vmod_std使vmodvclincludeimport std;vcldefine.vcl
2import

vcl_initreturn fail
vcl_init使return(fail)

return(fail(foo))

//vcl
sub vcl_init{
  return(fail("foo"));
}

//output
VCL "boot" Failed initialization
Message:
        foo




beresp.filters


vmod_stdfnmatch

BOOL fnmatch(STRING pattern, STRING subject, BOOL pathname=1, BOOL noescape=0, BOOL period=0)


shell(ex:/var/log/*)
pathname/noescape/periodfnmatchflags
FNMATCH



if (std.fnmatch("/foo/*", req.url)) { ... }


url使
便VCL使pre-compile

VFPVCL(6.1.x)


VFPVMOD


varnishlog -graw -i filters




使

sub vcl_backend_response {
  set beresp.http.x-filters = beresp.filters;
}






sub vcl_backend_response {
  set beresp.filters = "esi" // gzipじゃない時のberesp.do_esi = true;と同等;
}



(VMOD使OK


varnishadm(varnish-cli)json(6.0.2/6.1.0)

json

# sudo varnishadm backend.list -j

[ 2, ["backend.list", "-j"], 1540196843.165,
  {
    "reload_20181022_074741_10060.***": {
      "type": "backend",
      "admin_health": "probe",
      "probe_message": "5/5 good",
      "last_change": 1540194463.057
    },

...

    "reload_20181022_074741_10060.***": {
      "type": "hash",
      "admin_health": "probe",
      "probe_message": "healthy",
      "last_change": 1540194463.054
    }
  }
]


6.1.16.0.2
varnishadm便

6.1.0/6.0.2
 ping
 backend.list
 help

6.0.2
 status
 vcl.list
 param.show
 ban.list
 storage.list
 panic.show

stat
varnishstatstat
6.0.2

6.1.0/6.0.2
 MAIN.sess_fail_econnaborted
 MAIN.sess_fail_eintr
 MAIN.sess_fail_emfile
 MAIN.sess_fail_ebadf
 MAIN.sess_fail_enomem
 MAIN.sess_fail_other
 [backend].unhealthy
 [backend].busy
 [backend].fail
 [backend].fail_eacces
 [backend].fail_eaddrnotavail
 [backend].fail_econnrefused
 [backend].fail_enetunreach
 [backend].fail_etimedout
 [backend].fail_other
 [backend].helddown

6.0.2
 wrk.client_resp_500
 wrk.ws_backend_overflow
 wrk.ws_client_overflow
 wrk.ws_thread_overflow
 wrk.ws_session_overflow

fail_eaddrnotavail(EADDRNOTAVAIL)
overflow便
workspace_client


directorAPIvmod
VMODdirectorvmod


6.0.2/6.1.1
HTTP/22

HTTP/2(#2623)

PRIORITY(#2775)

http/2experimental


Ubuntu18.04(bionic)
varnishtesthaproxy
varnishtest(Divorcing varnishtest from varnish-cache)

VTest