Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

carbonserver: introducing request-timeout, heavy-glob-query-rate-limiters and api-per-path-rate-limiters for read traffic regulation #469

Merged
merged 1 commit into from Jun 3, 2022

Conversation

bom-d-van
Copy link
Member

@bom-d-van bom-d-van commented Jun 2, 2022

Three new types of read path/traffic control configs are introduced in this commit:

  • request-timeout: it is designed to control how long each api call in
    carbonserver can run. The existing timeouts like read, write and idle are for
    http.Server, but this new timeout is for each API call in carbonserver.

  • heavy-glob-query-rate-limiters are relatively narrow controls against queries
    that might causes high cpu and memory consumption due to matching over too
    many metrics or nodes at the same time, queries
    like: *.*.*.*.*.*.*.*.*keyword*. For these types of queries, trigram might
    be able to handle it better, but for trie and filesystem glob, it's might be too
    expensive when the index tree is large.

  • api-per-path-rate-limiters are used for strict api call rate limiting. All
    registered API paths (see carbonserver.Listen for a full list) can be
    controlled separately with it.

@bom-d-van bom-d-van force-pushed the carbonserver/resource-control branch from 8cc5262 to 9a56947 Compare June 2, 2022 13:26
@bom-d-van bom-d-van changed the title carbonserver: introducing request-timeout, heavy-glob-query-rate-limiters and heavy-glob-query-rate-limiters for read traffic regulation carbonserver: introducing request-timeout, heavy-glob-query-rate-limiters and api-per-path-rate-limiters for read traffic regulation Jun 2, 2022
@bom-d-van bom-d-van force-pushed the carbonserver/resource-control branch 3 times, most recently from b506f11 to 9496f7b Compare June 3, 2022 07:08
README.md Show resolved Hide resolved
…ters and api-per-path-rate-limiters for read traffic regulation

Three new types of read path/traffic control configs are introduced in this commit:

* request-timeout: it is designed to control how long each api call in
  carbonserver can run. The existing timeouts like read, write and idle are for
  http.Server, but this new timeout is for each API call in carbonserver.

* heavy-glob-query-rate-limiters are relatively narrow controls against queries
  that might causes high cpu and memory consumption due to matching over too
  many metrics or nodes at the same time, queries
  like: "*.*.*.*.*.*.*.*.*keyword*". For these types of queries, trigram might
  be able to handle it better, but for trie and filesystem glob, it's might be too
  expensive when the index tree is large.

* api-per-path-rate-limiters are used for strict api call rate limiting. All
  registered API paths (see carbonserver.Listen for a full list) can be
  controlled separately with it.
@bom-d-van bom-d-van force-pushed the carbonserver/resource-control branch from 9496f7b to 80d596f Compare June 3, 2022 14:24
@bom-d-van bom-d-van merged commit 0eba4e0 into master Jun 3, 2022
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.

None yet

2 participants