Skip to content

Conversation

@itskingori
Copy link
Member

See commits for details. Each commit is an idea.

@itskingori itskingori force-pushed the update_and_fix_logged_information branch from 49e5647 to 8fbeba3 Compare February 22, 2021 22:01
@itskingori itskingori force-pushed the update_configuration branch 2 times, most recently from 44c8fba to b41d975 Compare February 23, 2021 08:24
Base automatically changed from update_and_fix_logged_information to master February 23, 2021 11:03
@itskingori itskingori marked this pull request as ready for review February 23, 2021 11:04
@itskingori itskingori requested a review from a team as a code owner February 23, 2021 11:04
@itskingori itskingori changed the title Update configuration to improve performance and realibility Update configuration to improve performance and reliability Feb 23, 2021
Comment on lines +9 to +11
* Set `proxy_connect_timeout` to `60s` (same as default).
* Set `proxy_send_timeout` to `60s` (same as default).
* Set `send_timeout` to `60s` (same as default).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I set these explicitly figuring it's better to know what these values are at a glance without having to reference the niginx docs.

Copy link
Member Author

@itskingori itskingori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now ready for final ... 👀

@itskingori itskingori merged commit b87f59b into master Feb 24, 2021
@itskingori itskingori deleted the update_configuration branch February 24, 2021 14:20
Copy link
Member

@zacblazic zacblazic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions:

sendfile on;
tcp_nopush on;

client_max_body_size 500m;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for increasing to 500m?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not real reason other than it feels like a nice round number 😅 ... 400m feels very random.

proxy_connect_timeout 60s;
proxy_read_timeout 600s;
proxy_send_timeout 60s;
send_timeout 60s;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we setting these to their defaults just for visibility?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. For visibility.

tcp_nopush on;

client_max_body_size 500m;
client_body_buffer_size 128k;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the intention behind increasing this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some links in the commit for more context but the TL;DR is that it's to:

  1. Reduce the number of "a client request body is buffered to a temporary file" warning we get.
  2. Reduce the number of times nginx has to write file (search for above string in logs to see). Memory is faster. Also since we have client_max_body_size also figured uploads would benefit too by having to write even less.

It's not that great of an issue, more like a nice-to-have rather than must-have. FYI, you can see evidence of this below ...

Screenshot 2021-02-25 at 14 31 40


client_max_body_size 500m;
client_body_buffer_size 128k;
client_body_timeout 300s;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we should align the client_body_timeout value with the client_header_timeout?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections to that. Should probably have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants