My understanding is that in some cases it's desirable to add more CPU/memory to a single database instance without downtime i.e. "vertically scale" it to handle more load.
I'm aware that there are a multitude of ways to scale a database like horizontal scaling, sharding, etc. but that's not what I'm asking here - I only care about vertical scaling.
I was asked in an interview how this zero downtime vertical scaling might be achieved "under the hood." Here's what I came up:
If a database is running inside a VM then the CPU/memory can be changed without restarting the VM - called "CPU Hot-Plugging" e.g. https://docs.oracle.com/en/virtualization/virtualbox/6.0/admin/cpuhotplug.html#:~:text=Oracle%20VM%20VirtualBox%20supports%20adding,%2Dadd%20and%20hot%2Dremove.
It seems like the database could also be run inside something like Kubernetes/Docker which also can allow dynamic resizing without stopping https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/. In this case more CPU isn't being added to a given VM/physical machine but the existing CPU is being divided up differently e.g. https://shekhargulati.com/2019/01/03/how-docker-uses-cgroups-to-set-resource-limits/.
I got the impression I had missed something so wanted to ask this question here - are there other mechanisms that exist outside VMs/Docker or have I misunderstood vertical scaling in some way?