Learning objectives
After reading this article you will be able to:
- Understand what sets the cloud apart from a fixed server
- Tell IaaS, PaaS and SaaS apart, and public, private and hybrid clouds
- Know when the cloud pays off and when it does not
On this page
- How does cloud hosting work?
- What are the essential characteristics of the cloud?
- What are the service models: IaaS, PaaS and SaaS?
- Public, private or hybrid cloud?
- Cloud vs VPS vs shared hosting: what is the difference?
- What does this look like for a real project?
- When is the cloud not the best choice?
- How to do this on Square Cloud
- FAQs
Before the cloud, hosting an app meant buying or renting a whole machine, placing it in a datacenter and paying for it even when nobody visited. If traffic grew, you had to buy another machine and wait.
The most cited definition of the cloud comes from NIST, the US standards institute. It describes the cloud as a model for on-demand network access to a shared pool of configurable computing resources that can be rapidly provisioned and released with minimal effort or provider interaction.
How does cloud hosting work?#
A provider runs datacenters full of physical servers. Virtualization or container software splits those servers into isolated units, and each customer gets one with a set amount of CPU, RAM and disk. You reach everything through a dashboard, an API or a command line.
Because the split happens in software, creating, resizing or deleting a unit takes seconds or minutes, not days. That speed is what separates the cloud from renting a physical server.
What are the essential characteristics of the cloud?#
NIST lists five. Use them as a test: if a service lacks most of them, it is probably traditional hosting under a new name.
- On-demand self-service: you provision resources yourself, without opening a ticket.
- Broad network access: resources are available over the network through standard mechanisms, from many kinds of devices.
- Resource pooling: the provider serves many customers from the same hardware.
- Rapid elasticity: capacity can grow and shrink quickly. Elasticity is not the same as autoscaling: not every provider adjusts on its own, and many leave resizing to you.
- Measured service: usage is metered and you pay for what you provision or consume.
What are the service models: IaaS, PaaS and SaaS?#
NIST's three models differ in how much of the stack is yours to run.
| Model | What you get | What you handle | Example |
|---|---|---|---|
| IaaS (infrastructure) | Virtual machines, network, disk | OS, runtime, app, updates | A VPS |
| PaaS (platform) | A ready environment for running code | Your code and environment variables | Container deploy platforms |
| SaaS (software) | A finished application | Just using it | Gmail, Notion |
People hosting bots, APIs or websites usually choose between IaaS and PaaS. The practical difference is covered in VPS vs cloud platform: on a VPS you administer the system, on a platform you only ship the project. The next step, putting code online, is covered in what deploy means.
Public, private or hybrid cloud?#
These are the deployment models:
- Public: the infrastructure belongs to a provider and serves many customers. This is what most developers use.
- Private: the infrastructure is used by a single organization, owned or rented.
- Hybrid: a mix of both, such as sensitive data on a private cloud and the website on a public one.
- Community: shared by organizations with common concerns, such as agencies in the same sector.
Cloud vs VPS vs shared hosting: what is the difference?#
On shared hosting, many sites share one server and you control little. On a VPS you get a virtual machine with full access, but of fixed size. In the cloud, resources are not tied to one specific machine: you adjust size and count, and your bill follows. The difference between virtual machine and container isolation is in container vs virtual machine.
What does this look like for a real project?#
Take a Node.js API. On traditional hosting, you rent a 4 GB server, install Node.js, and set up the firewall and automatic restarts. In the cloud (PaaS model), you upload the code, pick 512 MB of RAM, set environment variables and the platform runs the container. If usage grows, you move to 1 GB. If the project ends, you delete it and stop paying.
When is the cloud not the best choice?#
- Constant, predictable load: dedicated servers or a fixed VPS often cost less than on-demand resources.
- Data residency rules: check where the datacenters are before signing up.
- Provider lock-in: proprietary services make migration hard. Containers and open standards reduce that risk.
- Hidden costs: charges for traffic, requests or data egress can surprise you. Read the pricing policy before you sign up.
How to do this on Square Cloud#
To host a bot, an API or a website without administering an operating system, Square Cloud offers self-service cloud hosting: you deploy, choose the RAM of each application and control the settings. Applications run in isolated, always-on containers, with several runtimes, such as Node.js, Python, Java, Go and Rust; see the ones available today on Runtimes.
You deploy by uploading a ZIP in the dashboard, with the CLI, through GitHub (with the official GitHub Action) or with the VS Code extension. The squarecloud.app config file is optional: the dashboard generates one at deploy, or you write it at the project root yourself. Environment variables live in the dashboard and apply on the next restart, with no rebuild.
The plan's RAM is a pool shared across your applications, and you change each one's share whenever you want. There is no autoscaling: adjustments are manual, in the settings or through the API. Every plan is paid, starting with Hobby at R$12.49 per month.
See what the platform includes in Square Cloud features.
Deploy
Push from GitHub, the CLI or a ZIP and go live in seconds
FAQs
Is cloud hosting the same as a VPS?
Not exactly. A VPS is a rented virtual machine, which may run in a cloud. Cloud hosting is the broader idea: VPSs, containers and deploy platforms all fall under it.
Is cloud hosting more secure than my own server?
It depends. The provider secures the physical infrastructure and network, but the security of your app, passwords and configuration is still your responsibility.
Do I need server skills to use the cloud?
It depends on the model. With IaaS, you configure the operating system. With a deploy platform, you upload code and the provider supplies the infrastructure it runs on.
Is the cloud always cheaper than traditional hosting?
No. It usually pays off for small or variable workloads. For a constant, predictable load, a dedicated server or a fixed-size VPS can cost less.
More in Deploy
See all 33 articles- What are environment variables?Environment variables are key-value pairs the operating system hands to a process at startup. Learn to read them in Node.js and Python and keep tokens out of code.
- What is a deployment?A deployment takes a version of your code to a server, prepares it and starts it. See the stages, the methods and how to roll back when it goes wrong.
- How much RAM and CPU does my app need?Size RAM and CPU by measuring your app's real peak and adding about 30% headroom. Learn how to measure in Node.js, Python and Java and what to do if short.
- Automatic deploys with GitHub ActionsAutomatic deploys with GitHub Actions ship your code to the server on every push. See the workflow step by step, secrets, tests before deploy and common errors.