Skip to content

Instantly share code, notes, and snippets.

@flashultra
flashultra / nginx-tuning.md
Created June 17, 2023 18:23 — forked from ironbyte/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

import haxe.ds.Vector;
import haxe.Timer;
import haxe.io.Bytes;
import haxe.crypto.BaseCode;
class BCrypt
{
public static inline var Revision2 = "2";
public static inline var Revision2A = "2a";
public static inline var Revision2B = "2b";
@flashultra
flashultra / BCrypt.hx
Last active March 26, 2019 07:26
BCrypt Haxe source
import haxe.Timer;
import haxe.io.Bytes;
import haxe.crypto.BaseCode;
class BCrypt
{
public static inline var Revision2 = "2";
public static inline var Revision2A = "2a";
public static inline var Revision2B = "2b";
public static inline var Revision2X = "2x";
@flashultra
flashultra / BCrypt.java
Created March 24, 2019 16:15
BCrypt java source
import java.util.Arrays;
import java.util.Random;
public class BCrypt {
public static final String Revision2 = "2";
public static final String Revision2A = "2a";
public static final String Revision2B = "2b";
public static final String Revision2X = "2x";
public static final String Revision2Y = "2y";