I have a VM instance on GCE that I've configured. It has all the library installations and source codes that I need for my project. Now for scaling issue, I'd like to make more VM instances running on exactly the same code to improve the performance.
To my understanding, there are two ways to do this. One is Creat an Image From Persistent Disk to reuse the disk state. The other way is to use Snapshots.
There doesn't seem to be any documentation explaining the differences and usages in different situations. I wonder which one should I use for my purpose. Thanks in advance.
Persistent Disk Images can be exported and used outside the project. You can download it to your own computer if you wanted, so it is easier to make redundant copies in case someone accidentally deletes the image.
Snapshots are better for things like backups of your VM. They are differential, so if you take a new snapshot every week, you only pay for the difference.
Snapshots are cheaper in terms of storage cost, but there is a network fee if you use them across zones. I don't think images have this network fee.
I feel in this case, the Persistent Disk Image might be the better choice. They both should work, and I don't think using either is "wrong."
Here are some more links explaining the difference:
Google Compute Engine: what is the difference between disk snapshot and disk image?
GCE API for differential snapshots
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With