Netflix / ribbon

Ribbon is a Inter Process Communication (remote procedure calls) library with built in software load balancers. The primary usage model involves REST calls with various serialization scheme support.
Apache License 2.0
4.56k stars 1.24k forks source link

Why does ribbon ServerStats use tumbling windows instead of sliding ones? #305

Open trigan-d opened 8 years ago

trigan-d commented 8 years ago

I'm trying to rely on ServerStats.getFailureCount() and ServerStats.getResponseTimeAvgRecent() in order to build my own load balancing rule. And I'm confused by the fact that those methods return the values for the PREVIOUS time window/buffer (1 second actually). I'm going to make the window size configurable. We need it to be a bit longer, as we don't have such a heavy traffic as Netflix has. Thus I would get kinda obsolete stats, that were collected N seconds ago. The question is: why don't you use sliding (aka rolling) windows for ServerStats? AFAIR, Servo should contain some appropriate monitors that could be used here. Is there any reason to use tumbling windows? Maybe there is some idea behind that I don't yet grasp? Thanks in advance!

pparth commented 8 years ago

+1