I'm constantly encountering a 429 rate limit error when communicating between spaces

A few days ago, the issue at Space-to-Space requests to *.hf.space return 503 from awselb (since Jul 8) was resolved, bringing stability, but it was only short-term. From yesterday, July 11th, until today, I have been continuously receiving a 429 rate limit error. Has anyone else encountered the same problem, and is this a bug?

A 429 here usually isn’t a bug in your Space itself — it’s the gateway rate-limiting calls that come from a single source. Space-to-Space requests egress through the *.hf.space edge, and when your caller fires many requests in a tight loop (or several clients share one outbound IP on the same hosting/CI runner), they all count against the same per-IP quota and you start getting 429/503 back.

What helped in my case:

  1. Read the Retry-After header instead of assuming a fixed sleep — it tells you how long the edge actually wants you to wait.
  2. Exponential backoff with jitter on the client, and a concurrency cap (don’t fan out unlimited async requests at one Space).
  3. Cache the response on the caller side so repeated identical requests don’t re-hit the network at all.
  4. If it’s coming from a shared runner/NAT, the “IP” is shared with other jobs — that’s what makes it appear intermittently.

Worth confirming: does it reproduce 1:1 from a laptop on a different network? If yes, it’s your request pattern; if only from the deploy environment, it’s the shared egress IP hitting the quota.