I read it about metrics concept of Hystrix but I didn't understand why use rows and buckets within rolling window.
Why in buckets and not total value?
Apparently this is merely a performance optimization.
In Hystrix writes to metrics happen at the volume of command executions, which is in the 1000s of executions/second on a single instance.
If you would have to re-calculate the aggregate view of metrics every time a single metric was received, this would be prohibitively expensive.
Instead, they found that putting metrics into time-buckets allowed to only recalculate aggregate metrics on bucket boundaries without sacrificing much accuracy.