Skip to content

Instantly share code, notes, and snippets.

View Mikodes's full-sized avatar
🦊

Mike Lopez Mikodes

🦊
View GitHub Profile
@Mikodes
Mikodes / nginx-tuning.md
Created October 27, 2017 15:26 — forked from denji/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.

class LadderPrize(Prize):
type = StringField(default='TICKET')
ladder = ObjectIdField(db_field='ladder')
class PermanencePrize(Prize):
type = StringField(default='PERMANENCE')
competition = ObjectIdField(db_field='competition')
competition_type = StringField(db_field='ct')
gulp.task('less', function (cb) {
gulp.src([__dirname + '/app/less/bootstrap.less'])
.pipe(less({
paths: [path.join(__dirname, '/app/less', 'includes')]
}))
.pipe(gulp.dest(__dirname + '/dist/css/'))
.on('end', cb)
.on('error', function (err) {
console.log(err.message);
"pool_config": {
"register_fee":15.00, # fee de entrada
"only_garantize": false, #eso a tru cuando solo es premio garantizado i no tb el bote acumulado
"garantize_prize": 0.00, #cantidad de premio garantizado
"register_pot": true, # esto setea si se tiene en cuenta el bote acumulado por entradas o no ,
"position_type": "m", #por ahora siempre a m = manual
"prizes_config": [
{"from_position": 1, "to_position": 1, "type": {"amount": 90.00, "_cls": "PointPrize"}}, # Precio Puntos
{"from_position": 2, "to_position": 2, "type": {"amount": 10.00, "_cls": "CashPrize","only_play":false}} # ,Estructura para Dinero , el only_play se stea a true , si se marca la casilla de dinero torneo, esto significa que ese dinero se utiliza solo para registrarse en partidas
]
{
"name": "Tournament 4 Teams",
"register_mode": "OPEN",
"game": "5475f8843207a847e415557c",
"region": "577cbd9595369e10448465e1",
"config_id": "595e05c866bc5a5ca6b1e3ab",
"featured": false,
"featured_image": null,
"background_image": null,
"cover_image": null,
{
"name": "5vs5 Configuration 2017 Mike",
"game": "5475f8843207a847e415557c",
"mode": "cl",
"type": {
"num_teams": 2,
"num_players": 5,
"_cls": "SingleMatch"
},
"rounds": [
{
"name": "5vs5 Configuration 2017 Mike",
"game": "5475f8843207a847e415557c",
"mode": "cl",
"type": {
"num_teams": 2,
"num_players": 5,
"_cls": "SingleMatch"
},
"rounds": [
TIPO MATCH COMPETITIVO
"type": {
"num_teams": 2,
"num_players": 5,
"_cls": "SingleMatch"
},
TIPO DEATHMATCH
@Mikodes
Mikodes / nginx.conf
Created February 29, 2016 21:58 — forked from calebwoods/nginx.conf
Sample Nginx config for deployment of Angular.js app
server { listen 80;
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/public;
charset utf-8;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
#
# Slightly tighter CORS config for nginx
#
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs
#
# Despite the W3C guidance suggesting that a list of origins can be passed as part of
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox)
# don't seem to play nicely with this.
#