High throughput in low latency in tcp raw

is there any docs on creating proper tcp server like greatest servers that handle million and billion user and low latency

What docs? Where? Or is this a question?

Most docs you would find would be the low hanging fruit that rust makes relatively simple, like parsing asynchronously so you can start processing before the entire request has arrived, sharing threads across connections like you get automatically with tokio or basic TCP / HTTP protocol options like keep-alive.

You might want to check the RFCs for TCP extensions you may want to support, though my understanding is support for the juicy looking ones like jumbo frames and fast start are pretty anemic on the public Internet.

Later HTTP versions make more efficient use of TCP, at the cost of complexity, you will want to get around to those eventually though.

If your really want to get into the down and dirty, steal the homework of the top ranked implementations:

Be aware, though, that performance and pretty much every other requirement are at odds, and what "performance" means is very specific to the workload. Not many people need something that can serve "hello world" to 15 million users per second.

1 Like