Twemproxy flow
13
Twemproxy Flow [email protected]
-
Upload
dae-myung-kang -
Category
Documents
-
view
4.648 -
download
0
Transcript of Twemproxy flow
Twemproxy Flow [email protected]
Twemproxy • Server Side Proxy For Memcache, Redis
• Made by Twitter.
• Github.com/twitter/twemproxy
Recv Loop(common)
core_loop
core_core
core_recv
msg_recv
Recv Loop(client-server)
Send Loop(common)
core_loop
core_core
core_send
msg_send
Send Loop(client-server)
Message • Using Memory Pool
• Using mbuf
Message-req_get
req_get
msg_get
rsp_get
_msg_get
Processing ……
req_put rsp_put
mbuf • Using chained buffer
• Using sendv, writev
mbuf
struct iovec array[]
Mbuf->pos array[0].iov_base
array[0].iov_len mlen
Mbuf->pos array[n].iov_base
array[n].iov_len mlen
mbuf
Why is Twemproxy Fast? • Using mbuf and avoiding buffer copy.
– Just forward packet.
Thank you