Join our book community on Discord
https://packt.link/PyNetCommunity
In the previous chapters, we have been interacting with the network devices directly via API or other Python libraries that abstracted us from the low-level interactions with the remote device. When we need to interact with multiple devices, we use loops to allow us pragmatically execute commands. One issue that we might start to see is that the end-to-end process begins to slow down when we need to interact with many devices. The bottleneck is usually the time spent waiting between the time we send the command until we receive the proper response from the remote device. If we need to spend 5 seconds of wait time per operation, we could wait for a few minutes when we need to operate on 30 devices.
This is partially true because our operations are sequential. We are only operating on one device at a time, in sequence. What if we can process multiple devices at the same time? That would speed things up, right? Yes,...