Networks need to have accounting in addition to authorization and authentication. Accounting ensures proper use of the resources, this means that everyone gets to use the services in a fair manner. Network throttling enables accounting in the web services. This is a simple recipe that offers a throttling service to the web requests.
Throttling requests with RequestsThrottler
Getting ready
We use requests_throttler Python module to throttle the web requests. First, install the module and configure our recipe using the following script:
$ sh 11_10_requests_throttling.sh #!/bin/bash #################################################### # Python Network Programming Cookbook, Second Edition --
Chapter - 11 #####################...