BridgeDB learns to choose a reasonable number of bridges to give out
BridgeDB should learn to give out a variable number of bridges based on the number of bridges available.
For example, if a user requests bridges with transport foo, and there are only 20 bridges with this transport, BridgeDB could choose to give out 1 bridge. If there are 21-100 bridges available, give out 2, and more than 100: 3 bridges (or the distributor maximum)
if len(ring) < 20: n_bridges_per_answer = 1 if 20 < len(ring) < 100: n_bridges_per_answer = min(2,DISTRIBUTOR_N_BRIDGES_PER_ANSWER) if len(ring) > 100: n_bridges_per_answer = DISTRIBUTOR_N_BRIDGES_PER_ANSWER
Or, BridgeDB could choose to avoid giving out more than 5 percent of bridges at a time; and return a minimum of 1 bridge and maximum of the configured DISTRIBUTOR_N_BRIDGES_PER_ANSWER
n_bridges_per_answer = min(min(len(ring) * .05,1),DISTRIBUTOR_N_BRIDGES_PER_ANSWER)