bundles/nginx: determine worker processes by cpu count by default

This commit is contained in:
Franzi 2020-08-30 10:32:29 +02:00
parent 768bad7b77
commit b24253a64b
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -17,8 +17,16 @@ defaults = {
},
},
'nginx': {
'worker_processes': 4,
'worker_connections': 1000,
'worker_connections': 768,
},
}
@metadata_reactor
def worker_processes(metadata):
return {
'nginx': {
'worker_processes': metadata.get('vm/cpu', 2),
},
}