Skip to content

Commit cd2a0ec

Browse files
committed
📦 Update comments and the hash bucket size.
1 parent 96ef3a7 commit cd2a0ec

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

nginx.conf

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# User & group that will be used by worker processes.
2-
# For security use a user & group with limited previleges.
2+
# For security use a user & group with limited privileges.
33
user www-data www-data;
44

55
# The file that will store a processes id of the main process.
@@ -31,24 +31,26 @@ http {
3131

3232
# Max size & bucket size for the server names hash table.
3333
server_names_hash_max_size 1024;
34-
server_names_hash_bucket_size 64;
34+
server_names_hash_bucket_size 32;
3535

3636
# Max size & bucket size for the mime types hash table.
3737
types_hash_max_size 2048;
38-
types_hash_bucket_size 64;
38+
types_hash_bucket_size 32;
3939

4040
# Speed up static file transfers by using the sendfile() rather than the
4141
# read() and write() combination. sendfile() has the ability to transfer
42-
# data from file descriptor.
42+
# data from the file descriptor.
4343
sendfile on;
4444

45-
# Optimize the amount of data that being sent at once. Prevent it from
46-
# sending a partial frame. This will increases throughput, since TCP frames
47-
# will be filled up before being sent out.
45+
# Optimize the amount of data that is being sent at once. Prevent Nginx
46+
# from sending a partial frame. As a result it will increases the
47+
# throughput, since TCP frames will be filled up before being sent out.
48+
# You also need to activate the `sendfile` option.
4849
tcp_nopush on;
4950

50-
# By default Nagle will delay sending the data for 200ms. To force a socket
51-
# to send the data in its buffer immediately we can turn this option on.
51+
# By default, the TCP stack implements a mechanism to delay sending the
52+
# data up to 200ms. To force a socket to send the data in its buffer
53+
# immediately we can turn this option on.
5254
tcp_nodelay on;
5355

5456
# A timeout of which a keep-alive connection will stay open. Longer
@@ -87,7 +89,7 @@ http {
8789
# 75% reduction for most ASCII files (almost identical to level 9).
8890
gzip_comp_level 5;
8991

90-
# Don't compress small file that is unlikely to shrink much. The small
92+
# Don't compress a small file that is unlikely to shrink much. The small
9193
# file is also usually ended up in larger file sizes after gzipping.
9294
gzip_min_length 256;
9395

0 commit comments

Comments
 (0)