|
|
|
|
|
by Veserv
16 hours ago
|
|
The client does not need to know the one-way latency to the endpoint. In antiquated congestion control algorithms, the point of the congestion window is to tune bandwidth usage. The initial congestion window is thus intended to be a safe, initial value of bandwidth usage. However, as I pointed out, the initial congestion window does not actually correspond to a initial bandwidth usage, instead being highly dependent on one-way latency to the endpoint. However, the fact that it is "safe" indicates that the "safe" initial value of bandwidth usage is within that massive range. Choosing a initial packet bandwidth instead of initial congestion window removes the one-way latency dependency of the initial bandwidth usage. However, that means we need to calculate what "safe" initial value to use. As we already established that the initial congestion window is broadly "safe", but the extremes for low latency environments are obviously not "safe", we should choose a modestly conservative value within that range as the initial packet bandwidth for the average case which should result in global network utilization looking nearly identical to how it currently looks. Thus a choice of 100 ms as the "default" latency for a 10-packet window resulting in a 150 KB/s "safe" initial packet bandwidth. Obviously, choice of parameter can be changed, maybe 300 ms or 30 ms could be a more reasonable estimate, but it is unlikely to be too far off from that estimate as a 1 s "default" latency seems much too high for anything within normal. The initial connection window should not be any more privileged than any other choice of initial receiver window. In QUIC this is largely true as it is largely managed as just another stream subject to regular congestion control, resends, and reordering. Any initial receiver window is a decision as to the amount of memory resources you will accept to handle connection establishment and any initial data pipelined relative to the connection establishment you wish to receive. You should probably tune this to fit your average small-connection use case on your endpoint which would enable you to service a entire request, including handshake, in 1 RTT and allow resource reclamation in 1.5 RTT. > The problem is that I can exhaust the RAM of your server with orders of magnitude fewer connections now. So? It is not like you need to reserve the entire initial receiver window worth of memory upfront. You can just allocate the amount of resources directly in proportion to the amount of data received. With such a scheme there is no way for them to amplify their memory usage or bandwidth usage. So, a attacker would still need to send the same amount of data in a DDoS with the only advantage being they need fewer connections so I guess you can take someone down with 1/10th the number of IP addresses? Is that the concern? |
|
It’s called a slow loris attack. I send you all but the last packet and then wait so you’re at your worst case, forcing you to keep the maximal amount of memory around. I can also send packets out of order intentionally so you’re stuck holding them in kernel buffers and can’t process.