nanobox-io / bootstrap

Collection of scripts used to bootstrap a nanobox host machine.
MIT License
4 stars 5 forks source link

sysctl settings to tune the network #48

Open notxarb opened 6 years ago

notxarb commented 6 years ago

It might be a good idea to do some tuning of the system (mostly network) for apps with lots of concurrent connections.

This is mostly important for the portal instance: net.ipv4.tcp_rfc1337 = 1 net.ipv4.tcp_tw_reuse = 1 net.ipv4.ip_local_port_range = 1024 65535

maybe a few more options? https://easyengine.io/tutorials/linux/sysctl-conf/ https://wiki.ubuntu.com/ImprovedNetworking/KernelSecuritySettings

notxarb commented 6 years ago

it looks like tcp_tw_reuse only matters for connections initiated by the server, so from portal to backend nodes, and doesn't really do much for connections to clients connecting to portal. https://vincent.bernat.ch/en/blog/2014-tcp-time-wait-state-linux#summary