Skip to content

Add rate limits initial documentation - #1450

Draft
nicu-da wants to merge 1 commit into
mainfrom
nicu/rate_limits/initial_docs
Draft

Add rate limits initial documentation#1450
nicu-da wants to merge 1 commit into
mainfrom
nicu/rate_limits/initial_docs

Conversation

@nicu-da

@nicu-da nicu-da commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Signed-off-by: Nicu Reut <nicu.reut@digitalasset.com>
@mintlify

mintlify Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cantonfoundation 🟢 Ready View Preview Aug 24, 2026, 8:22 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@martinflorian-da martinflorian-da left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! I do expect we'll need to tweak this more going forward but this is super helpful to maintain an overview.

My main nudge at this time would be to remove references to SV app...

description: "Rate limiting requirements for Super Validator nodes"
---

SV nodes must protect their HTTP and gRPC endpoints against excessive load with two complementary layers:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SV nodes must protect their HTTP and gRPC endpoints against excessive load with two complementary layers:
SV nodes protect their HTTP and gRPC endpoints against excessive load with two complementary layers:

</Warning>

```hocon
canton.scan-apps.scan-app.parameters.rate-limiting.client-ip-headers = ["x-envoy-external-address"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to miss a sentence about "what is this snippet here telling me".

It will also confuse people not used to thinking about the low-level HOCON configs; WDYT of making these two name: ADDITIONAL_CONFIG_... style snippets instead?

...and possibly we also want to expose these via Helm values at some point? (So might need a hook here to replace with Helm value overrides if we end up enabling these.)


### Requirements

The following infrastructure level rate limits should be configured. These limits should apply individually to the Scan API, public SV app endpoints and the sequencer gRPC API.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following infrastructure level rate limits should be configured. These limits should apply individually to the Scan API, public SV app endpoints and the sequencer gRPC API.
The following infrastructure level rate limits should be configured. These limits should apply individually to the Scan API and the sequencer gRPC API.

My understanding is that we're not planning to make any SV API endpoints public.

If I'm wrong let's please talk about this :)

If not let's not even mention the SV app anywhere here, to avoid raising eyebrows and also avoid SVs investing work into something that will matter less for dropping the whitelists on scan and sequencer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that we're not planning to make any SV API endpoints public.

No way around it.

Also check canton-network/splice#6934

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No way around it.

Please let's unroll this with a bit more detail. What exactly do you mean?

I commented on the PR on all the validator-public endpoints. I don't think a single of those should remain at the time of dropping whitelists.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a fair point! But this is DevNet-only, a single endpoint and effectively doesn't exist yet on main.

So I think I'm still leaning towards "let's keep the SV app out of this for now"; we can explain why we need this one single endpoint and the rate limits for it once we introduce that endpoint.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but DevNet is still a prod cluster that exposes that endpoint.
Note that I am totally fine with removing the mentions of sv app from here, but this goes in the wrong direction of making sure that the svs only allow exactly what needed as accessible by the validators.

So I think I'm still leaning towards "let's keep the SV app out of this for now"; we can explain why we need this one single endpoint and the rate limits for it once we introduce that endpoint.

Well yes, but the current docs are made for the current version, we need rate limits to get rid of whitelists but having whitelists imo doesn't mean we don't need rate limits. So just leaving the SV app uncovered does sound a bit tricky.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK then how about we add some sentence somewhere that the current plan is to reduce the need to make SV app endpoints reachable, so that in the end we only need to do that on DevNet?


Both limits must be enforced over a **fixed window of 60 seconds**. A client is allowed at most `limit` requests per 60s window; once the budget for the current window is exhausted, all further requests from that client (or, for the global limit, to that service) are rejected with `429 Too Many Requests` until the window rolls over.

For the sequencer, limits must be applied to gRPC traffic requests.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How confident are you that you can throw "gRPC traffic request" at operators and they'll end up configuring the right thing? Can this be mapped to something on a lower layer (HTTP2?)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect that most proxies have native support for gRPC. Will just switch to gRPC (HTTP2)


Beyond the global and per-IP limits above, operators are encouraged to keep the **ability to apply more fine-grained, custom rate limits on demand** — for example per URL path or path prefix, per gRPC service or method, or for an individual client IP or IP range. This makes it possible to react quickly to a misbehaving client or an expensive endpoint without taking the whole node offline, and to lift limits temporarily for a specific trusted peer.

Since the apps derive the client IP from an HTTP header, the same infrastructure that enforces these limits must also set that header in a way the client cannot influence.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this sentence (if we at all want to keep it) move up where "Per-source-IP limits" are introduced?


### Optional: banning aggressively retrying clients

Clients that ignore `429` responses and immediately retry keep consuming ingress capacity even though every request is rejected. Operators are therefore encouraged to additionally **ban clients that retry too quickly**.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can't just skip that here and later expend extra banning when we discuss WAF / DDoS protection... not a strong opinion.


#### Monitoring

- `splice_splice_rate_limiting` — metrics prefix that identifies the rate limiting metrics.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure it's splice_splice_ and not just splice_?

@nicu-da

nicu-da commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks a lot! I do expect we'll need to tweak this more going forward but this is super helpful to maintain an overview.

My main nudge at this time would be to remove references to SV app...

I definitely expect we keep evolving this in the short to medium term, but wanted to front run this so that SVs can also get a head start on basic rate limits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants