Proxy Circuit Breakers: Pause Failing Routes Before Retrying
Proxy Academy

Proxy Circuit Breakers: Pause Failing Routes Before Retrying

Define failure scopes, pause repeated proxy requests and test recovery without losing task history or exceeding request budgets.
Scrape More. Get Blocked Less. The Web Scraping Playbook by MagneticProxy
Free Guide
The Web Scraping Playbook
Diagnose blocked requests, choose the right proxy setup, and collect reliable data without wasting bandwidth.
Get the free playbook
30% off
10GB General Purpose
First Month · Then $20/month
Start Here

A proxy circuit breaker is an application control that temporarily stops requests after a defined pattern of failures. It gives a failing route or destination time to recover, then permits a small test before normal traffic resumes. It belongs in your client or scheduler; it is not an automatic MagneticProxy feature.

Use it when repeated attempts are consuming time and capacity without producing useful results. A timeout ends one attempt. A concurrency limit caps simultaneous work. A circuit breaker decides whether another attempt should start at all.

Understand the three circuit-breaker states

The standard pattern has three states: closed allows normal requests while tracking outcomes; open declines new attempts for the affected scope; half-open allows a limited recovery probe. Successful probes can restore normal work, while another relevant failure keeps the circuit open. See Microsoft's circuit-breaker pattern for the general architecture.

Those state names describe your scheduler, not the health of every address in a provider's network. Record the exact protected scope so an operator can tell what has paused and why.

Scope the pause to the evidence

For a permitted ad-placement check, a destination-specific failure should not automatically stop unrelated research. Conversely, a broken account configuration can affect many destinations. Start with a key that represents the workload boundary you can diagnose: destination group, account configuration and routing requirement.

Do not key the breaker only by a rotating exit IP. That can reset the failure history on each attempt and let the same failing workload continue indefinitely. Where several workers share a destination budget, ensure they also share the pause decision or enforce it through a single coordinator.

Keep sensitive credentials out of the key and logs. A non-secret configuration identifier is enough to connect the decision to the setup being tested.

Decide which outcomes count before running

  • Repeated connection failures or timeouts: consider them evidence for a temporary pause after checking their scope.
  • Authentication or configuration errors: hold the affected work for correction. A timed retry alone will not repair credentials.
  • Explicit access refusals or rate limits: respect the destination's policy and documented retry instructions. Do not use another IP to evade the restriction.
  • Completed negative findings: an unavailable product or absent advertisement may be a valid research result. Do not count it as a network failure merely because it is disappointing.
  • Incomplete or incorrect content: quarantine the observation and investigate the acceptance rule. Keep content failures distinct from transport failures.

The response validation guide owns the checks that decide whether a record is usable. Feed those outcomes into the breaker without losing their original reason.

Define a policy with an explicit denominator

Write down the observation window, minimum completed attempts, qualifying failures, trigger, pause duration, maximum probes and recovery rule. There is no universal threshold that is safe for every retailer, ad service or proxy workload. Start conservatively within the destination's permitted limits and tune against observed behavior.

Consider a hypothetical window with twenty completed attempts: twelve transport failures, five usable observations and three valid “not available” findings. A transport-failure calculation uses twelve of twenty. Counting all fifteen non-positive business findings as network failures would pause work for the wrong reason.

Record attempts already in flight when the breaker opens. Decide whether they may finish and whether their outcomes affect the recovery window. Otherwise, late results can accidentally undo a pause that was based on newer evidence.

Keep skipped work visible

When the circuit is open, mark new tasks as deferred, blocked or expired according to their deadline. A skipped request is neither a successful observation nor proof that the destination was unavailable. Preserve the task ID and the reason it did not run.

For time-sensitive ad checks, an old deferred task may no longer answer the original question. Expire it explicitly rather than silently fetching a later page and presenting it as evidence from the missed window. If you return cached data, label its observation time and stale status.

Resume with a bounded probe

  1. Confirm that the pause condition permits a retry and that any configuration problem has been corrected.
  2. Allow a limited number of representative requests through the same routing requirements and acceptance checks.
  3. Keep normal traffic paused while the probe is assessed. Prevent every worker from independently starting its own probe.
  4. Resume gradually only after the defined recovery condition passes. Keep retries inside the existing rate and concurrency budget.
  5. If the failure persists, reopen the circuit and record the new evidence. Escalate repeated cycles for investigation.

A healthy lightweight endpoint does not establish that the actual destination or required content has recovered. Use a permitted representative operation, and never repeat a state-changing action without understanding whether the earlier attempt completed.

Test the control before relying on it

Simulate a transient failure, a sustained outage, a late response, simultaneous workers, a failed probe and a successful recovery. Verify that skipped tasks remain visible, no duplicate task is committed, and the original deadline still applies. Record state transitions separately from request outcomes.

Use the timeout guide for diagnosis and the concurrency guide for capacity limits. For a permitted collection workflow, review the Web Scraping Capsule and current connection documentation. Routing supplies the connection; your application owns the pause, recovery and evidence policy.

Free Guide
The Web Scraping Playbook
Diagnose blocked requests, choose the right proxy setup, and collect reliable data without wasting bandwidth.
Get the free playbook

Frequently Asked Questions

Check the most Frequently Asked Questions

Can you guarantee access to every site?

Latest Posts

Practical guides to proxies, web scraping, and reliable data collection.