mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Disable Nageling on TCP clients
Nageling, due to the nature of keep-alive connections, slows them down considerably, especially on Linux. On Linux, a 500ms delay is introduced when sending back the last packet of a response over a persistent connection. This option was tested on OS X and showed minimal effect to performance.
This commit is contained in:
parent
d0a2fac2ac
commit
8d0515e2c8
1 changed files with 4 additions and 0 deletions
|
@ -126,6 +126,10 @@ module Puma
|
|||
end
|
||||
|
||||
def process_client(client)
|
||||
if client.kind_of? TCPSocket
|
||||
client.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
|
||||
end
|
||||
|
||||
begin
|
||||
while true
|
||||
parser = HttpParser.new
|
||||
|
|
Loading…
Reference in a new issue