1

This answer tells me to look at HTTP headers to determine the rate limit. It is 2 values: X-Ratelimit-Limit: 101 which is # per window X-Ratelimit-Reset: 1 which is the winlow size (1 second).

But the horizon .env file has just a per HOUR rate and it is set to 72000 which is 20 tps.

So I'm confused. where did the rate limit in the HTTP response header come from? Are there two rate limits that determine when a rate limit exceeded error happens?

1 Answer 1

2

They did change the rate limiting in a release of horizon several months ago. Here’s some more details about it: https://github.com/stellar/go/blob/0b181590e5ad42f93be0172076717a9cb8b5d0ef/services/horizon/internal/docs/reference/rate-limiting.md

The 101 you see is from the “max burst” which forces you to smooth your requests out over the full hour and not use up all 3600 at the same time.

See https://github.com/stellar/go/blob/c0513858fa4c138f0df1ec4922de846b71a43441/services/horizon/cmd/root.go for where that config is set.

3
  • curious as to who you are....do you work at Stellar? also seems the 100 is baked into the code. can override with hourly rate limit =0. Thank you for clarifying this mystery! Commented Feb 25, 2019 at 3:41
  • You're welcome. No I don't work for Stellar. I do have a side project: stellarguard.me that I work on in my spare time but no connection to the SDF.
    – Paul
    Commented Feb 26, 2019 at 13:54
  • I sent you a note on Linkedin Commented Feb 27, 2019 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.