In the stellar documentation https://www.stellar.org/developers/horizon/reference/rate-limiting.html it is said that rate limit is 3600 per hour. But when i check via curl i get 101 which is too low for 1 hour. So did Stellar's public Horizon Server Changes its rate limit?
3 Answers
X-Ratelimit-Limit: 101
X-Ratelimit-Remaining: 100
X-Ratelimit-Reset: 1
The 1st parameter is the total number of requests in a specific period of time (specified with the 3rd parameter). 2nd one is derived from the 1st one. 3rd is the length of period, in seconds.
.
Here, it means:
maximum 101 requests in a period of 1 second
and there are 100 requests remaining in this 1-second-period.
I guess the documentation will be updated later.
FYI, the older config was like:
X-Ratelimit-Limit: 3600
X-Ratelimit-Remaining: 3599
X-Ratelimit-Reset: 3599
-
1Thanks for the reply. It made me understand those numbers. What i also understand is this rate-limit is account based. What if a third party is using the public API and using all requests? I am asking this because although we are doing like 2-3 requests per minute we still get 429 (Rate-limit exceeeded error). Shouldnt this limit be IP+account based?– NumenorCommented Nov 5, 2018 at 10:02
-
One more issue is from our production servers "X-Ratelimit-Reset: 60". Why is this 60 for our IP but 1 for other IP's?– NumenorCommented Nov 5, 2018 at 10:40
-
1Rate limit is bound to IP but not account. I just checked again and the current values are changed to
X-Ratelimit-Limit: 7200 ; X-Ratelimit-Reset: 3599
. I was guessing that the officials were making some temporary test/tuning. After several days more and the tuning should have been completed, and I think these two variables will not be changed again this frequent.– cesarmCommented Nov 6, 2018 at 1:11
You can disable PER_HOUR_RATE_LIMIT
in after horizon 0.15.0.
PER_HOUR_RATE_LIMIT="0" in horizon.env mean disable x-limit*
The answers above are confusing because when the PER HOUR limit is not =0, then there are TWO rate limits, not one. There is the PER HOUR LIMIT and there is ALSO a BURST limit that is hardwired to 100 per second.
So if you violate EITHER of the two limits, you'll get a rate limit error. See this article on the two rate limits.