Skip to content

Instantly share code, notes, and snippets.

@ramonsnir
Created Feb 21, 2016
Embed
What would you like to do?
leaking docker-compose
FROM node:4.3.1
ADD . .
RUN npm install
CMD node test.js
test:
build: .
links:
- redis
redis:
image: grokzen/redis-cluster

Checkout 2.x branch. Download the three other files to the root directory of the repo.

docker-compose build docker-compose run

See if it can reach 150_000_000 in about a minute.

var Redis = require('./index');
var redis = new Redis.Cluster([
{
port: 7001,
host: 'redis',
},
{
port: 7002,
host: 'redis',
},
{
port: 7003,
host: 'redis',
},
]);
var i = 0;
function send() {
console.log(process.memoryUsage());
for (var j = 0; j < 1000; j++) {
redis.set('quay', i++);
}
}
setInterval(function() {
send();
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment