Alison's New App is now available on iOS and Android! Download Now

Module 1: Use GCP To Build Your Apps

    Study Reminders
    Support

    Exploring IaaS with Compute Engine
    Next you will discover how to build and deploy applications with compute engine, compute engine delivers virtual machines running in Google’s innovative data centers and worldwide fiber network. Compute engine is ideal if you need complete control over the virtual machine infrastructure need to make changes to the kernel such as providing your own network or graphics drivers to squeeze out the last drop of performance or if you need to run a software package that can’t easily be containerized or have existing vm images to move to the club.
    Compute engine is a type of infrastructure as a service it delivers scalable high-performance virtual machines that run on Google’s infrastructure. Compute engine VMs boot quickly with persistent disk storage and deliver consistent performance. You can run any computing workload on compute engine such as web server hosting, application hosting and application back ends. Virtual servers are available in many configurations including predefined sizes, alternatively there is the option to create custom machine types optimised for specific needs.
    Compute engine also allows users to run their choice of operating system and while compute engine allows users to run thousands of virtual CPUs in the system that has been designed to be fast and offers strong performance consistency, there’s no upfront investment required. The purpose of custom virtual machines is to ensure you can create virtual services with just enough resources to work for your application for example you want to run your application on a virtual machine but none of the predefined versions will fit the resource footprint you require or your application needs to run on a specific CPU architecture or GPUs are required to run your application.Custom virtual machines allow for creating a perfect fit for your applications to meet your workload requirements there are different machine type options that you can consider. For example a higher proportion of memory to CPU, a higher proportion of CPU to memory or a blend of both through Google standard configuration. Compute engine offers predefined machine types that you can use when you create an instance. A predefined machine type has a preset number of virtual CPUs or vcpus and amount of memory and are charged at a set price. You can choose from the general purpose machine types memory optimised machine types and compute optimised machine types. Predefined virtual machine configurations range from micro instances of 2 vcpus and 8 gigabytes of memory to memory optimised instances with up to 160 vcpus and 3.75 terabytes of memory. Compute engine also allows you to create virtual machines with the VCPU and memory that meet workload requirements, this has performance benefits and also reduces costs significantly. One option is to select from a predefined configurations a general-purpose configuration provides a balance between performance and memory or you can optimise for memory or performance you can create a machine type with as little as 1 vcpu and up to 80 vcpus or any even number of vcpus in between.You can configure up to 8 gigabytes of memory for vcpu alternatively if none of the predefined virtual machines fit your needs you have the option to create a custom virtual machine. When you create a custom virtual machine you can choose the number of CPUs the amount of memory required the CPU architecture to leverage and the option of using GPUS.Network storage up to 64TB in size can be attached to the VMs as persistent disks. Persistent disks are the most common storage option due to their price performance and durability. And can be created in HDD or SSD format. For VM instance is terminated its persistent disk retains data and can be attached to another instance you can also take snapshots of your persistent disk and create new persistent disks from that snapshot.Compute engine offers always encrypted local SSD block storage unlike standard persistent disk local ssds are physically attached to the server hosting the VM instance offering very high input output operations per second and very low latency compared to persistent disks. Predefined local SSD sizes upto 3 terabites are available for any vm with at least 1 vcpu by default most compute engine provided Linux images will automatically run an optimisation script that configures the instance for peak local SSD performance. Standard persistent disk performance scales linearly up to the VM performance limits of the CPU count of four or more For your instance doesn't limit the performance of standard performance disks for VCPU count of less than 4 for an instance reduces the WRITE limit for input output operations per second or IOPS because network egress limits are let's are proportional to the vcpu count. The right limit also depends on the size of input-output arrivals for example 16 KB IOPS consume more bandwidth than 8 kbps at the same IOPS level and throughput performance increase linearly with the size of the disc until it reaches set for instance limits.The iops performance of SSD persistent disks depends on the number of vcpus in the instance in addition to DISK size. Low core VMs, low write iops and throughput limits due to the network egress limitations on write throughput. SSD performance scales linearly until it reaches the limits of the volume or the limits of each compute engine instance. SSD read bandwidth and IOPS consistency near the maximum limit largely depends on network and egress utilisation some variability is to be expected especially for 16 KB IOPS near the maximum iops limits. Networks connect compute engine instances to each other and to the internet. You can segment networks use firewall rules to restrict the access to instances and create static routes to forward traffic to specific destinations.You can scale up applications on compute engine from zero to full throttle with Cloud load balancing distribute your load balance computer resources in single or multiple regions close to your users and to meet your high availability requirements. Sub networks segment your Cloud network IP subnetwork prefixes can be automatically allocated or you can create a custom topology.Sub networks and cloud load balancing are both discussed in the module it helps to network.Where you build a compute engine instance you use a virtual network adaptor which is part of the instance to connect a virtual machine to a network much of the same way you would connect a physical server to a network. For compute engine you can have up to 8 virtual adaptors sub networks and cloud load balancing are both discussed in the module it helps to network. All virtual machines are charged for 1-minute and 4 time which is the minimum charge for a vm. After that per second pricing begins meaning that you only pay for the compute TIME used. Google offers sustained use discount which automatically provide discounted prices for long-running work loads without the need for sign-up fees or any upfront commitment. Predefined machine types are discounted based on the percent of monthly use while custom machine types are discounted on a percent of total views. The gcp pricing calculator is a great way to see pricing estimates based on the different configuration options that are available and instances salt and loads persistent disks, load balancing and cloud GPUs.