SECTION 04 / 9

Part 3 — Deployment Hosting

3 min read
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)
Three hosting options: who sets up which layer
Three hosting options: who sets up which layer
Open image ↗
Three hosting options: who sets up which layer

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.
Bare metal: the company owns the physical server, manages hardware maintenance, the operating system, software installation and network security itself, and serves the web application over the internet.
Bare metal: the company owns the physical server, manages hardware maintenance, the operating system, software installation and network security itself, and serves the web application over the internet.
Open image ↗
Illustration: Part 3 — Deployment Hosting

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.

IaaS slices an 8-core, 32 GB server into 8 VMs of 1 core and 4 GB
IaaS slices an 8-core, 32 GB server into 8 VMs of 1 core and 4 GB
Open image ↗
IaaS slices an 8-core, 32 GB server into 8 VMs of 1 core and 4 GB

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 MetalIaaSPaaS
What you getPhysical server you ownA virtual machine (slice of a server)Automatically sets up the web server and database; you provide configuration options
You set upHardware, OS, web server, appWeb server, database, app (on the VM)Just the app (plus configuration)
ExamplesYour own rack/blade serversDigitalOcean, AWS, LinodeHeroku, Google App Engine
AdvantageHighest performance (exclusive access, not shared)Cheaper; no maintenance overheadVery easy to deploy
DisadvantageMost expensive upfront, setup and maintenance effortProvider-specific configurations; shared, so performance may sufferLack of control
Bare metal, IaaS and PaaS: advantages and disadvantages
Bare metal, IaaS and PaaS: advantages and disadvantages
Open image ↗
Bare metal, IaaS and PaaS: advantages and disadvantages

The next two parts are the tutorials, which show IaaS and PaaS in practice. The picture below previews the difference between them.

IaaS vs PaaS workflow: on DigitalOcean you create the VM, configure the OS, install dependencies and deploy the app yourself; on Heroku you prepare the app and push the code, and the platform builds and runs it.
IaaS vs PaaS workflow: on DigitalOcean you create the VM, configure the OS, install dependencies and deploy the app yourself; on Heroku you prepare the app and push the code, and the platform builds and runs it.
Open image ↗
Illustration: Part 3 — Deployment Hosting
YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑