ToxiProxy node client

I saw on github a nice tool to test my applications under certain networks and system condition to prove that my tests never fail…

ToxiProxy is the name of this tool, using it you can reproduce latency issues, network limitations, etc.
Basically is a TCP proxy, to use it you have to set the configuration options to simulate issues and specific network conditions and after that you have to set it as a proxy on your application, that’s all!


To use it I saw many clients written in many languages:


and I saw that the node client missed from the list so I decided to write it.


You can find it here, to use it you can follow this example:

var toxiproxy = require('toxiproxy-node');

//New Client
var client = new toxiproxy('localhost:8474');

//New Proxy
var redis = client.NewProxy({
  name: 'Redis',
  listen: '',
  upstream: ''

//Create redis Proxy
redis.Create(function(err, body) {
  if(!err) {
    //Set Latency
    redis.SetToxic('latency', 'downstream', {
      enabled: true,
      latency: 1000
    }, function(err, body) {
      //Show Redis downstream info
      redis.Toxics('downstream', function(err, body) {
        if(!err) {
          //Delete Redis Proxy


To install it you can use npm: npm install toxiproxy-node