vicanso / Varnish Agent
Licence: apache-2.0
让varnish更简单
Programming Languages
go
31211 projects - #10 most used programming language
Labels
Projects that are alternatives of or similar to Varnish Agent
go-fastly-cli
CLI tool for interacting with Fastly CDN services via official REST API.
Stars: ✭ 14 (+133.33%)
Mutual labels: varnish
varnish-examples
Examples of Varnish configuration files for Clever Cloud
Stars: ✭ 18 (+200%)
Mutual labels: varnish
Laravel Varnish
Making Varnish and Laravel play nice together
Stars: ✭ 291 (+4750%)
Mutual labels: varnish
gondul
Network management/monitoring system specialized for temporary events
Stars: ✭ 40 (+566.67%)
Mutual labels: varnish
varnishtraining
Second iteration of my Varnish training. This version is specifically created for the Symfony Live Berlin 2017 workshop I've presented.
Stars: ✭ 31 (+416.67%)
Mutual labels: varnish
caddy-esi
Middleware for Caddy Server integrating ESI (edge side includes) tags with parallel loading. Able to connect to HTTP/S/2, Memcache, Redis, shell scripts, gRPC and SQL backends 🐜🐜🐜
Stars: ✭ 28 (+366.67%)
Mutual labels: varnish
docker-varnish
Varnish docker image used within EMGAG environments
Stars: ✭ 25 (+316.67%)
Mutual labels: varnish
vaban
Simple and Really Fast Varnish Cache Cluster Manager
Stars: ✭ 29 (+383.33%)
Mutual labels: varnish
varnish-cache-reaper
Simple python/twisted HTTP daemon forwarding PURGE and BAN requests to multiple varnish (or other proxy) instances
Stars: ✭ 12 (+100%)
Mutual labels: varnish
libvmod-cfg
VMOD useful to access to contents of environment variables and local or remote files from VCL, usually for configuration purposes, including execution of Lua and JavaScript programs.
Stars: ✭ 20 (+233.33%)
Mutual labels: varnish
souin
An HTTP cache system, RFC compliant, compatible with @TykTechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @gin-gonic, @zalando, @zeromicro, @nginx and @apache
Stars: ✭ 269 (+4383.33%)
Mutual labels: varnish
Foshttpcache
Integrate your PHP application with your HTTP caching proxy
Stars: ✭ 308 (+5033.33%)
Mutual labels: varnish
typo3-varnish
Varnish Connector for TYPO3. Mirrored from https://gitlab.com/opsone_ch/typo3/varnish.
Stars: ✭ 44 (+633.33%)
Mutual labels: varnish
ansible-roles
Library of Ansible plugins and roles for deploying various services.
Stars: ✭ 14 (+133.33%)
Mutual labels: varnish
React Esi
React ESI: Blazing-fast Server-Side Rendering for React and Next.js
Stars: ✭ 537 (+8850%)
Mutual labels: varnish
Awesome Wp Speed Up
Plugins and resources to speed up and optimize your WordPress site.
Stars: ✭ 375 (+6150%)
Mutual labels: varnish
compose-mediawiki-ubuntu
Containerized Mediawiki install based on Ubuntu
Stars: ✭ 42 (+600%)
Mutual labels: varnish
varnish-agent
varnish-agent
提供界面化的配置管理,配置信息保存于etcd
中,当配置信息有更新时,自动更新配置并重新加载,方便多实例的配置管理。varnish-agent
设置的varnish默认的ttl
为0,因此如果不设置Cache-Control
的所有请求都为不可缓存,尽量使用Cache-Control
来控制接口的缓存时间。
需要注意,varnish-agent
默认的probe
如下:
probe basicProbe {
.url = "/ping";
.interval = 3s;
.timeout = 5s;
.window = 5;
.threshold = 3;
}
所以对于backend都需要添加相应的health check处理(/ping),如果有需要自定义的,可以去调整template.vcl
后,自行重新编译。
运行
参数说明:
-
CONFIG
配置etcd的连接地址,此参数必须指定,如CONFIG=etcd://192.168.31.176:2379/varnish-test
-
AUTH
agent的认证配置,如AUTH=user:pwd
,如果不配置则不使用认证,建议指定此参数 -
ADMIN_PATH
管理后台的路径,如果不配置,则为/agent
-
PARAMS
varnish的启动参数,如PARAMS="-a :8080 -s malloc,256m"
,需要注意的是,varnish的启动参数默认会添加-F -p default_ttl=0
,而-a
如果未指定,则指定为:8080
,-s
如果未指定,则指定为malloc,1G
,一般不需要调整此参数
docker run -d --restart=always \
-p 8080:8080 \
-e CONFIG=etcd://10.254.136.81:2379/varnish \
-e AUTH=user:pwd \
-e ADMIN_PATH=/@agent \
--name varnish-agent \
vicanso/varnish-agent
启动成功后,访问http://127.0.0.1:8080/@agent/
,则可进入管理后台。
添加director
在更新相关配置后,会自动更新加载最新的配置文件(其它实例也会同时更新),当前最新的配置可在Basic Info
中查看,需要注意的是,由于file是根据时间生成,因此不同实例有可能不一致,判断配置文件是否一致应该根据hash
值。
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].