-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure timeouts & some improvements #10
Conversation
To prevent denial of service attachs, such as http slow attack. * https://blog.qualys.com/vulnerabilities-research/2011/11/02/how-to-protect-against-slow-http-attacks * https://www.acunetix.com/blog/web-security-zone/hardening-nginx * https://www.upguard.com/blog/how-to-build-a-tough-nginx-server-in-15-steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments...
@zacblazic I think you're missing a |
ff322e0
to
94db3ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great additions! 🎖️ + 🏆
Because this only applies when serving static content, which we'll not be doing directly from the proxy, only from upstream servers.
Resets timed out connections which avoids keeping an already closed socket with filled buffers in a closing (FIN_WAIT1) state for a long time. * http://nginx.org/en/docs/http/ngx_http_core_module.html#reset_timedout_connection
Prefer to let it be the default, we don't really need to have this set here.
753bc21
to
eb79517
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments ... 💬
Co-authored-by: King'ori Maina <j@kingori.co>
Co-authored-by: King'ori Maina <j@kingori.co>
Co-authored-by: King'ori Maina <j@kingori.co>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give this a spin. 🌪️
config/log.conf
Outdated
@@ -8,10 +8,12 @@ log_format main_json escape=json | |||
'"body_bytes_sent":"$body_bytes_sent",' | |||
'"host":"$host",' | |||
'"http_connection":"$http_connection",' | |||
'"http_upgrade":"$http_upgrade",' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. Not alphabetical. 😅 Nit-pick.
Overwrites the command in the base image which specifies "daemon off". Ensure we're not passing "daemon off" twice, which resultes in an error.
The main goal of this change is to configure timeouts that work well with the default idle timeout of an upstream load balancer (i.e. 60 seconds).
Additionally brings in some other changes, all of which were inspired by ingress-nginx.