Implementing complex rate-limiting

I have an upstream service I want to hammer with as many requests as I can get. But, unsurprisingly, they have rate limiting in place. I have recently implemented this in DOs, blocking concurrency on each DO, but this is incredibly expensive (10d ~ $120) as the DO is permanently active and making requests.

Is there any smarter way to implement stateful rate limiting? I'm already using queues to make the requests, but not sure if there's a way to get state as part of queues.
Was this page helpful?