-
Notifications
You must be signed in to change notification settings - Fork 70
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: Pass redis connection pool settings to config #1140
base: master
Are you sure you want to change the base?
Conversation
/build |
Build and push Docker images with tag: feat-pass-redis-connection-pool-to-config.2025-02-11.2a7e4a6 |
// Time to await for a client from client pool. Default value is 4s. | ||
PoolTimeout string `yaml:"pool_timeout"` | ||
// Size of client pool. Default value is 5 * GOMAXPROCS. | ||
PoolSize int `yaml:"pool_size"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А я правильно понимаю, что такие дефолтные значения задаёт либа? Мб тогда явно их пропишем, а то вдруг что-то в либе поменяется?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Либо из godoc уберём)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Возможно это хорошая идея, но надо подумать, как лучше сделать. Альтернативный вариант — обновлять документацию вместе с одновлением либы, потому что если в либе поменяют дефолтные значения — значит, скорее всего, в этом есть какой-то смысл
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ещё возможно стоит прокинуть в конфиг дополнительный параметр, чтобы можно было через конфиг задавать не просто фиксированное значение, а что-то типа PoolPerProc * GOMAXPROCS + PollSizeConst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ещё возможно стоит прокинуть в конфиг дополнительный параметр, чтобы можно было через конфиг задавать не просто фиксированное значение, а что-то типа PoolPerProc * GOMAXPROCS + PollSizeConst
Вот это звучит прикольно
Альтернативный вариант — обновлять документацию вместе с одновлением либы, потому что если в либе поменяют дефолтные значения — значит, скорее всего, в этом есть какой-то смысл
Можно и так, но вариант с проставленными нами дефолтными значениями мне немного больше импонирует
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тогда, кстати, надо бы всем параметрам дефолтные значения выставить, вроде у базы все неявно ожидаются от библиотеки
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
блинб, и их же много да?
Pass configuration for connection pool in go-redis to moira database configs