Skip to content

pawboss/varnish-sharding-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Varnish sharding cluster

About The Project

This project has been built to enjoy with free varnish cluster solution. Is based in object sharding and backend self-routing.

Installation

The project contains three instances of varnish and simple apache within docker so the first time it is only necessary to do a:

docker-compose up --build

Usage

There are three varnish instances with the same config, four backends.

Backends varnish1, varnish2 and varnish3 are the cluster backends.

Backend content is the api with two simple html files.

You can make request to the varnish hosts, for example:

To varnish3

curl -s  http://0.0.0.0:8093/index.html

Ports:

  • 8091 is varnish1
  • 8092 is varnish2
  • 8093 is varnish3

You can view varnish activity with varnislog in the docker container, example:

docker exec -ti varnish3  varnishlog

You can stop and instance to force cluster node down:

docker-compose stop varnish1 varnish2

Or start to recover nodes activity:

docker-compose start varnish1 varnish2

Related links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published