HiSock
Application scenario: This feature is used for stable and clear TCP forwarding paths to reduce the overhead of the kernel protocol stack and improve forwarding efficiency.
Technical principle: In traditional network forwarding paths, packets typically traverse multiple stages, including user-space applications, the socket layer, the TCP/IP stack, Netfilter, routing lookup, queue scheduling, and driver reception/transmission. For scenarios such as proxy forwarding, transparent forwarding, gateways, container networks, and service meshes, some traffic exhibits well-defined forwarding relationships and stable connection states. Repeatedly subjecting such traffic to the full protocol stack processing incurs unnecessary CPU overhead and increases end-to-end latency. HiSock uses eBPF programs to identify connections that can be accelerated, and uses the connection context on the kernel side to record the destination route, inbound interface, and Ethernet header information. When the acceleration conditions are met, it quickly redirects packets, improving network throughput and forwarding efficiency.

Performance metrics: The performance improvement depends on the network stack overhead proportion in actual services. In scenarios with 16 MySQL instances on an 8-vCPU, 32-GB configuration, the best-case overall sysbench performance improves by approximately 2%. In scenarios with 4 Redis instances on a 2-vCPU, 10-GB configuration, peak redis-benchmark performance improves by 18% for GET and 34% for SET.
