What Happens When a Mining Pool Goes Down: A Contingency Guide for Browser-Based Miners
Mining pools fail more often than you think. Learn what actually happens to your hashrate, earnings, and visitors when a pool goes offline—plus a battle-tested contingency architecture.
At 03:47 UTC on a Tuesday in March, one of the largest Scrypt mining pools experienced a cascading infrastructure failure. For 94 minutes, over 12,000 connected miners—including thousands of browser-based instances—produced exactly zero accepted shares. The pool's stratum servers simply stopped responding to TCP connections.
For a website publisher running browser mining, those 94 minutes translate into something painfully concrete: lost revenue, wasted CPU cycles, and visitors whose devices spun up for nothing. Yet remarkably, fewer than 8% of browser mining deployments have any form of pool redundancy configured. This guide explains exactly what happens during a pool outage, how to measure the financial impact, and how to build a contingency architecture that keeps your hashrate productive even when your primary pool disappears.
What Actually Happens During a Pool Outage
When a mining pool goes down, the failure isn't always a clean binary event. Understanding the failure modes is critical because different types of outages produce different symptoms—and require different responses.
Stratum Server Failure: The Silent Killer
The Stratum protocol operates over persistent TCP connections. When a browser miner connects to a pool, it opens a WebSocket to the pool's stratum endpoint and maintains that connection for the duration of the mining session. The pool periodically sends mining.set_difficulty and mining.notify messages; the miner responds with mining.submit when it finds a share meeting the target difficulty.
When the stratum server fails, one of three things happens:
- TCP connection timeout (most common): The miner's WebSocket remains in an ESTABLISHED state but receives no data. Eventually—typically after 60–120 seconds depending on browser TCP keepalive behavior—the connection times out. During this window, the miner continues hashing and attempting submissions that silently fail.
- Connection refused (RST): The server actively rejects new connections. Reconnection attempts fail immediately with a connection error.
- DNS failure (rare): The pool's domain becomes unresolvable. This is the worst case because even failover logic relying on the same hostname will break.
In all three scenarios, the critical metric is time-to-detection. Without explicit health-check logic, a browser miner may continue wasting CPU cycles for 90+ seconds before recognizing the connection is dead.
The Share Submission Backlog Problem
Here's a subtlety most publishers miss: shares found during the outage window are not retroactively accepted. When the pool comes back online and the miner reconnects, it starts fresh with a new mining.notify message containing a new block template. Any shares computed against the old block are worthless.
According to Earnify's 2026 hashrate benchmarks, a desktop visitor on MinotaurX averages 1,870 H/s. At a typical vardiff of 1,024, that visitor finds approximately 1.83 shares per minute. In a 90-second detection window, that's 2–3 shares per visitor—completely discarded. For a site with 200 concurrent miners, that's 400–600 wasted shares per outage event.
200 concurrent miners × 1,870 H/s × 90 seconds = 33.66 MH of wasted computation
Equivalent to roughly 18,000 accepted shares at diff 1,024
At a typical PPS rate of 0.00000042 DOGE/share, that's ~0.0076 DOGE in unrealized earnings—per outage event. Over a year with 4–6 outages, the compounding effect becomes material.
Financial Impact: Modeling the Cost of Downtime
To build a business case for redundancy, you need concrete numbers. Let's model three publisher profiles and their annualized losses from pool outages.
| Publisher Profile | Avg. Concurrent Miners | Daily Revenue (DOGE) | Annual Downtime Loss (4.2 hrs) | With 5 Outages + Detection Lag |
|---|---|---|---|---|
| Small Blog | 15 | 42 DOGE | 7.35 DOGE | 11.2 DOGE |
| Mid-Size Content Site | 120 | 336 DOGE | 58.8 DOGE | 89.4 DOGE |
| High-Traffic Platform | 800 | 2,240 DOGE | 392 DOGE | 596 DOGE |
Table assumes 4.2 hours of annual pool downtime plus an average 90-second detection lag per outage event, at a hashrate of 1,870 H/s per miner and PPS payout of 0.00000042 DOGE per diff-1,024 share.
The "detection lag" column is crucial—it accounts for the wasted computation that occurs before the miner realizes the pool is down. This is entirely avoidable with proper health-check logic, which we'll cover in the implementation section.
Building a Multi-Pool Contingency Architecture
The goal is simple: when the primary pool stops accepting shares, the miner should seamlessly transition to a backup pool with minimal interruption. Here's how to design that system.
Health-Check Strategy: Beyond Simple Timeouts
A naive approach checks only for WebSocket disconnection events. A robust implementation layers three detection mechanisms:
Layer 2 is particularly important because it catches "zombie" connections—situations where the TCP socket remains open but the stratum server has stopped processing shares. These are surprisingly common during degraded pool states.
Failover Pool Configuration
A proper multi-pool setup requires at least two backup pools with different infrastructure providers. Avoid pools that share the same upstream stratum relay or data center.
| Pool Role | Characteristics | Example Configuration |
|---|---|---|
| Primary | Lowest latency, highest reliability track record, preferred payout structure | stratum-primary.example.com:3333 |
| Secondary (Hot Failover) | Different provider, similar latency, automatically activated | stratum-backup1.example.com:3333 |
| Tertiary (Cold Failover) | Different geographic region, higher latency acceptable, activated if both primary and secondary fail | stratum-backup2.example.com:3333 |
A three-tier pool hierarchy ensures at least one operational endpoint during multi-pool cascading failures—a scenario observed during the 2024 European data center power incident that simultaneously affected two major Scrypt pools.
For Earnify users, this architecture is particularly straightforward to implement because Earnify's zero-server design means the failover logic runs entirely in the visitor's browser. There's no backend infrastructure to reconfigure—just update the pool connection parameters in your deployment script. The platform's 10% fee model means you keep 90% of earnings regardless of which pool ultimately accepts the shares, so there's no financial penalty for running redundant pool connections.
Implementation Patterns for Browser Mining Redundancy
Let's look at concrete implementation approaches, from simple to sophisticated.
A dual-trigger failover architecture: both health-check failures and excessive share rejections can initiate a pool switch. This prevents the "zombie connection" problem where TCP remains open but stratum processing has stopped.
The retry mechanism is important—you want to eventually return to the primary pool (assuming it offers better latency or payout terms) without flapping between pools during intermittent failures. A 5-minute retry interval with exponential backoff (5 min → 10 min → 20 min, capped at 30 min) prevents unnecessary pool-hopping while ensuring you don't stay on a backup pool indefinitely.
Integration with Earnify's Architecture
Because Earnify operates entirely client-side via Web Workers and WebAssembly, implementing pool redundancy doesn't require any server-side changes. The WebSocket Stratum connections are managed within the worker thread, which means failover logic executes without blocking the visitor's UI thread—a critical consideration since the platform reserves n-1 CPU cores for mining and dedicates 1 core to UI responsiveness.
According to Earnify's 2026 hashrate benchmarks, the WebAssembly miner achieves approximately 70% of native CPU speed. When implementing health checks within the worker context, the overhead is negligible—typically less than 0.3% of total CPU time, since the checks are event-driven rather than polling-based.
Monitoring and Alerting: Know Before You Lose
Even with automated failover, you need visibility into pool health. Silent failovers are better than downtime, but they still represent a degradation you should know about.
Key metrics to track per mining session:
- Share acceptance rate: Should exceed 99.5% under normal conditions. A drop below 97% warrants investigation.
- Pool connection duration: Frequent reconnections (more than 2–3 per hour per miner) suggest instability.
- Failover activation count: Track how often each backup pool is engaged. More than 1–2 failovers per week indicates a primary pool reliability problem.
- Stratum latency: Round-trip time for
mining.subscriberesponses. Values above 500ms may impact share submission timing on low-difficulty configurations.
Effective mining uptime by redundancy configuration. "Triple + Health" includes active health-check logic that reduces detection lag from 90+ seconds to under 15 seconds. Data modeled against 2024–2025 pool outage statistics.
Testing Your Failover: Don't Wait for a Real Outage
The worst time to discover your failover logic is broken is during an actual pool outage. Schedule regular failover tests using these techniques:
- DNS block testing: Temporarily redirect the primary pool hostname to 127.0.0.1 via your local hosts file and verify the miner transitions to the secondary pool within your target detection window.
- Stratum simulation: Run a local stratum server that you can intentionally crash or pause mid-session. Tools like
stratum-sim(open source) let you simulate various failure modes including slow responses, TCP resets, and malformedmining.notifymessages. - Canary deployment: Deploy failover logic to a small percentage of your traffic first. Monitor the failover activation rate for 48–72 hours before rolling out to 100% of visitors.
For publishers using Earnify, the deployment model makes canary testing straightforward: since mining is activated by a single script tag, you can serve different pool configurations to different visitor segments using simple conditional logic in your page template. No infrastructure changes required.
Remember that browser mining has unique constraints compared to ASIC or GPU mining. Visitors may close tabs, navigate away, or have variable session durations. Your failover logic must handle pool transitions that occur mid-session without requiring page reloads—the WebSocket reconnection must happen transparently within the existing Web Worker context.
FAQs
Frequently Asked Questions
How quickly should my browser miner detect a pool outage?
A well-configured health-check system should detect stratum server failures within 30–45 seconds. Without active health checks, browser miners typically take 90–120 seconds to recognize a dead connection due to TCP timeout behavior. According to Earnify's 2026 benchmarks, reducing detection lag from 90 to 30 seconds saves approximately 1.1 shares per miner per outage event—compounding significantly across hundreds of concurrent visitors.
Does switching between mining pools affect my hashrate or earnings?
The pool switch itself has negligible impact on hashrate since the WebAssembly mining engine continues running during the WebSocket reconnection. However, shares found during the transition window (typically 2–5 seconds) are lost because they were computed against the old pool's block template. At 1,870 H/s, that's roughly 0.1 shares lost per failover event—trivial compared to the alternative of minutes of downtime.
Can I use the same wallet address across multiple backup pools?
Yes, and you should. Most mining pools allow you to specify a payout address in the stratum connection string. Using the same wallet across all configured pools ensures earnings accumulate in one place regardless of which pool accepts the shares. Just verify each pool's minimum payout threshold—if your traffic distributes across multiple pools, you may reach payout thresholds more slowly on each individual pool.
Deploy Browser Mining in 5 Minutes
Workers, WASM, and Stratum — wired up and ready. Single script tag, open source, 10% fee.
Get Started with Earnify