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

chore(forklift): add tuning for concurrent audit log database inserts #5044

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

fnichol
Copy link
Contributor

@fnichol fnichol commented Nov 29, 2024

This change adds a tunable in forklift's configuration called insert_concurrency_limit to control how many concurrent inserts are running.

This can be set in a forklift.toml with:

[audit]
insert_concurrency_limit = 4

Or in an environment variable with:

SI_FORKLIFT__AUDIT__INSERT_CONCURRENCY_LIMIT=4

Longer term, each microservice that forklift runs should have its own tunable for its own concurrency as one broad brush stroke won't be sufficient in the various environments. Additionally the name for the idea of a concurrency limit has insert_ in it because currently we render the exact same config.toml template in all environments and for all services. This is one way for the moment to be very clear as to what this tunes (as read from a more "global" context).

This change adds a tunable in forklift's configuration called
`insert_concurrency_limit` to control how many concurrent inserts are
running.

This can be set in a `forklift.toml` with:

```toml
[audit]
insert_concurrency_limit = 4
```

Or in an environment variable with:

```sh
SI_FORKLIFT__AUDIT__INSERT_CONCURRENCY_LIMIT=4
```

Longer term, each microservice that forklift runs should have
its own tunable for its own concurrency as one broad brush stroke won't
be sufficient in the various environments. Additionally the name for the
idea of a concurrency limit has `insert_` in it because currently we
render the exact same `config.toml` template in all environments and for
all services. This is one way for the moment to be very clear as to what
this tunes (as read from a more "global" context).

Signed-off-by: Fletcher Nichol <[email protected]>
@vbustamante vbustamante added this pull request to the merge queue Nov 29, 2024
@vbustamante vbustamante removed this pull request from the merge queue due to a manual request Nov 29, 2024
@fnichol fnichol added this pull request to the merge queue Nov 29, 2024
Merged via the queue into main with commit af59e7c Nov 29, 2024
8 checks passed
@fnichol fnichol deleted the fnichol/forklift-audit-insert-concurrency branch November 29, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants