Skip to content

Instantly share code, notes, and snippets.

View ankibalyan's full-sized avatar

Ankit Balyan ankibalyan

View GitHub Profile
@ankibalyan
ankibalyan / mongodb.md
Created December 16, 2016 05:40
#mongodb cheat sheet

MongoDB cheat sheet

Overview

Overview

MongoDB is a document database that provides high performance, high availability, and easy scalability.

  • Document Database
@ankibalyan
ankibalyan / tuning_nginx_nodejs
Created December 16, 2016 13:04 — forked from carlessistare/tuning_nginx_nodejs
Tuning Nginx for heavy loading with nodejs as upstream. Short requests and a lot of concurrence.
# This number should be, at maximum, the number of CPU cores on your system.
# (since nginx doesn't benefit from more than one worker per CPU.)
worker_processes 8;
# Determines how many clients will be served by each worker process.
# (Max clients = worker_connections * worker_processes)
# "Max clients" is also limited by the number of socket connections available on the system (~64k)
# run ss -s and u'll see a timewait param
# The reason for TIMED_WAIT is to handle the case of packets arriving after the socket is closed.