Pular para o conteúdo
#0688
Exec

One polite connection to the rate-limited vendor

The geocoding vendor allows ten requests a second. Your codebase calls it from four services, two cron jobs, and a backfill script, and none of them know about each other. Once a month, someone's loop trips the limit and everything gets 429s for an hour.

The fix is one URL: a hoody-exec script that every caller points at instead of the vendor. The script caches answers in shared state: addresses don't move: and meters what actually goes upstream, queueing the rest. Callers keep their code; only the base URL changed.

The vendor sees one well-behaved client. Your services see a vendor that never says no.

Every caller shares one polite connection to the vendor.