All Projects → martensson → vaban

martensson / vaban

Licence: MIT License
Simple and Really Fast Varnish Cache Cluster Manager

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Labels

Projects that are alternatives of or similar to vaban

docker-varnish
Docker image for Varnish Cache (caching HTTP reverse proxy)
Stars: ✭ 46 (+58.62%)
Mutual labels:  varnish
gondul
Network management/monitoring system specialized for temporary events
Stars: ✭ 40 (+37.93%)
Mutual labels:  varnish
varnish-examples
Examples of Varnish configuration files for Clever Cloud
Stars: ✭ 18 (-37.93%)
Mutual labels:  varnish
varnish-operator
Run and manage Varnish clusters on Kubernetes
Stars: ✭ 47 (+62.07%)
Mutual labels:  varnish
go-fastly-cli
CLI tool for interacting with Fastly CDN services via official REST API.
Stars: ✭ 14 (-51.72%)
Mutual labels:  varnish
libvmod-geoip2
A Varnish VMOD to query MaxMind GeoIP2 DB files
Stars: ✭ 37 (+27.59%)
Mutual labels:  varnish
VarnishPurge-Craft
Craft plugin for purging Varnish when elements are saved.
Stars: ✭ 33 (+13.79%)
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 (-31.03%)
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 (+827.59%)
Mutual labels:  varnish
docker-varnish
Varnish docker image used within EMGAG environments
Stars: ✭ 25 (-13.79%)
Mutual labels:  varnish
varnish
Varnish docker container image
Stars: ✭ 55 (+89.66%)
Mutual labels:  varnish
typo3-varnish
Varnish Connector for TYPO3. Mirrored from https://gitlab.com/opsone_ch/typo3/varnish.
Stars: ✭ 44 (+51.72%)
Mutual labels:  varnish
vcl-snippets
Snippets for Varnish Cache
Stars: ✭ 17 (-41.38%)
Mutual labels:  varnish
docker-symfony
Docker Symfony SOA oriented with NGINX, PHP7-FPM, MySQL, Redis, ELK (Elasticsearch Logstash and Kibana), Varnish and CouchDB
Stars: ✭ 47 (+62.07%)
Mutual labels:  varnish
ansible-roles
Library of Ansible plugins and roles for deploying various services.
Stars: ✭ 14 (-51.72%)
Mutual labels:  varnish
libvmod-redis
VMOD using the synchronous hiredis library API to access Redis servers from VCL.
Stars: ✭ 76 (+162.07%)
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 (-58.62%)
Mutual labels:  varnish
compose-mediawiki-ubuntu
Containerized Mediawiki install based on Ubuntu
Stars: ✭ 42 (+44.83%)
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 (-3.45%)
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 (+6.9%)
Mutual labels:  varnish

Vaban

A quick and easy way to control clusters of Varnish Cache hosts using a RESTful JSON API.

Build Status

Vaban is built in Go for high performance, concurrency and simplicity. Every request and every ban spawns its own lightweight thread. It supports Varnish 3.0.3 + 4, Authentication, Pattern-based/VCL-based banning, health status, enable/disable backends, and more stuff to come.

Getting Started

Installing from packages

The easiest way to install Vaban is from packages.

  • Currently enabled for Ubuntu 14.04/12.04 and Debian 7.
  • Current packages available from packager.io

Installing from source

Dependencies

  • Git
  • Go 1.4+

Clone and Build locally:

git clone https://github.com/martensson/vaban.git
cd vaban
go build

Create a config.yml file and add all your services:

Put the file inside your application root, if installing from package: /opt/vaban/config.yml

---
service1:
  hosts:
    - "a.example.com:6082"
    - "b.example.com:6082"
    - "c.example.com:6082"
    - "d.example.com:6082"
    - "e.example.com:6082"
  secret: "1111-2222-3333-aaaa-bbbb-cccc"

service2:
  hosts:
    - "x.example.com:6082"
    - "y.example.com:6082"
    - "z.example.com:6082"
  secret: "1111-2222-3333-aaaa-bbbb-cccc"

Running Vaban

from source:

./vaban -p 4000 -f /path/to/config.yml

from packages:

vaban run web

or

vaban scale web=1
service vaban start
vaban logs

from Docker

If you already have Docker install its really use to compile and run with two commands:

docker build -t vaban .
docker run -p 4000:4000 vaban

Make sure that the varnish admin interface is available on your hosts, listening on 0.0.0.0:6082

API

A quick and easy way to control clusters of Varnish Cache hosts using a RESTful JSON API.

GET /v1/services

Get all groups:

  • Response 200 (application/json)

      [
          "group1",
          "group2",
          "group3",
      ]
    

GET /v1/service/group1

Get all hosts in group:

  • Response 200 (application/json)

      [
          "test01:6082"
      ]
    

GET /v1/service/group1/ping

Scan hosts to see if tcp port is open:

  • Response 200 (application/json)

      {
          "test01:6082": {
              "Msg": "PONG 1431078011 1.0"
          }
      }
    

GET /v1/service/group1/health

Check health status of all backends:

  • Response 200 (application/json)

      {
          "test01:6082": {
              "backend01(10.160.101.100,,80)": {
                  "Refs": "1",
                  "Admin": "probe",
                  "Probe": "Healthy 4/4"
              }
          }
      }
    

GET /v1/service/group1/health/www01

Check health status of one backend:

  • Response 200 (application/json)

      {
          "test01:6082": {
              "backend01(10.160.101.100,,80)": {
                  "Refs": "1",
                  "Admin": "probe",
                  "Probe": "Healthy 3/4"
              }
          }
      }
    

POST /v1/service/group1/health/www01

force health status of one backend (can be healthy, sick or auto):

  • Request (application/json)

      {"Set_health":"sick"}
    
  • Response 200 (application/json)

      {
          "test01:6082": {
              "Msg": "updated with status 200 0"
          }
      }
    

POST /v1/service/group1/ban

To ban elements in your cache.

  • Request Ban the root of your website (application/json)

      {"Pattern":"/"}
    
  • Request Ban all css files (application/json)

      {"Pattern":".*css"}
    
  • Request Ban based on VCL, in this case all objects matching a host-header. (application/json)

      {"Vcl":"req.http.Host == 'example.com'"}"}
    
  • Response 200 (application/json)

      {
          "test01:6082": {
              "Msg": "ban status 200 0"
          }
      }
    
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].