Documentation
¶
Overview ¶
Command spike3 measures the sustained request rate OpenAlex allows in the polite pool.
Spike 3 of docs/ARCHITECTURE_PHASE1.md §9: the documentation says 10 requests per second in one place and 100 in another. ADR-004 sets a rate.Limiter token bucket "well below the measured limit", and it cannot be set from a number that is off by 10x in an unknown direction.
This deliberately probes a free public service, so it is built to be polite:
- single-work requests rather than list requests
- a short burst at each target rate, not a sustained flood
- it aborts the entire run on the first 429 rather than confirming it twice
- rotating IDs, so a CDN cache does not make the test meaningless
The single-work choice was made to be cheap on credits, and the run then discovered why it was cheaper than expected: single-work fetches cost nothing at all, and list requests cost 1 credit against a 1,000/day allowance — the reverse of what the design documents assumed. See docs/SPIKES.md.
Usage:
go run ./spikes/3-rate-limit