In mounting an HTTPAdapter
onto a requests.Session()
I came into an issue where connections eventually were discarded because I was issuing async calls (for the same host, i.e. belonging to the same connection pool) in batches where each batch size was higher than the maximum pool size. The solution, of course, was to increase the maximum pool size.
What I want to know is what are the tradeoffs between issuing fewer iterations of larger batch sizes (with larger maximum pool sizes) versus greater iterations of smaller batch sizes (with smaller pool sizes). What is wrong with scaling your pool size to infinity and issuing all async calls (belonging to the same pool) in one batch request?