|
|
|
|
|
by shenedu
4883 days ago
|
|
http-kit needs a few kilobytes of memory (buffer for parsing HTTP request, maintain state, etc) for a connection. The thread model used by http-kit: a dedicated thread(server-loop), only doing events IO and parsing, when done, queued the request for a thread poll to take it, thread pool compute the response, queue it for the server-loop thread to write it back to client. Since epoll and kqueue's readiness selection is O(1), idle connections does not hurt latency at all. |
|