Part 3 — Deployment Hosting
On this page 5 headings
What is hosting?
Hosting is the infrastructure required to host (deploy) an application. Web applications are usually hosted on server systems, and clients access the application from the server.
Section point: An important characteristic of hosting, especially for production, is that the system must be available all the time — 24 hours a day, throughout the year, with no unplanned downtime — and user data must be stored securely, because real users and real data are involved.
The lecture compares three hosting options:
- Bare metal servers
- Infrastructure-as-a-Service (IaaS)
- Platform-as-a-Service (PaaS)
A helpful way to remember them is the stack drawn on the slides. Every hosted web application needs four layers:
Server Hardware → Operating System → Web Server → Web Application
The three options differ in how many of these layers you set up yourself.
3.1 Bare metal servers
With bare metal you buy the actual server hardware and set up everything yourself: the operating system, the web server and the web application, which means all four layers.
- A server has the same basic parts as a desktop (CPU, motherboard, RAM, disk), but in much higher configurations and with server-specific features.
- Servers come in compact forms such as rack servers and blade servers, so that many can be stacked in a rack.
Advantage: Highest performance (exclusive access, not shared).
Disadvantages:
- Most expensive upfront. Servers can cost lakhs of rupees.
- Time and effort to set up hardware, OS, web server and application.
- Ongoing maintenance (time, effort and money), for example when a part fails and must be repaired.
3.2 Infrastructure-as-a-Service (IaaS)
An IaaS provider buys the server hardware, configures it, and rents you a part of that infrastructure for a fee.
Section example: An IaaS provider has a server with an 8-core processor and 32 GB RAM. It slices this into 8 parts, and each part is a virtual machine (VM) with 1 core and 4 GB of memory. You get exclusive access to your VM, and on it you set up your web server, database and application.
In terms of the stack, the provider gives you the hardware (as a VM) with an operating system. You set up the web server and web application.
Examples: DigitalOcean, AWS, Linode.
Advantages:
- Cheaper.
- No maintenance overhead.
Disadvantages:
- Each IaaS provider has its own set of configurations (CPU, memory options, etc.). You must learn them and check that they suit your application.
- The infrastructure is shared by others, so performance may suffer compared with your own dedicated server.
3.3 Platform-as-a-Service (PaaS)
A PaaS provider automatically sets up the web server and database; you provide configuration options.
In terms of the stack, the provider handles hardware, OS and web server. You only provide the web application.
Examples: Heroku, Google App Engine.
- Advantage: very easy to deploy. Give it your code and it takes care of setting up the web server, database server and so on.
- Disadvantage: lack of control. You don’t know or control the underlying OS, hardware or configuration.
3.4 Comparing the three options
| Bare Metal | IaaS | PaaS | |
|---|---|---|---|
| What you get | Physical server you own | A virtual machine (slice of a server) | Automatically sets up the web server and database; you provide configuration options |
| You set up | Hardware, OS, web server, app | Web server, database, app (on the VM) | Just the app (plus configuration) |
| Examples | Your own rack/blade servers | DigitalOcean, AWS, Linode | Heroku, Google App Engine |
| Advantage | Highest performance (exclusive access, not shared) | Cheaper; no maintenance overhead | Very easy to deploy |
| Disadvantage | Most expensive upfront, setup and maintenance effort | Provider-specific configurations; shared, so performance may suffer | Lack of control |
The next two parts are the tutorials, which show IaaS and PaaS in practice. The picture below previews the difference between them.
