This write-up is a thorough insight into the Instances on the cloud. In the cloud computing universe, you hear the term all the time. Instances spinning up based on the demand, Instances going down.
I’ll cover all the frequently asked questions on it such as What is an instance? What is the difference between a server and an instance? What is an instance life cycle? Why do Instances need attached persistent storage? & stuff.
So, without any further ado.
Let’s get on with it.
1. What is an Instance In Cloud Computing?
In very simple words, a server running our application is called an instance. Think of one server as one instance.
An Instance is a virtual machine which runs our workloads in the cloud. Often the term VM Virtual Machine & Instance are used interchangeably.
The term server & instance can also be used interchangeably but in the cloud computing universe, the term instance is always preferred over the server.
One single instance can host our workload or it can be hosted by quite a number of them grouped together in a cluster.
They can also be spread out geographically in different availability zones provided by the cloud provider.
Simplifying it even further, imagine a simple CRUD based app been hosted by an Apache Tomcat server on our local desktop.
Now when we deploy that app to the cloud, in cloud computing jargon that app becomes the workload & the Apache server becomes an instance.
Instances have no dependency on the workload & vice versa. Both are loosely coupled. This allows them to spin up & down as per the demand.
Also, having no dependency the workload becomes more portable. It can be moved around from on-prem to cloud & across different cloud platforms without much hassle.
Using instances in different ways such as making them Redundant, Replicating them, makes our systems fault-tolerant, help achieve us High Availability.
Instances are virtual machines which run the images of Operating Systems like Linux & Windows. We can create custom images too as per our requirements or import existing images & run them on the cloud instances.
Instances can also run containers with container optimized operating systems.
Containers & Virtual machines, the difference between them, their use cases, I’ll cover in a separate write-up.
Instances have templates which help us clone new instances with the existing configuration saving us a lot of time.
When deploying our workloads on the cloud, we can choose the hardware properties of our Instances, such as the number of virtual CPUs, memory, storage capacity etc.
Instances are categorized into several different types by the cloud providers where each category of instances serves certain specific use cases. What are their types? I’ll talk about them up next.
2. What are the Different Instance Types?
Instances are classified based on their hardware capabilities such as the CPU power, disk storage capacity, memory size etc. Below are the Instance types commonly offered by cloud providers.
These Instance types are configured for general use cases such as running web servers, micro-services etc. They have a balance between the resources allocated to them such as CPU, memory etc.
High CPU Instances
These Instances are specifically built to provide a high computing power to run compute-intensive workloads such as running distributed analytics, batch processing, machine learning algorithms, scalable multi-player gaming, graphics rendering etc.
High Memory Instances
These Instances are built for running memory-intensive workloads such as real-time data ingestion, big data analytics, high-performance databases, running distributed in-memory caches etc.
Instances With GPU
These Instances provide the power of the GPU. Required for advanced computing requirements such as running data-intensive machine learning algorithms, data processing, 3D rendering, Animation, Virtual Reality applications, Autonomous vehicles, Fluid dynamics, Blockchain computations etc.
3. What are Preemptible Instances?
Businesses can use Preemptible instances at a lower rate than the regular instances offer with some trade-offs.
Their availability is not guaranteed at all times. Cloud providers offer these instances based on their availability, these instances can be terminated at any time from our workload & be allocated to other high priority tasks.
Use cases suitable for Preemptible Instances are stateless tasks such as batch processing, image compression back-end process etc.
Tasks which are not so mission critical & are resilient to failures. Even if the instances are terminated & pulled away, slowing down of these tasks does not impact the service as a whole.
There are other limitations involved with Preemptible instances too. They vary from provider to provider.
4. What is an Instance Group?
An Instance group is a group of instances running together as a single entity ideally in a cluster.
Putting instances together in a group makes enforcing policies & configuration easy. Policies and rules can be about High availability configurations, auto-healing, load balancing, applying updates etc.
Managing instances in specific geographic availability zones becomes easier too.
5. Why Do Instances Need Persistent Storage?
Instances have persistent memory attached with them which can be augmented based on the requirement.
This helps in retaining the running state in case the instance fails and goes down. New instances spinning up can access the running state from the persistent storage and continue the task without having the end user notice the instance swap.
6. What is an Instance Life Cycle?
Right from the point in time an instance is provisioned, it goes through various stages in its life cycle such as being provisioned, staged, being in the running state, being stopped, Terminated & spinning up again.
Let’s quickly go through the different stages in an instance’s life-cycle.
Provisioning – In this stage, the instances are not running yet. They are allocated to run a workload based on the set of rules, configuration.
Staging – Cloud resources get allocated to an instance in this stage. The instance gets prepped up for launch.
Running – Instance starts hosting the workload. If multiple Instances are already running in the cluster, the new instance shares the load with other already running instances.
Terminated – Instance is down either due to failure or manually done by the user. It can be reset, restarted or deleted at this stage.
7. What are Single & Multi-Tenant Instances? What is the Difference Between them?
Tenant in computing means a user. So, a single tenant would naturally mean a single user & multi-tenant would mean multiple users.
Now in context to cloud instances, a single tenant instance means an instance running the workload of a single customer. No sharing of resources with any other customer.
You can think of bare metal server in context to a single tenant instance.
A bare metal server is one physical hardware which is utilized by one customer. The customer may run his multiple workloads on the single tenant bare metal server but still, it would be used by just one customer.
Bare metal servers are typically used when running their workloads on-prem.
On the contrary, think of virtual machines in context to multi-tenant instances.
Virtual machines run the workload of multiple customers in the cloud, the resources are shared between several different customers which sometimes lead to a noisy neighbour problem.
Noisy neighbour problem occurs when a workload of one customer in a shared resource environment causes negative performance effects on the workloads of other customers. It may consume a big chunk of shared machine resource affecting other workloads.
Hypervisors are getting pretty advanced but still, they don’t eradicate this problem by cent per cent.
A single tenant instance is dedicated to a customer & can be utilized for data-intensive workloads for better performance. And naturally, it would have high costs associated with it.
Also, single tenant instances are not exclusive to on-prem setups, they are also offered by the public cloud platforms such as Google Cloud.
There are certain spaces like Finance where businesses prefer to run their workloads on single-tenant instances, this makes their setup more secure also they adhere to the industry security compliance.
8. More On the Blog
Well, Guys!! This is pretty much it on the Instances in cloud computing. If you liked the article, share it with your folks.
Follow 8bitmen on social media. You can subscribe to the browser notifications to stay notified of the new content on the blog.
I’ll see you in the next write-up.
- Distributed Systems, Scalability & System Design #1 – Heroku Client Rate Throttling
- Zero to Software/Application Architect – Learning Track
- Java Full Stack Developer – The Complete Roadmap – Part 2 – Let’s Talk
- Java Full Stack Developer – The Complete Roadmap – Part 1 – Let’s Talk
- Best Handpicked Resources To Learn Software Architecture, Distributed Systems & System Design