Question

How can I downgrade my DB cluster

Hi, I was able to upgrade my DB cluster, but there is no option to downgrade it! I don’t understand why not. I can downgrade and upgrade my droplets whenever I want, but not my DB cluster? Is there a way to do this, other than backing up, destroying and creating a smaller DB cluster.

If there isn’t another way, then please help me with my case, only 2 days in the entire month do I need the additional DB memory and CPU, and honestly I do not wish to spend the extra $60 or even $90 a month, just for those two high season days, so what can I do to avoid paying more than I should.

Do read only nodes help me with this case? Assuming I have reconfigured my software, to distribute connections between primary and read-only node, for read statements, does this help me with my case, when the high season is over, I could just destroy the read only node.

Or is there a better option, cause’ honestly this solution sounds like a lot of work.

Thanks


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hi @ALKateb,

At the moment Digitalocean does not support scaling down of a Managed database cluster from the UI, You can read about limitations here:

https://docs.digitalocean.com/products/databases/mysql/#limits

Alternatively, you can resize the database cluster to size your choice using DO API/DOCTL CLI.

DOCTL CLI:

https://docs.digitalocean.com/reference/doctl/reference/databases/resize/

doctl databases resize b1723184-32d7-41eb-8bb3-f911b6d9d449 --num-nodes 1 --size db-s-1vcpu-1gb

DO API:

https://developers.digitalocean.com/documentation/v2/#resize-a-database-cluster

Please note, there are 3 different slugs identifiers for machine type. You have to modify them according to your cluster resize slug size. For example

Basic Node :
{"size":"db-s-2vcpu-4gb", "num_nodes":1}

General Purpose Node :
{"size":"gd-4vcpu-16gb", "num_nodes":1}

Storage Optimized Node :
{"size":"so1_5-4vcpu-32gb", "num_nodes":1}
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer xxxxxx" -d '{"size":"gd-4vcpu-16gb", "num_nodes":1}' "https://api.digitalocean.com/v2/databases/{UUID}/resize"

I hope this helps!

Regards, Rajkishore

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.