You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How many people would be interested on an autoscaling functionality?
It would works as follow: the manifest will allow to specify a threshold of max connections a DB is able to handle. A cron job will be scheduled to periodically count the connection number in each DB (to create a sort of view) then every x seconds the operator will go check whether any of the clusters that have the autoscaling functionality enabled need to scale.
The parameters to specify in the postgres manifest are these:
metricsUpdateIntervalSecs: how often to run the cron job query that registers how many connections are opened to a DB (the more frequent, the more precise but also the more demanding) trigger: the value of connections above which an upscale should be triggered (only the highest number across all the DBs will be considered) leeway: the standard deviation of how many points the value should actually differ from the trigger to cause a scaling event (in order to prevent continuous scaling for outliers or transitory events)
Currently known limitations:
Of course spinning up and down the cluster requires time, and the more data there is in the DB, the longer it would take. However I have personally implemented this on a semi-production environment (we are currently in the midst of switching over) and to give you an idea, for a DB that holds 1.5 GB of data in a VM with 4 cores and 16 GB or RAM is actually handling the scaling more than decently. Scaling up and down in about a minute or so (of course network is also a main factor).
This solution is definitely intended for small/medium sized applications, but I found it actually has a lot of potential. If a decent amount of people are interested in it, I will continue the development and as soon as possible at least publish a branch in the main repo.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How many people would be interested on an autoscaling functionality?
It would works as follow: the manifest will allow to specify a threshold of max connections a DB is able to handle. A cron job will be scheduled to periodically count the connection number in each DB (to create a sort of view) then every x seconds the operator will go check whether any of the clusters that have the autoscaling functionality enabled need to scale.
The parameters to specify in the postgres manifest are these:
metricsUpdateIntervalSecs
: how often to run the cron job query that registers how many connections are opened to a DB (the more frequent, the more precise but also the more demanding)trigger
: the value of connections above which an upscale should be triggered (only the highest number across all the DBs will be considered)leeway
: the standard deviation of how many points the value should actually differ from the trigger to cause a scaling event (in order to prevent continuous scaling for outliers or transitory events)Currently known limitations:
Of course spinning up and down the cluster requires time, and the more data there is in the DB, the longer it would take. However I have personally implemented this on a semi-production environment (we are currently in the midst of switching over) and to give you an idea, for a DB that holds 1.5 GB of data in a VM with 4 cores and 16 GB or RAM is actually handling the scaling more than decently. Scaling up and down in about a minute or so (of course network is also a main factor).
This solution is definitely intended for small/medium sized applications, but I found it actually has a lot of potential. If a decent amount of people are interested in it, I will continue the development and as soon as possible at least publish a branch in the main repo.
1 vote ·
Beta Was this translation helpful? Give feedback.
All reactions