The Data Collection Handbook · Part II. Getting the Data

Chapter 6. Building Resilient Collectors

In progress: this is the chapter plan. The full chapter, its charts, and its runnable experiment publish on this page.

What this chapter answers

A production collector lives in a world of timeouts, blocks, and half-loaded pages. This chapter is about designing for that world, and about the single worst data bug in the industry: converting a failure into fake data, like recording a blocked request as product not found.

What you will learn

In this chapter

The experiment

The question: Which retry policy delivers the most successes for the least load on the source: naive retry, backoff with jitter, or backoff plus a circuit breaker?

A simulation of a source with transient failures, a rate limit, and a block state triggered by hammering. Three client policies run over thousands of requests; the code measures final success rate, total requests sent (the load you inflict), and time to completion. The data and code ship with the chapter, sized to run offline on a laptop with one command.

My hypothesis is that naive retries cause the very blocks they then suffer from, and that backoff plus a breaker wins on success rate while sending materially fewer requests. Resilience and politeness are the same engineering, and the numbers should show it.

← Chapter 5. Looking Human: Fingerprints and Anti-Bot Systems Chapter 7. Extraction: From Page to Record →

Get new chapters by email as they publish.