iheartradio / kanaloa

Make your service more resilient by providing protection against traffic oversaturation
http://iheartradio.github.io/kanaloa
Other
124 stars 13 forks source link

A fast direct mode #172

Open kailuowang opened 8 years ago

kailuowang commented 8 years ago

when the latency is below certain threshold, a pushing dispatcher can be in a direct mode that bypass Queue and Worker and directly send the work to backend without any concurrency throttling.

When without any CPU pressure, kanaloa on average adds a 0~2 ms (see comparison below) overhead on a MacbookPro. But when the traffic is high CPU pressure could impose high penalty on latency (more than 100%) and throughput (more than 50%) , a direct mode is justified when CPU becomes bottleneck.

Low loads Without kanaloa

screen shot 2016-08-17 at 11 47 29 am

Low load with kanaloa

screen shot 2016-08-17 at 11 48 28 am

High load without kanaloa (lots of CPU pressure)

screen shot 2016-08-17 at 11 49 30 am

High load with kanaloa (lots of CPU pressure)

screen shot 2016-08-17 at 11 50 13 am