Fetching contributors…
Cannot retrieve contributors at this time
80 lines (54 sloc) 3.01 KB


Clients will commonly issue /check/... requests via HEAD. freno responds by setting an appropriate HTTP status code.

While GET method is also supported, the response for HEAD requests is shorter and involves less computation by freno. GET is more useful to humans.

Clients can be expected to issue many requests per second. freno is lightweight in resources. It should be just fine to hit freno hundreds of times per second. It depends on your hardware and resources, of course.

freno probes backend stores continuously and independently of client requests. Client requests merely pick up on the latest metrics collected by freno, and do not synchronously wait on servers to be polled.

It makes sense to hit freno in the whereabouts of the granularity one is looking at. If your client is to throttle on a 1000ms replication lag, checking freno 200 times per sec may be overdoing it. However if you wish to keep your clients naive and without caching this should be fine.

It is also possible to ask freno to write metrics to memcache, in which case clients can read metrics directly using their favorite memcache client.

Usage samples


freno-client is our official Ruby client for freno. It is open sourced and available as a Ruby Gem.

require "freno/client"

faraday   =
freno     =

freno.check?(app: :my_app, store_name: :my_cluster)
# => true

freno.replication_delay(app: :my_app, store_name: :my_cluster)
# => 0.125

pt-archiver / perl

pt-archiver is probably the most popular tool for archiving table data. pt-archiver can use freno with a plugin. A plugin is available on To make it usable, you will need to:

  • Let the plugin know where to find freno and which cluster to use (see sample code in comment in plugin file)

  • Deploy the plugin. Sample puppet deployment would look something like:

    file { '/usr/share/perl5/':
        ensure => file,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
        source => 'puppet:///modules/percona/usr/share/perl5/';

    This assumes /usr/share/perl5 is in your @INC path (run perl -e 'print "@INC"' to confirm).


if curl -s -I | grep -q "200 OK" ; then
  echo "Good to go, do some writes"
  echo "Need to throttle; please refrain from writes"


import "net/http"

const frenoUrl = ""

func CheckFreno() (canWrite bool, err error) {
	resp, err := http.Head(frenoUrl)
	if err != nil {
		return false, err
	return resp.StatusCode == http.StatusOK, nil