Redundent Disks with Google Cloud Virtual Machine

I am using Google Compute Engine VM for a web server. Is it possible to setup a RAID type of disk structure with the virtual machine? I basically would like ti have 2 disks on the machine where they are always mirrored and in case one disk fails the other automatically takes over with no data loss or down time. Thanks for your help.

Answer

For this scenario, I will recommend other options for having always availability on your web service, as the issue is often the instance itself and not the disk regarding GCE running websites possible issues.

First thing to have in mind is to have a robust system, since a lot of us never take this in mind when using GCP compute engine (specially for web servers) as certain events are unpredictable, and it is best to be prepared for these events (region out of resources, ongoing known issues, VM failure).

I can tell that creating a Managed Instance Group will work for you as it will keep your service up in case of failure, it let you operate apps on multiple identical VMs. You can make your workloads scalable and highly available by taking advantage of automated MIG services, including: autoscaling, autohealing, regional (multiple zone) deployment, and automatic updating.

You can use managed instance group (MIG) for scenarios like these:

-Stateless serving workloads, such as a website frontend.

-Stateless batch, high-performance, or high-throughput compute workloads, such as image processing from a queue.

-Stateful applications, such as databases, legacy applications, and long-running batch computations with checkpointing.

A managed instance group creates each of its managed instances based on the instance template and optional stateful configuration that you specify.

Since you are searching for high availability on your web server, Instance groups keeps VM instances running. If a VM in the group stops, crashes, or is deleted by an action other than an instance group management command (for example, an intentional scale in), the instance group automatically recreates that VM in accordance with the original instance’s specification (same VM name, same template) so that the VM can resume its work.

Attribution
Source : Link , Question Author : Armen Geo , Answer Author : Airus

Leave a Comment