Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Compute Engine Disk Snapshots vs Reusable Image

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.

like image 492
J Freebird Avatar asked Nov 18 '25 17:11

J Freebird


1 Answers

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

like image 115
Sandeep Dinesh Avatar answered Nov 21 '25 05:11

Sandeep Dinesh