I am currently using a TCP Server written with tokio that does the following:
I am using tokio-codec in order to create a Framed object out of a TcpStream.
-
poll
framed for any incoming messages - Do processing on the incoming message request
- Create a Rust struct that represents the format of the message response
- Use framed
start_send
and then framedpoll_complete
in order to transport message.
I've noticed that the thoroughput/scalability is quite good at high loads, and the async portion works well, but the latency of individual messages themselves is not great, even at one request per second. Has anyone had a similar experience with my setup. I am not sure if this is related to my use of tokio-codec or not.