Round robin on connection level (more unfairness)
The function connection_bucket_round_robin() returns the respective read/ write limit for a single connection. It prevents a connection from taking over.
Nevertheless, the function depends on the current fill level of the token bucket, what results in unfairness among the connections. In order to illustrate this behavior, I plotted the return values of the function (y-axis) in ratio to the bucket fill level (x-axis) -- cf. roundrobin.pdf. I also simulated this property with five concurrent connections and the assumption that connections always read as much as they get granted -- cf. rrsimulation.pdf.
Indeed this is not a huge difference/ unfairness and I would hope that overall it is somewhat balanced. Although, I would suggest to implement the round robin with a constant return value.
Trac:
Username: Flo