Skip to content

Instantly share code, notes, and snippets.

@logankoester
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save logankoester/9151293 to your computer and use it in GitHub Desktop.
Save logankoester/9151293 to your computer and use it in GitHub Desktop.
var redis = require('then-redis');
var db = redis.createClient('tcp://localhost:6379');
var express = require('express');
var app = express();
app.get('/heartbeat.php', function(req, res){ // lol not php!
db.sadd('heartbeats', req.query);
res.send('KTHXBAI');
});
app.listen(3000);
tail -s 30 -n 1 -f --pid=/var/run/redis.pid appendonly.aof | nc -u mothership.nilicule.example
daemonize yes
pidfile /var/run/redis.pid
port 6379
unixsocket /tmp/redis.sock
unixsocketperm 755
timeout 0
tcp-keepalive 0
loglevel warning
logfile stdout
databases 1
stop-writes-on-bgsave-error no
rdbcompression no
rdbchecksum no
dir ./
# requirepass foobared
maxclients 10000
maxmemory <bytes>
maxmemory-policy noeviction
appendonly yes
appendfilename appendonly.aof
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage no
lua-time-limit -1
slowlog-log-slower-than -1
# slowlog-max-len 128
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 100
aof-rewrite-incremental-fsync yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment