Private Cloud Vs Public Cloud Computing
Tags: cloud, beginners, cloudcomputing, tutorial
Published: 2021-12-12 06:15:18


## What to expect from this blog?
You'll find high-level information about different cloud computing models, details are sufficient enough to understand the concept. So let's dive deep in.

There are different types of computing models such as private cloud, public cloud, hybrid cloud, and multi-cloud. For me, private was the most confusing one, and it took me some time to understand it correctly.

## Traditional Data Center

To understand it better let's first understand how traditional data center works. To set up a traditional data center, you need to purchase hardware for servers, switches, routers, etc. In other words, you're responsible for the setup and maintenance of the hardware where software code will run. Servers are installed on the racks along with network switches, routers, etc. **So why a traditional data center is becoming less popular?** because it's quite expensive, the resource may not be 100% utilized (you really do not want to run a micro-service on one complete hardware server), you need a lot of capacity planning, any addition of capacity like installing a new server may take longer time and quite risky, as you may accidentally knock down some network wire or power supply (that may result in an outage). But, it's still in use mostly because of need to keep sensitive data in personal data center and compliance requirement. Below is an illustration of a traditional data center.

![Traditional Data Center](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/clpcv0e3nwj2tw2qlbpn.jpg)

## Private Cloud

To overcome traditional data center challenges, the private cloud model comes to the rescue (though it has its own challenges, but it helps with better resource utilization). Before we move ahead and try to understand private cloud, let's see another popular term IaaS (Infrastructure as a Service). 
To place it in a simple language, IaaS is a model where you won't have to worry about the underlining hardware layer and only concentrate on the OS, runtime, and code (though you're still relying on the memory and CPU from actual hardware).

![IaaS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/izqpt45won8s7yos7p86.jpg)
> Note: Hypervisor is a component that creates an abstraction on top of the actual hardware that lets you run the virtual machine.

So, from the above illustration, you're responsible from the operating system (OS) layer, and above, that's the virtual machine (VM) box. Coming back to the private cloud, it's a hybrid between traditional and IaaS. In the private cloud model, you still own the hardware but we run technology like Hypervisor to create VM and run your application on top of it. That helps to better resource utilization as on single hardware server you can probably run more than one VMs. As an application team you're in more control of the virtual machine, which enables you to better utilize the resources and easily scale horizontally (in a micro-service architecture pattern). Team can decide on how much memory and vCPU (virtual CPU) are required by their application, and easily scale out the application instances.

## Public Cloud

Now, going to a public cloud model, if you take away the hardware, hypervisor, OS, runtime components from the earlier IaaS diagram, you're left with your application and its data, and that is also called as Platform as a Service (PaaS).

![Public Cloud](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4wteax2mbk8xa95q5y4.jpeg)

You're responsible for your application code and its data. So in other words, a public cloud is a cloud model where you don't own any hardware, you pay for services that you use in various pricing models like per request, per hour, etc. Cloud provider like AWS provide you EC2 as compute instance/server where you can run the code without any hardware operational challenge. In a public cloud provider case, the cloud provider owns the hardware in their physical location. There are a lot of benefits of using the public cloud e.g. not much capacity planning is needed, capacity can be increased quite easily and quickly, etc. **What is the disadvantage of using the public cloud?** as such there is no real downside of it, however, there could be compliance restrictions on storing sensitive data in a public cloud. Not because the public cloud is accessible to all, but, because maybe the system that stores data may not be portable to the cloud or organization really do not trust public cloud.

## Hybrid and Multi Cloud

Once, you understand public and private clouds, hybrid and multi-cloud models are just a piece of cake. 
Hybrid cloud means, you're running code on both places, i.e. private cloud in your physical data center and public cloud provider. **Why you'll do that?** you're still migrating to a public cloud, you need a failover strategy (where failover will happen to the private cloud), and of course sensitive data.
In a multi-cloud model, you want to run the application in multiple cloud providers like AWS, GCP, Azure, etc. **And again why you would do that?** you don't want to get locked on a single cloud provider and want the flexibility, freedom to move to a different cloud service when cloud provider increase the price.

## My Other Blogs:
- [Containers Vs Virtual Machines, which is better and why?](https://dev.to/akdevcraft/containers-vs-virtual-machines-45m1)
- [Log4J zero-day vulnerability demystified - Log4Shell](https://dev.to/akdevcraft/log4j-zero-day-vulnerability-demystified-log4shell-1f0h)
- [Why we need multiple code analysis tools?](https://dev.to/akdevcraft/why-we-need-multiple-code-analysis-tools-3d9o)
- [What is WAI-ARIA and why we need it?](https://dev.to/akdevcraft/aria-beginner-s-guide-17p)
- [React Application Testing Strategy](https://dev.to/akdevcraft/react-application-various-testing-options-543d)

_If you have reached here, then I did a satisfactory effort to keep you reading. Please be kind to leave any comments or ask for any corrections. **Happy Clouding!**_