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

feat(redis): Make connection pool configurable [INGEST-1557] #1418

Merged
merged 9 commits into from
Aug 17, 2022

Conversation

olksdr
Copy link
Contributor

@olksdr olksdr commented Aug 16, 2022

Currently the maximum number of connections managed by the pool is
hardcoded and set to the magic number of 24 which works, but we must
make sure we have a posibility to finetune this parameter.

This change adds max_connections option into the Cluster config,
keeps the existing Single config server without changes for bakwards
compatibility and also introduces the SingleOpts variant to configure single
server with additional options (with e.g. max_connections).

The default number of redis connetions in the pool is kept to 24.

This should allow us to keep existing configs without changes and still
give the posibility for finetunning connections in the future.


Also taking opportunity to refactor it a little bit .

Since there is already configuration for few different types of the
connection pools and redis clients, also most of the settings are
repeatable - it is time to move all those config options if one place.

Introducing RedisConfigOptions which will be a single place to gather
all the configuration options, with sensible defaults.

Currently the maximum number of connections managed by the pool is
hardcoded and set to the magic number of `24` which works, but we must
make sure we have a posibility to finetune this parameter.

This change adds `max_connections` option into the `Cluster` config,
keeps the existing `Single` config server without changes for bakwards
compatibility and also introduces the `SingleOpts` variant to configure single
server with additional options (with e.g. `max_connections`).

The default number of redis connetions in the pool is kept to `24`.

This should allow us to keep existing configs without changes and still
give the posibility for finetunning connections in the future.
Since there is already configuration for few different types of the
connection pools and redis clients, also most of the settings are
repeatable - it is time to move all those config options if one place.

Introducing `RedisConfigOptions` which will be a single place to gather
all the configuration options, with sensible defaults.
* moved the redis tests into the redis crate
* added serde-yaml in relay-redis crate as dev deps
* keep docs properly formatted
* removed the option from the config which should not be configured
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

Re-approving, see nitpick on original PR.

@olksdr olksdr merged commit d3b9778 into master Aug 17, 2022
@olksdr olksdr deleted the feat/config-for-redis-pool-size branch August 17, 2022 06:56
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

3 participants