twitter / twemproxy

A fast, light-weight proxy for memcached and redis
Apache License 2.0
12.13k stars 2.06k forks source link

Q: still copy after each msg_parsed?? #674

Open skygragon opened 2 years ago

skygragon commented 2 years ago

mbuf_split is called after each command parsed? what if client send multiple commands in pipeline?

image

TysonAndre commented 2 years ago

Duplicate of https://github.com/twitter/twemproxy/issues/158 - see discussion there.

The splitting logic is still correctly splitting the buffers

In practice, having a small default mbuf size limits the worst case performance impact of splitting commands if a client does support pipelining outgoing commands