Thu, 08 Jul 2021 18:21:59 +0200 net.http: Send entire HTTP request header as one write
Kim Alvefur <zash@zash.se> [Thu, 08 Jul 2021 18:21:59 +0200] rev 11665
net.http: Send entire HTTP request header as one write When opportunistic writes are enabled this reduces the number of syscalls and TCP packets sent on the wire. Experiments with TCP Fast Open made this even more obvious. That table trick probably wasn't as efficient. Lua generates bytecode for a table with zero array slots and space for two entries in the hash part, plus code to set [2] and [4]. I didn't verify but I suspect it would have had to resize the table when setting [1] and [3], although probably only once. Concatenating the strings directly in Lua is easier to read and involves no extra table or function call.
Thu, 08 Jul 2021 17:57:44 +0200 net.server_epoll: Immediately attempt to read from newly accepted connections
Kim Alvefur <zash@zash.se> [Thu, 08 Jul 2021 17:57:44 +0200] rev 11664
net.server_epoll: Immediately attempt to read from newly accepted connections This may speed up client-first protocols (e.g. XMPP, HTTP and TLS) when the first client data already arrived by the time we accept() it. If LuaSocket supported TCP_DEFER_ACCEPT we could use that to further increase the chance that there's already data to handle. In case no data has arrived, no harm should be done, :onreadable would simply set the read timeout and we'll get back to it once there is something to handle.
Thu, 08 Jul 2021 17:52:59 +0200 net.server_epoll: Separate handling of new incoming and outgoing connections
Kim Alvefur <zash@zash.se> [Thu, 08 Jul 2021 17:52:59 +0200] rev 11663
net.server_epoll: Separate handling of new incoming and outgoing connections The :init method is more suited for new outgoing connections, which is why it uses the connect_timeout setting. Depending on whether a newly accepted connection is to a Direct TLS port or not, it should be handled differently, and was already. The :starttls method sets up timeouts on its own, so the one set in :init was not needed. Newly accepted plain TCP connections don't need a write timeout set, a read timeout is enough.
Sat, 31 Oct 2020 00:33:29 +0100 net.server_epoll: Ensure timeout after closing
Kim Alvefur <zash@zash.se> [Sat, 31 Oct 2020 00:33:29 +0100] rev 11662
net.server_epoll: Ensure timeout after closing This should make sure that if there's data left to be written when closing a connection, there's also a timeout so that it doesn't wait forever.
Sun, 04 Jul 2021 15:11:53 +0200 core.loggingmanager: Disable pretty printing when not connected to a tty
Kim Alvefur <zash@zash.se> [Sun, 04 Jul 2021 15:11:53 +0200] rev 11661
core.loggingmanager: Disable pretty printing when not connected to a tty Things can behave unexpectedly when fed ANSI escape codes.
Sun, 04 Jul 2021 15:11:07 +0200 util.pposix: Bind isatty(3)
Kim Alvefur <zash@zash.se> [Sun, 04 Jul 2021 15:11:07 +0200] rev 11660
util.pposix: Bind isatty(3) Useful for disabling certain behavior, ANSI colors etc when not connected to a terminal.
Sun, 04 Jul 2021 02:33:15 +0200 util.prosodyctl.check: Normalize away trailing dot in some messages too
Kim Alvefur <zash@zash.se> [Sun, 04 Jul 2021 02:33:15 +0200] rev 11659
util.prosodyctl.check: Normalize away trailing dot in some messages too
Sun, 04 Jul 2021 01:33:53 +0200 util.prosodyctl.check: Normalize potential to form without trailing '.'
Kim Alvefur <zash@zash.se> [Sun, 04 Jul 2021 01:33:53 +0200] rev 11658
util.prosodyctl.check: Normalize potential to form without trailing '.' In some cases you might end up with both 'xmpp.example.com' and 'xmpp.example.com.', which are the same thing so no point in doing the same checks twice.
Sun, 04 Jul 2021 01:32:04 +0200 util.prosodyctl.check: Point out if A/AAAA exists despite disabled IPvX
Kim Alvefur <zash@zash.se> [Sun, 04 Jul 2021 01:32:04 +0200] rev 11657
util.prosodyctl.check: Point out if A/AAAA exists despite disabled IPvX Clients would try to connect and receive an error or timeout, increasing the time it takes to establish a connection. Probably not what you want. If you really want IPv6 or IPv4 disabled, best remove the A or AAAA record.
Sun, 04 Jul 2021 01:29:47 +0200 util.prosodyctl.check: Warn if both use_ipv4 and use_ipv6 are set to false
Kim Alvefur <zash@zash.se> [Sun, 04 Jul 2021 01:29:47 +0200] rev 11656
util.prosodyctl.check: Warn if both use_ipv4 and use_ipv6 are set to false Why would you do this?!
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip