Skip to content

Missing docs on rate-limit config in Horizon's captive-core #348

Closed

Description

@borisovano

What version are you using?

V2.28.3

What did you do?

We manage our own Horizon node, it spawns a separate captive-core process.
We are encountering some 429s (rate limiting)
https://developers.stellar.org/api/horizon/introduction/rate-limiting

Is it a soft limit that can be controlled by configuration, if yes can you help where?
The reason I ask is that we see that stellar-core.conf is autogenerated by/for the captive-core process and we can't find how to change/inject this configuration.

We checked this docs however rate-limit is not mentioned there:
Core: https://github.com/stellar/stellar-core/blob/master/docs/stellar-core_example.cfg
Horizon: https://developers.stellar.org/docs/run-platform-server/configuring

What did you expect to see?

Clear docs on how to change config of captive core

What did you see instead?

No documentation on the above

Activity

  1. added
    bug
    on Mar 4, 2024
  2. changed the title [-]Missing docs on rate-limit config in Horison's captive-core[/-] [+]Missing docs on rate-limit config in Horizon's captive-core[/+] on Apr 25, 2024
  3. moved this from Backlog to To Do in Platform Scrumon May 8, 2024
  4. mollykarcher commented on May 8, 2024

    @mollykarcher
    Contributor

    @borisovano the stellar core configuration is indeed autogenerated by Horizon. Horizon only exposes some subset of the configuration provided by core, which it will then translate into the core config file it generates. It is (intentionally) not possible to edit this file directly.

    In this particular case though, the rate limiting is a Horizon configuration. The value you are looking for is PER_HOUR_RATE_LIMIT. You can disable it entirely by setting it to 0 (ie. PER_HOUR_RATE_LIMIT=0), the default is 3600 req/s, but you'll probably want to tune it to your own infrastructures capabilities and client/request needs. We'll update the rate limiting docs here to make this clear.

  5. self-assigned this
    on May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugplatform

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions