I have a number of processes which are communicating between cloud and my application. Now I want to assign bandwidth to those processes through my code only. after going through some links to find out how to do that. And came up with this solution : https://www.codeproject.com/Articles/18243/Bandwidth-throttling
If there is any other way in which i can achieve this Bandwidth throttling, Please let me know. Any reference documents or links regarding this will be very much helpful.
You can try the below techniques,
You can define a desired data transfer rate and a current transfer rate. Current transfer rate depends upon the number of bytes that you can per sec send/receive to/from the cloud, you can increase/decrease the Current transfer rate by a scale factor X but this should not increase beyond desired transfer rate. You can make a custom class on socket class to make your read/write functions.
Second one is a predefined amount of data for only which you will execute a read/write operation on the socket. You can consider this amount of data as a unit/token which qualifies for a read/write operation. This technique also you can add to your custom class.