<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Michael Guy</title>
    <description>The latest articles on DEV Community by Michael Guy (@michaelguy).</description>
    <link>https://dev.to/michaelguy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4147816%2F22890f18-4e65-4c0d-82f8-d5527f8fb562.jpg</url>
      <title>DEV Community: Michael Guy</title>
      <link>https://dev.to/michaelguy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/michaelguy"/>
    <language>en</language>
    <item>
      <title>How to Estimate Proxy Bandwidth for Large-Scale Data Collection</title>
      <dc:creator>Michael Guy</dc:creator>
      <pubDate>Tue, 17 Nov 2026 21:47:51 +0000</pubDate>
      <link>https://dev.to/michaelguy/how-to-estimate-proxy-bandwidth-for-large-scale-data-collection-3ee0</link>
      <guid>https://dev.to/michaelguy/how-to-estimate-proxy-bandwidth-for-large-scale-data-collection-3ee0</guid>
      <description>&lt;p&gt;Bandwidth planning for data collection is often reduced to one question: “How many megabits per second do I need?” The useful answer depends on more than a speed label. Transfer volume, active hours, response size, concurrency, retries, protocol overhead, and target latency all affect the result.&lt;/p&gt;

&lt;p&gt;This guide develops a practical model you can reuse for authorized web collection, monitoring, and data-engineering workloads. It also explains why a 1 Gbps connection does not automatically produce 324 TB of useful data every month.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Only collect data you are authorized to access. Respect website terms, robots directives, access controls, rate limits, and applicable law.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1. Start with the units
&lt;/h2&gt;

&lt;p&gt;Network throughput is normally expressed in megabits per second (Mbps), while traffic volume is often expressed in gigabytes or terabytes. Because one byte contains eight bits, the decimal-unit conversion is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traffic in TB = Mbps × seconds ÷ 8,000,000&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For a workload running continuously for a fixed number of days:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Seconds = days × 86,400&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The reverse calculation is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Required Mbps = target TB × 8,000,000 ÷ seconds&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These equations describe theoretical transfer capacity. They assume the selected rate is sustained every second with no idle time, retries, protocol overhead, failed requests, or target-side delays.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Throughput&lt;/th&gt;
&lt;th&gt;1 day&lt;/th&gt;
&lt;th&gt;7 days&lt;/th&gt;
&lt;th&gt;30 days&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;100 Mbps&lt;/td&gt;
&lt;td&gt;1.08 TB&lt;/td&gt;
&lt;td&gt;7.56 TB&lt;/td&gt;
&lt;td&gt;32.4 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;200 Mbps&lt;/td&gt;
&lt;td&gt;2.16 TB&lt;/td&gt;
&lt;td&gt;15.12 TB&lt;/td&gt;
&lt;td&gt;64.8 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;400 Mbps&lt;/td&gt;
&lt;td&gt;4.32 TB&lt;/td&gt;
&lt;td&gt;30.24 TB&lt;/td&gt;
&lt;td&gt;129.6 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;600 Mbps&lt;/td&gt;
&lt;td&gt;6.48 TB&lt;/td&gt;
&lt;td&gt;45.36 TB&lt;/td&gt;
&lt;td&gt;194.4 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;800 Mbps&lt;/td&gt;
&lt;td&gt;8.64 TB&lt;/td&gt;
&lt;td&gt;60.48 TB&lt;/td&gt;
&lt;td&gt;259.2 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 Gbps&lt;/td&gt;
&lt;td&gt;10.8 TB&lt;/td&gt;
&lt;td&gt;75.6 TB&lt;/td&gt;
&lt;td&gt;324 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The table is a ceiling, not a delivery promise.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Add duty cycle and real-world efficiency
&lt;/h2&gt;

&lt;p&gt;Most jobs are not active 24 hours a day. Even while active, they do not convert every bit of available throughput into useful payload. A more realistic model adds two factors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Duty cycle:&lt;/strong&gt; the share of the period during which the workload is actively transferring data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficiency:&lt;/strong&gt; the share of available throughput that becomes successful, useful payload after latency, retries, failed responses, and protocol overhead.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The adjusted formula is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usable TB = Mbps × seconds × duty cycle × efficiency ÷ 8,000,000&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To size a connection for a target volume:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Required Mbps = target TB × 8,000,000 ÷ (seconds × duty cycle × efficiency)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Efficiency is not a universal constant. Measure it with a pilot run against the actual authorized targets.&lt;/p&gt;

&lt;h3&gt;
  
  
  Worked example: 100 TB in 30 days
&lt;/h3&gt;

&lt;p&gt;Suppose a collection pipeline must deliver 100 TB of useful payload in 30 days. It can run continuously, and a representative pilot shows 65% end-to-end efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Required Mbps = 100 × 8,000,000 ÷ (2,592,000 × 1.0 × 0.65)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The result is approximately &lt;strong&gt;475 Mbps&lt;/strong&gt;. A 400 Mbps tier would not meet that target under these assumptions. A 600 Mbps tier provides some operating headroom.&lt;/p&gt;

&lt;p&gt;Now assume the same job runs only 12 hours per day. The duty cycle becomes 0.5:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Required Mbps = 100 × 8,000,000 ÷ (2,592,000 × 0.5 × 0.65)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The requirement rises to approximately &lt;strong&gt;950 Mbps&lt;/strong&gt;. A nominal 1 Gbps connection is now close to the calculated minimum, leaving little room for traffic bursts or worse-than-expected target performance.&lt;/p&gt;

&lt;p&gt;This is why monthly volume cannot be inferred from the speed label alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Estimate bandwidth from request volume
&lt;/h2&gt;

&lt;p&gt;If you know the average successful response size and request rate, estimate payload throughput directly:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payload Mbps = average response size in kB × requests per second × 8 ÷ 1,000&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example, 100 successful responses per second with an average payload of 250 kB require about 200 Mbps of payload throughput:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;250 × 100 × 8 ÷ 1,000 = 200 Mbps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If 15% additional requests are caused by retries, the transfer requirement rises before protocol overhead and idle time are considered.&lt;/p&gt;

&lt;p&gt;Concurrency is not the same as requests per second. For a stable I/O-bound workload, a rough relationship is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requests per second ≈ active concurrency ÷ average response time in seconds&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fifty concurrent requests with an average response time of 0.5 seconds may approach 100 requests per second. If the average response time rises to two seconds, the same concurrency may produce only about 25 requests per second.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Measure the right variables
&lt;/h2&gt;

&lt;p&gt;Before choosing capacity, run a limited and authorized pilot that resembles production. Record at least:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;successful payload bytes;&lt;/li&gt;
&lt;li&gt;requests per second;&lt;/li&gt;
&lt;li&gt;median and 95th-percentile response time;&lt;/li&gt;
&lt;li&gt;success, retry, timeout, and block rates;&lt;/li&gt;
&lt;li&gt;active transfer time versus idle time;&lt;/li&gt;
&lt;li&gt;end-to-end useful throughput;&lt;/li&gt;
&lt;li&gt;peak throughput during bursts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For browser automation, include downloaded scripts, images, fonts, and API calls if production will load them. Measuring only the initial HTML document can significantly understate traffic.&lt;/p&gt;

&lt;p&gt;Do not increase concurrency simply to fill a connection. Target-side rate limits and application behavior remain the controlling constraints. Capacity planning should support a responsible request rate, not override it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Choose headroom deliberately
&lt;/h2&gt;

&lt;p&gt;A practical plan needs room for variation. Instead of selecting the exact calculated minimum, document a headroom policy based on observed volatility.&lt;/p&gt;

&lt;p&gt;For a stable workload, 20–30% headroom may be a reasonable starting hypothesis. Workloads with highly variable response sizes, bursty schedules, or frequent retries may require more. These are planning ranges, not guarantees; measurement should decide the final number.&lt;/p&gt;

&lt;p&gt;A useful sizing worksheet contains:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Target useful volume&lt;/td&gt;
&lt;td&gt;100 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Period&lt;/td&gt;
&lt;td&gt;30 days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Active hours per day&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pilot efficiency&lt;/td&gt;
&lt;td&gt;65%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Calculated minimum&lt;/td&gt;
&lt;td&gt;475 Mbps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Selected capacity&lt;/td&gt;
&lt;td&gt;600 Mbps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Remaining headroom&lt;/td&gt;
&lt;td&gt;about 26%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Recalculate when target mix, response size, active hours, or retry behavior changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Compare pricing models using delivered data
&lt;/h2&gt;

&lt;p&gt;A pay-per-GB price and a throughput-based fixed-duration price measure different things. Compare them only after estimating the actual useful volume the workload can deliver.&lt;/p&gt;

&lt;p&gt;For a fixed-duration plan, an effective cost per delivered GB can be estimated as:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Effective cost per GB = plan price ÷ measured useful GB delivered&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For a metered plan:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Estimated cost = billed GB × provider price per GB&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The comparison should use the same workload, period, targets, and success criteria. Avoid comparing a theoretical 24/7 capacity ceiling with a metered bill based on actual use.&lt;/p&gt;

&lt;p&gt;You can test different assumptions with the &lt;a href="https://unlimitedresidentialproxy.com/calculator" rel="noopener noreferrer"&gt;interactive residential proxy bandwidth calculator&lt;/a&gt;. The formulas and a bilingual reference are also available in the &lt;a href="https://github.com/unlimitedresidentialproxy-coder/residential-proxy-bandwidth-calculator" rel="noopener noreferrer"&gt;GitHub bandwidth-calculator repository&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. A repeatable planning process
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Define the useful data target and deadline.&lt;/li&gt;
&lt;li&gt;Measure average payload, latency, retry rate, and active hours with a limited pilot.&lt;/li&gt;
&lt;li&gt;Calculate the theoretical minimum.&lt;/li&gt;
&lt;li&gt;Apply measured duty cycle and efficiency.&lt;/li&gt;
&lt;li&gt;Add explicit headroom for normal variation.&lt;/li&gt;
&lt;li&gt;Verify that the planned request rate respects target limits.&lt;/li&gt;
&lt;li&gt;Monitor useful throughput after launch and revise the model with real data.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The most important distinction is simple: &lt;strong&gt;bandwidth is a rate, while delivered data is an outcome&lt;/strong&gt;. A reliable estimate connects the two using time, duty cycle, efficiency, and workload measurements rather than assuming that the headline speed will be continuously usable.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>webscraping</category>
      <category>networking</category>
      <category>data</category>
    </item>
    <item>
      <title>Estimating Proxy Bandwidth for Public Data Collection in Kazakhstan with Python</title>
      <dc:creator>Michael Guy</dc:creator>
      <pubDate>Sun, 15 Nov 2026 18:25:52 +0000</pubDate>
      <link>https://dev.to/michaelguy/estimating-proxy-bandwidth-for-public-data-collection-in-kazakhstan-with-python-1bc0</link>
      <guid>https://dev.to/michaelguy/estimating-proxy-bandwidth-for-public-data-collection-in-kazakhstan-with-python-1bc0</guid>
      <description>&lt;p&gt;Collecting public data responsibly is not only a question of writing faster code. Before increasing concurrency, you need to estimate the traffic volume, the available time window, retry overhead, and the throughput your workload can actually sustain.&lt;/p&gt;

&lt;p&gt;This guide builds a small Python model for that calculation. It is intended only for requests you are authorized to make. Respect applicable law, the target website's terms, robots directives, and rate limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Start with the theoretical minimum
&lt;/h2&gt;

&lt;p&gt;For decimal terabytes, the average throughput required to transfer a given volume is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;required_Mbps = traffic_TB × 8,000,000 ÷ seconds
seconds = days × 86,400
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, moving 100 TB evenly over 30 days requires:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100 × 8,000,000 ÷ 2,592,000 = 308.6 Mbps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is only the theoretical average. It assumes continuous transfer, no retries, no pauses, and no protocol overhead.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Add utilization and retry overhead
&lt;/h2&gt;

&lt;p&gt;A practical estimate should reserve capacity for variable latency, connection setup, retries, and quiet periods. The function below makes those assumptions explicit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dataclasses&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;dataclass&lt;/span&gt;

&lt;span class="no"&gt;SECONDS_PER_DAY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;86_400&lt;/span&gt;
&lt;span class="no"&gt;BITS_PER_TERABYTE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8_000_000&lt;/span&gt;  &lt;span class="c1"&gt;# Mbps-seconds in one decimal TB&lt;/span&gt;


&lt;span class="nd"&gt;@dataclass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frozen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;BandwidthEstimate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;theoretical_mbps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;
    &lt;span class="n"&gt;planned_mbps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;estimate_bandwidth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;traffic_tb&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;utilization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.70&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;retry_fraction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;BandwidthEstimate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;traffic_tb&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"traffic_tb must be positive"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;days&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"days must be positive"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;utilization&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"utilization must be between 0 and 1"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;retry_fraction&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"retry_fraction cannot be negative"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;seconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;days&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;SECONDS_PER_DAY&lt;/span&gt;
    &lt;span class="n"&gt;theoretical&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;traffic_tb&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;BITS_PER_TERABYTE&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;seconds&lt;/span&gt;
    &lt;span class="n"&gt;planned&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;theoretical&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;retry_fraction&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;utilization&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;BandwidthEstimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;theoretical_mbps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;theoretical&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;planned_mbps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;planned&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="n"&gt;estimate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;estimate_bandwidth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;traffic_tb&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;estimate&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With 70% utilization and 10% retry overhead, the result is approximately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BandwidthEstimate(theoretical_mbps=308.6, planned_mbps=485.0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The gap between 308.6 Mbps and 485.0 Mbps is not wasted bandwidth. It is operational headroom for a workload that does not run perfectly every second of the month.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Compare the result with standard throughput levels
&lt;/h2&gt;

&lt;p&gt;The following table shows the maximum theoretical transfer volume when a connection runs continuously at the listed rate.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Throughput&lt;/th&gt;
&lt;th&gt;1 day&lt;/th&gt;
&lt;th&gt;7 days&lt;/th&gt;
&lt;th&gt;30 days&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;100 Mbps&lt;/td&gt;
&lt;td&gt;1.08 TB&lt;/td&gt;
&lt;td&gt;7.56 TB&lt;/td&gt;
&lt;td&gt;32.4 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;200 Mbps&lt;/td&gt;
&lt;td&gt;2.16 TB&lt;/td&gt;
&lt;td&gt;15.12 TB&lt;/td&gt;
&lt;td&gt;64.8 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;400 Mbps&lt;/td&gt;
&lt;td&gt;4.32 TB&lt;/td&gt;
&lt;td&gt;30.24 TB&lt;/td&gt;
&lt;td&gt;129.6 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;600 Mbps&lt;/td&gt;
&lt;td&gt;6.48 TB&lt;/td&gt;
&lt;td&gt;45.36 TB&lt;/td&gt;
&lt;td&gt;194.4 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;800 Mbps&lt;/td&gt;
&lt;td&gt;8.64 TB&lt;/td&gt;
&lt;td&gt;60.48 TB&lt;/td&gt;
&lt;td&gt;259.2 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 Gbps&lt;/td&gt;
&lt;td&gt;10.8 TB&lt;/td&gt;
&lt;td&gt;75.6 TB&lt;/td&gt;
&lt;td&gt;324 TB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For the 100 TB example, 400 Mbps covers the theoretical average but leaves limited room for retries and idle periods. A 600 Mbps tier provides more practical headroom under the assumptions above.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Measure latency instead of guessing
&lt;/h2&gt;

&lt;p&gt;A bandwidth plan alone does not guarantee application throughput. Measure representative endpoints before selecting concurrency.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;measure_latency&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;durations&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;started&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;perf_counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;durations&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;perf_counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;started&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;ordered&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;durations&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;p95_index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ordered&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.95&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"p50_ms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;statistics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;median&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ordered&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"p95_ms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ordered&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;p95_index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"mean_ms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;statistics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ordered&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use an endpoint you control or have permission to test. Do not benchmark a third-party website aggressively.&lt;/p&gt;

&lt;p&gt;P95 latency is especially useful because the slowest requests often determine how much concurrency is needed. If P95 rises sharply as concurrency increases, adding more workers may reduce reliability instead of increasing useful throughput.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Treat 429 and 403 responses as control signals
&lt;/h2&gt;

&lt;p&gt;A high rate of HTTP 429 or 403 responses is not a reason to push harder. Reduce concurrency, apply bounded exponential backoff, and verify that the collection is permitted.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;backoff_seconds&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;30.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;base&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uniform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set a retry limit. Record status codes and failure reasons. A successful collection pipeline optimizes valid responses, not raw request volume.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Consider Kazakhstan-specific network conditions
&lt;/h2&gt;

&lt;p&gt;For workloads operated from or targeting services in Kazakhstan, test from the actual deployment region. International routing, time-of-day congestion, target hosting location, and regional availability can change both P50 and P95 latency.&lt;/p&gt;

&lt;p&gt;A useful capacity test should therefore include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the same cloud region or server location used in production;&lt;/li&gt;
&lt;li&gt;representative response sizes;&lt;/li&gt;
&lt;li&gt;realistic concurrency;&lt;/li&gt;
&lt;li&gt;separate measurements during peak and off-peak hours;&lt;/li&gt;
&lt;li&gt;an explicit retry and timeout policy;&lt;/li&gt;
&lt;li&gt;logs for 429, 403, 5xx, DNS, and connection failures.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do not choose a throughput tier from theoretical volume alone. Combine the formula with real latency and success-rate measurements.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Reusable planning checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Estimate the project's total authorized traffic volume.&lt;/li&gt;
&lt;li&gt;Convert the available duration to seconds.&lt;/li&gt;
&lt;li&gt;Calculate the theoretical average Mbps.&lt;/li&gt;
&lt;li&gt;Add retry overhead and a realistic utilization factor.&lt;/li&gt;
&lt;li&gt;Measure P50 and P95 latency from the production region.&lt;/li&gt;
&lt;li&gt;Run a small controlled test before scaling concurrency.&lt;/li&gt;
&lt;li&gt;Stop or slow down when the target signals rate limiting.&lt;/li&gt;
&lt;li&gt;Review the target's terms and data-handling requirements.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For quick scenario testing, use the &lt;a href="https://unlimitedresidentialproxy.com/calculator" rel="noopener noreferrer"&gt;interactive residential proxy bandwidth calculator&lt;/a&gt;. A &lt;a href="https://unlimitedresidentialproxy.com/kk-kz/qazaqstan-shekteusiz-rezidenttik-proksi" rel="noopener noreferrer"&gt;Kazakhstan-focused reference in Kazakh&lt;/a&gt; also summarizes the available throughput levels and durations.&lt;/p&gt;

&lt;p&gt;The important distinction is simple: a plan with no data cap still has a throughput rate. Capacity planning determines whether that rate fits the workload within the available time window.&lt;/p&gt;

</description>
      <category>python</category>
      <category>webscraping</category>
      <category>tutorial</category>
      <category>networking</category>
    </item>
    <item>
      <title>When Pay-Per-GB Proxy Pricing Stops Making Sense</title>
      <dc:creator>Michael Guy</dc:creator>
      <pubDate>Sun, 01 Nov 2026 20:05:02 +0000</pubDate>
      <link>https://dev.to/michaelguy/when-pay-per-gb-proxy-pricing-stops-making-sense-3p2e</link>
      <guid>https://dev.to/michaelguy/when-pay-per-gb-proxy-pricing-stops-making-sense-3p2e</guid>
      <description>&lt;p&gt;High-volume data collection creates a simple but expensive pricing problem: when a crawler transfers more data, a pay-per-GB bill rises at exactly the same time.&lt;/p&gt;

&lt;p&gt;That model can be perfectly reasonable for small or irregular workloads. It becomes harder to forecast when collection runs continuously, retries increase, or several workers operate in parallel.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two pricing models
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Pay per GB
&lt;/h3&gt;

&lt;p&gt;The cost is directly tied to transferred traffic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;traffic cost = transferred GB × price per GB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is easy to understand and often economical for short tests. The drawback is that every retry, duplicate response, large asset, and failed extraction still consumes metered traffic.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Throughput-based, unmetered access
&lt;/h3&gt;

&lt;p&gt;A throughput-based plan uses a fixed speed and a fixed duration. The bill is based on the selected capacity and period rather than the number of gigabytes transferred.&lt;/p&gt;

&lt;p&gt;“Unmetered” means there is no data cap during the purchased duration. It does &lt;strong&gt;not&lt;/strong&gt; mean infinite instantaneous transfer. The selected throughput remains the capacity constraint.&lt;/p&gt;

&lt;p&gt;That distinction matters because a plan should be sized around both traffic volume and the rate at which the application must move it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple break-even calculation
&lt;/h2&gt;

&lt;p&gt;For a fixed-price plan, the traffic level at which it becomes cheaper than pay-per-GB is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;break-even GB = fixed plan price ÷ pay-per-GB rate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suppose a team currently pays $3 per GB. A workload transferring 100 TB in decimal units is approximately 100,000 GB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100,000 GB × $3/GB = $300,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is an illustrative comparison, not a universal market price. Real rates, taxes, discounts, and billing units vary. The useful part is the formula: replace the assumptions with your own numbers before making a decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check whether the throughput can carry the workload
&lt;/h2&gt;

&lt;p&gt;Cost is only half of the comparison. A fixed-throughput plan must be able to deliver the required volume inside the selected period.&lt;/p&gt;

&lt;p&gt;For example, 400 Mbps running continuously for 30 days has a theoretical transfer ceiling of roughly 129.6 TB in decimal units:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;400,000,000 bits/s ÷ 8 × 2,592,000 seconds
≈ 129.6 TB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Actual application throughput will be lower. Protocol overhead, target response times, connection setup, retries, geography, and the success rate of each request all reduce the amount of useful data collected.&lt;/p&gt;

&lt;p&gt;This is why the best plan is not automatically the fastest one. It is the smallest throughput tier that can complete the real workload with reasonable headroom.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to include in the comparison
&lt;/h2&gt;

&lt;p&gt;Before changing pricing models, measure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Useful traffic&lt;/strong&gt;, not only total traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Peak and average throughput&lt;/strong&gt; across workers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retry volume&lt;/strong&gt; caused by timeouts, blocks, or invalid responses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session behavior&lt;/strong&gt;, including rotating and sticky sessions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protocol requirements&lt;/strong&gt;, such as HTTP, SOCKS5, or UDP over SOCKS5.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Location availability&lt;/strong&gt; for the countries or regions being targeted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duration&lt;/strong&gt;, because a one-day burst and a continuous 30-day pipeline need different capacity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Acceptable-use requirements&lt;/strong&gt;, especially for automated collection and ad-related workflows.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For residential proxy workloads, the available IP pool also matters. A plan can provide access to more than 4 million rotating or sticky residential IPs without charging per individual proxy, while the commercial variable remains throughput and duration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use a calculator with editable assumptions
&lt;/h2&gt;

&lt;p&gt;I built a &lt;a href="https://unlimitedresidentialproxy.com/calculator" rel="noopener noreferrer"&gt;residential proxy cost calculator&lt;/a&gt; to make the comparison easier. It lets you change the traffic assumption and compare it against available throughput and duration combinations.&lt;/p&gt;

&lt;p&gt;The calculator is most useful as a planning tool:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enter a realistic monthly traffic estimate.&lt;/li&gt;
&lt;li&gt;Use the actual per-GB rate from your current bill.&lt;/li&gt;
&lt;li&gt;Select a throughput tier that can carry the workload.&lt;/li&gt;
&lt;li&gt;Add headroom for retries and slower targets.&lt;/li&gt;
&lt;li&gt;Compare the total cost over the same period.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Pay-per-GB pricing is often the simplest choice for experiments and low-volume jobs. Unmetered throughput becomes more attractive when traffic is large, continuous, or difficult to predict.&lt;/p&gt;

&lt;p&gt;The right comparison is not “unlimited versus metered” in isolation. It is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;total cost + required throughput + successful data delivered
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once those three numbers are measured, the decision becomes much less subjective.&lt;/p&gt;

</description>
      <category>webscraping</category>
      <category>data</category>
      <category>devops</category>
      <category>networking</category>
    </item>
    <item>
      <title>How to Rotate Proxies in Python with Requests (2026 Guide)</title>
      <dc:creator>Michael Guy</dc:creator>
      <pubDate>Mon, 28 Sep 2026 21:29:40 +0000</pubDate>
      <link>https://dev.to/michaelguy/how-to-rotate-proxies-in-python-with-requests-2026-guide-nh7</link>
      <guid>https://dev.to/michaelguy/how-to-rotate-proxies-in-python-with-requests-2026-guide-nh7</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://unlimitedresidentialproxy.com/blog/how-to-rotate-proxies-python" rel="noopener noreferrer"&gt;UnlimitedResidentialProxy&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Websites may apply rate limits or access controls to automated requests. For permitted data collection, residential proxy rotation can be one useful configuration alongside careful pacing, retries, and error handling.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Only automate requests that you are authorized to make. Respect the target website's terms, robots directives, rate limits, and applicable law.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why rotate residential proxies?
&lt;/h2&gt;

&lt;p&gt;Sending every request through one static exit can make a long-running collection job fragile. Rotating residential sessions distributes authorized requests across available exits. It does not make automation undetectable, guarantee access, or replace responsible request pacing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Requests
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install &lt;/span&gt;requests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configure the proxy gateway
&lt;/h2&gt;

&lt;p&gt;Rotation is handled by the gateway, so your Python code does not need to maintain and validate a large list of proxy IPs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;PROXY_HOST&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;YOUR_GATEWAY_HOST&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;PROXY_PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;7777&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;PROXY_USER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;USERNAME&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;PROXY_PASS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PASSWORD&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="n"&gt;proxy_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PROXY_USER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PROXY_PASS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;@&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PROXY_HOST&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PROXY_PORT&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;proxies&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;proxy_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;proxy_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;target_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://httpbin.org/ip&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;target_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;proxies&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;proxies&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="n"&gt;exit_ip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;origin&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;unknown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Request &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: IP is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;exit_ip&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exceptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RequestException&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Request &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; failed: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The timeout prevents a request from waiting indefinitely. &lt;code&gt;raise_for_status()&lt;/code&gt; turns unsuccessful HTTP responses into exceptions, while &lt;code&gt;.get("origin", "unknown")&lt;/code&gt; avoids a &lt;code&gt;KeyError&lt;/code&gt; if the response shape changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use SOCKS5 when needed
&lt;/h2&gt;

&lt;p&gt;Install Requests with SOCKS support:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s1"&gt;'requests[socks]'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then change the proxy URL scheme:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;proxy_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;socks5h://&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PROXY_USER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PROXY_PASS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;@&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PROXY_HOST&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PROXY_PORT&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using &lt;code&gt;socks5h://&lt;/code&gt; sends DNS resolution through the proxy. The rest of the request and error-handling structure stays the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rotation, sticky sessions, and targeting
&lt;/h2&gt;

&lt;p&gt;The unlimited plans provide access to a shared rotating residential pool advertised at 4M+ IPs. Rotation and sticky-session behavior depend on your session configuration and live exit availability, so a new or unique IP is not guaranteed for every request.&lt;/p&gt;

&lt;p&gt;For country targeting, the gateway username can include a country parameter such as &lt;code&gt;-country-us&lt;/code&gt;. Use the exact syntax supplied in your dashboard and verify availability for the location you need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical troubleshooting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Confirm the gateway host, port, username, and password.&lt;/li&gt;
&lt;li&gt;URL-encode special characters in credentials when necessary.&lt;/li&gt;
&lt;li&gt;Keep timeouts enabled and add bounded retries with backoff.&lt;/li&gt;
&lt;li&gt;Test through an IP-check endpoint before running a larger job.&lt;/li&gt;
&lt;li&gt;Reduce concurrency when the target begins returning rate-limit responses.&lt;/li&gt;
&lt;li&gt;Do not assume that every request must return a different exit IP.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Choosing bandwidth for larger workloads
&lt;/h2&gt;

&lt;p&gt;Unlimited plans are priced by aggregate throughput and duration rather than by traffic volume. If you are comparing throughput tiers, use the &lt;a href="https://unlimitedresidentialproxy.com/calculator" rel="noopener noreferrer"&gt;residential proxy cost calculator&lt;/a&gt; or review the &lt;a href="https://unlimitedresidentialproxy.com/pricing" rel="noopener noreferrer"&gt;unlimited residential proxy plans&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the maintained version of this tutorial, see the &lt;a href="https://unlimitedresidentialproxy.com/blog/how-to-rotate-proxies-python" rel="noopener noreferrer"&gt;original Python proxy rotation guide&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>python</category>
      <category>webscraping</category>
      <category>tutorial</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
