This is following work to my last blog post

Notice that puma is making getpeername and recvfrom in every request.

42009      syscalls:sys_enter_getpeername
42009      syscalls:sys_exit_getpeername
42009      syscalls:sys_enter_recvfrom
42010      syscalls:sys_exit_recvfrom

Because, puma will reset Client instance @peerip after every request. So a new request will use the @io.peeraddr method to get the client ip.

After a TCP connection is established, client IP won’t change, if client changes IP, it will initiate a new TCP connection.

I don’t think MPTCP is popular yet, so this situation is not considered.

A PR is approved and waiting to be merged. By saving two syscalls on every request, hello.ru benchmark shows 27% throughput improvement.