Hosting and Deployment options

PDF version

(very rough notes)

Static sites

HTML is fixed at deployment time, not customized or regenerated on each request.

  • Upload some tree of files, and let the server serve them over HTTP.
  • Services differ on how those files get onto the server:
    1. File transfer interface (SFTP, SCP) to upload the files to a (Linux) server. Might have web portal – cPanel, webmin, …
    2. Directly “push” from a local (git) repository onto a server.
    3. Log in (ssh) to a server, and git pull

Types of hosts:

  • “Colocated” server ($$$$) – I own hardware, deliver it to data center for them to plug in to power & network.
  • Private server ($$$) – I’m renting the hardware in a data center, but I have exclusive access to it.
  • Virtual private server (VPS) ($$) – I’m sharing physical server with other users, but we each have separate virtual servers, so we can have exclusive control over their configuration.
  • Shared server ($) – I have a personal account on a shared server, but I don’t have (nearly as much) control over its configuration. Often have a cPanel, webmin.
  • Lots of cloud providers have “block storage” services. (Amazon S3 = Simple Storage Service). These can be configured for public access over HTTP. Amazon CloudFront = CDN = Content Delivery Network. It will copy your files to “edge locations” around the world. Can also stream media files.
  • GitHub Pages, GitLab Pages

Dynamic sites

HTML can be customized or regenerated on each request. (Each request is handled by running a function in some programming language.)

Complicated because you need dependency management for the program running on the server. (Right version of Python, PHP, …), and libraries for it.

  • With VPS (and above), you have control over the OS and packages that are installed, so you can set up what you need.
  • PaaS (Platform as a Service): Heroku, Amazon Elastic Beanstalk, GCP, …