3 ms·
How do you think the packets containing HTTP information get to user space?
by secondcoming 6y ago
How do you think the packets containing HTTP information get to user space?
- tsimionescu 6y agoI mean, the TCP/IP stack doesn't normally know much about what the TCP payload is. For example, there is no logic in the TCP/IP stack that implements the TLS side, no logic that knows about what an HTTP header is, no logic that knows how HTTP/2 multiplexes requests over TCP connections etc. Sure, the kernel is implementing the TCP/IP stack, but once the right socket has been identified based on IP address and TCP port, and once the packet has been re-assembled, all checksums verified, and the ACK sent to the sender, the bytes of the TCP payload are delivered to the user-space read() or equivalent call, and it's up to user space code to interpret that as an encrypted HTTP request or response, decide if the entire request has been received etc. This is why OpenSSL or GnuTLS are libraries that you can find on your system. And the actual HTTP implementation is part of Apache or NGINX or other web servers, or by browsers and other clients.
- secondcoming 6y agoDid you read the article?
- tsimionescu 6y agoWhat part of the article do you think contradicts my explanation? Edit: maybe I still wasn't clear enough. All I'm saying is that, whether the TCP/IP stack is in kernel or user space, the specific HTTP(S) handling is always in user-space in all OSS that I know of - so there is no choice to be made for HTTP itself in this regard. You can put any HTTP 1, 2 or 3 implemention that you like over either DPDK or the traditional Linux TCP/IP stack.
- dang 6y agoCould you please review the site guidelines? https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html They explicitly ask commenters not to post like this.