Skip to content

Instantly share code, notes, and snippets.

@virgilioneto
virgilioneto / site-url.com.conf
Created December 26, 2016 13:45
NGINX Reverse Proxy
upstream your-application {
server 0.0.0.0:8080 weight=1 fail_timeout=1s;
server 0.0.0.0:8081 weight=1 fail_timeout=1s;
}
server {
listen 80;
server_name site-url.com;
location / {
@virgilioneto
virgilioneto / agenda.js
Last active September 30, 2016 20:40
NodeJS Agenda module concurrency test
const Agenda = require(`agenda`);
const agenda = new Agenda({db: {address: "MONGODB_CONNECTION_STRING_HERE"}});
/**
* Concurrency set to 100
*/
agenda.maxConcurrency(100);
/**
* Lock life time set to 2 seconds