Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add congestion avoidance #11

Open
mucaho opened this issue Sep 24, 2014 · 0 comments
Open

Add congestion avoidance #11

mucaho opened this issue Sep 24, 2014 · 0 comments

Comments

@mucaho
Copy link
Owner

mucaho commented Sep 24, 2014

Currently only basic congestion control is done when retransmitting packets. No congestion control is performed when sending new packets.

The problem is that the application is "in control", as it pushes/pulls data to/from the protocol. The protocol should not delay sending of packets due to highly congested network; It should inform the application about the current status of network congestion and let the application decide how much to throttle amount of data / rate of data that is being send. (e.g. Protocol.getCongestionFactor(): double -> if its greater than 1, application could send more data -> if its less than 1, application could send less data).

Investigate existing congestion control algorithms - look at their characteristics
preferably use the ones which do not send extra metadata about network congestion; preferably use the ones that consider RTT, RTT variance, (estimated) packet loss, the form of the lastTransmissionAcks field and the offset from sender side transmissionId and received transmissionAck (as well as the history of this offset - mean/deviation); preferably use the ones which are a bit more aggressive:

Notes on form of the lastTransmissionAcks vector field:
vector v
v[i] = {0, 1} ... 0 = acked, 1= notAcked
i € {0, n}, 0 is most recent, n is oldest transmissionAck:

  • weightingFactor = #{i: v[i] = 0} / n ... the more notAcked, the greater the factor
  • sum_1 = sum(i: 0..n) v[i] * log(n/i) <=> v[i] != v[i+1] .... most recent not acked carry most weight
  • sum_2 = sum(i: 0..n) v[i] * log(n/i) * v[i+1] * log(n/i) <=> v[i] == v[i+1] ... the greater a continuous gap of not acked, the multiplicative more weight it has
  • score = (sum_1 + sum_2) * weightingFactor

Investigate fast retransmit -> resend packets that are missing in lastAcks field: this could work if we send at @ 10 Hz (every 100ms), but does not make sense if we send @ 120 Hz (every 9 ms), as due to jitter many packets get send before the out of order packet arrives -> ADDED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant