Skip to content

Commit d789cc7

Browse files
committed
warpctl: config increase listen backlog
also make sure linux selects epoll
1 parent 383fb2f commit d789cc7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

warpctl/config.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,6 +1612,7 @@ func (self *NginxConfig) addNginxConfig() {
16121612
worker_connections {{.workersPerCore}};
16131613
multi_accept on;
16141614
accept_mutex on;
1615+
use epoll;
16151616
}
16161617
`, map[string]any{
16171618
"concurrentClients": concurrentClients,
@@ -1717,8 +1718,8 @@ func (self *NginxConfig) addNginxConfig() {
17171718

17181719
self.block("server", func() {
17191720
self.raw(`
1720-
listen 80 default_server reuseport;
1721-
listen [::]:80 default_server reuseport;
1721+
listen 80 default_server reuseport backlog=65535;
1722+
listen [::]:80 default_server reuseport backlog=65535;
17221723
server_name _;
17231724
`)
17241725

@@ -2096,8 +2097,8 @@ func (self *NginxConfig) addLbBlock() {
20962097
// Use it in the first lb config only.
20972098
if 0 == lbHostIndex {
20982099
self.raw(`
2099-
listen 443 ssl reuseport;
2100-
listen [::]:443 ssl reuseport;
2100+
listen 443 ssl reuseport backlog=65535;
2101+
listen [::]:443 ssl reuseport backlog=65535;
21012102
`)
21022103
} else {
21032104
self.raw(`

0 commit comments

Comments
 (0)