-
Notifications
You must be signed in to change notification settings - Fork 121
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
Make DB pool size configurable based on instance role #1848
Conversation
config/database.yml
Outdated
@@ -5,7 +5,7 @@ postgresql: &postgresql | |||
port: 5432 | |||
|
|||
defaults: &defaults | |||
pool: 5 | |||
pool: <%= (File.exist?('/etc/login.gov/info') && File.read('/etc/login.gov/info/role').chomp == 'worker') ? 26 : 5 %> |
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.
Thoughts on setting this for just the prod environment, and not the default environment?
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.
We need this for other ends too (pt and sometimes staging)
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.
I think what Jonathan meant by environment was "development", "test", and "production". All the lower envs are running in the Rails "production" environment. So, he's asking to make the change in the "production" section at the bottom of this file.
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.
__Why__ * Workers need a 5x larger pool than the IdP hosts hence we need a way to configure the pool size based on instance role. __How__ * Use a conditional to set the pool size based on the instance role type.
0f8973c
to
2b8160d
Compare
Updated so the config is only in rails |
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.
LGTM.
Why
How