TigerBat is a distributed http cache with a focus on:
- Large Objects
- Bandwidth minimization
- Multi-tier distributed cache sharing
- Local Memory
- Cluster Memory
- Cluster Persistent Storage
- No single point of failure
TigerBat is written in Go and integrates well-tested distributed libraries such as etcd and groupcache.
Upstream Server Consideratoins
HTTP headers must be set to allow caching.
- HTTP headers are used to determine cacheability.
- Cacheable objects expiring in less than 60 seconds are not cached.
- The HTTP verb
HEADis used to determine whether an object is cacheable, not
- Responses are immediately streamed if the object is not cached.
- Upstream server must allow
Rangerequests on cacheable objects.
- The cluster will download cacheable large objects in
2 megabyteintervals and will deliver each interval as soon as
it is received.
HTTP Range required
Upstream objects are fetched in
2MB segments. Objects must support fetching objects through
Range: bytes requests.
When retrieving objects larger than 2MB, each Range request to the same object must return the same object, or the request
will be corrupted. For large objects, this is typically not a concern.
At the moment, only unauthenticated requests are supported. Authenticated requests will be supported at
a later time.
TigerBat is still in an alpha development state. Production use at this time is
not recommended. Feedback, testing and help are greatly appreciated.
Single Node Testing Environment
Single node testing is supported with docker-compose. The
file is located at
utils/compose and can be started with the following command:
To scale the cache, use
docker-compose scale cache=3
There are multiple configuration options available for the test environment that can
be configured in the
Here are the configurable environment variables with their default values:
UPSTREAM_SERVER http://www.example.com ETCD http://etcd:2379 MAX_MEMORY 100m MAX_DISK 100G `
Multi Node Setup
- Set up an etcd cluster
- Determine how much memory you want to use.
- Determine how much disk space you want to use.
The prefered technique for starting tigerbat is with docker:
docker pull fkautz/tigerbat docker run -d \ -e UPSTREAM_SERVER=http://httpbin.org \ -e ETCD=http://etcd:2379 \ fkautz/tigerbat
Configurable options when running tigerbat:
--address string Address to listen on (default "localhost:8080") --cleaned-disk-usage string Address to listen on (default "800M") --disk-cache-dir string Address to listen on (default "./data") --disk-cache-enabled Address to listen on (default true) --etcd value URL root to mirror (default ) --max-disk-usage string Address to listen on (default "1G") --max-memory-usage string Address to listen on (default "100M") --mirror-url string URL root to mirror (default "http://localhost:9000") --peering-address string URL root to mirror (default "http://localhost:8000")
Reporting Feature Requests and Bugs
Please file all bugs and feature requests to
Pull requests are welcome. For new features or complex pull requests, please contact
first. He can be reached at