Skip to content

Commit d0fe804

Browse files
authored
Add reuseport to redirector listen statements
This enables nginx's [socket sharding technique](https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/), which improves latency and parallelization. We don't expect the servers listening on port 80 to be handling massive amounts of traffic, but just in case, it's best to be doing things as well as possible.
1 parent 0d05c37 commit d0fe804

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nginx_conf.d/redirector.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
server {
22
# Listen on plain old HTTP and catch any hostname for redirect to HTTPS
3-
listen 80 default_server;
4-
listen [::]:80 default_server;
3+
listen 80 default_server reuseport;
4+
listen [::]:80 default_server reuseport;
55

66
# Pass this particular URL off to the certbot server for it to be able to
77
# authenticate with letsencrypt and get the HTTPS certificates.

0 commit comments

Comments
 (0)