Cloud Computing

Chapter 9
14 min read
19 reads

A practical guide for software engineers stepping into the cloud — covering latency, performance, security, server resources, and a real AWS deployment with Flask, SQLite3, and Next.js.

The assumption here is that you've been acquainted with software engineering. You have developed your web apps locally on your laptop, and now are looking into deploying for other users to access your app.

You've written the code. It works on your laptop. Now what?

Moving software from your local machine to the internet is where most new engineers hit a wall. Cloud computing is not magic — it's someone else's computer, wired into a global network, with a billing dashboard attached. But understanding how it works, and what changes when you deploy, is what separates a developer who can build things from one who can ship them.

This guide walks you through the theory that actually matters, then gets hands-on with a real deployment on AWS.

What is Cloud Computing?

Cloud computing is the on-demand delivery of computing resources — servers, storage, databases, networking, software — over the internet, with pay-as-you-go pricing instead of owning physical hardware.

Instead of buying a server, racking it in a data center, running cables, and maintaining hardware, you rent what you need, when you need it, and stop paying when you're done.

There are three service models you need to understand:

IaaS — Infrastructure as a Service gives you raw compute, storage, and networking. You manage everything from the operating system upward. AWS EC2 and Google Compute Engine are examples. This is what we'll use in this guide.

PaaS — Platform as a Service is a managed runtime environment. You focus on code; the provider handles the infrastructure underneath. Heroku and AWS Elastic Beanstalk fall here.

SaaS — Software as a Service is ready-to-use software delivered over the web. Gmail, Notion, and Figma are SaaS. Zero setup, you just log in.

For most software engineers, IaaS is where you learn what's really happening. PaaS is where you go once you understand IaaS and want to move faster.

What Changes When You Deploy?

Your application works differently in production than it does on your laptop. Here's what changes and why it matters.

Environment Parity — Your dev environment, staging environment, and production environment are almost never identical. Different OS versions, different environment variables, different network configurations. Bugs that only appear in production exist because of this gap. Use Docker or environment variable management to close it as much as possible.

Process Management — On your laptop, you run python app.py and leave a terminal open. In production, your app must run as a long-lived background process that restarts automatically if it crashes, and survives server reboots. Tools like PM2 (for Node) and systemd or Gunicorn (for Python) handle this.

Logging and Monitoring — You can't SSH into production and look at a terminal every time something goes wrong. Structured logging and monitoring tools (CloudWatch, Datadog, Sentry) are how you see what's happening. If you don't set these up, you're flying blind.

Networking and DNS — Your app needs a public IP address, a domain name, SSL certificates for HTTPS, and the right ports open. None of this is automatic.

A typical deployment pipeline looks like this:

  1. You push code to Git
  2. A CI/CD system (GitHub Actions, CircleCI) runs your tests and builds the app
  3. The build is deployed to a staging environment
  4. After review, it gets promoted to production via a blue/green or rolling deploy

In this guide, we're not going to set up a full production server and deployment set up. However, we're going to deploy something close to that. The goal here is to understand the fundamentals of deploying applications to production. before we continue, let's talk about something very important when deploying applications; performance and latency.

Performance and Latency

Latency is the time between a client sending a request and receiving a response. Throughput is how many requests your server can handle per second. Both matter.

The user experience benchmarks you should know:

  • Under 100ms — feels instant to the user
  • 100–300ms — a slight delay they might notice
  • 300ms–1 second — clearly slow, frustration begins
  • Over 1 second — users start abandoning the page

What causes high latency?

Network distance is the most fundamental factor. A request from Nairobi to a server in Ohio has to physically travel thousands of kilometers through undersea cables and dozens of routers. The solution is to put servers closer to users, or use a CDN (Content Delivery Network) to cache assets at edge locations around the world.

Server processing time is where your code matters. Slow database queries, unoptimized loops, blocking I/O operations — all of these add time before your server can send a response. Profile your code. Use EXPLAIN on your SQL queries. Cache results that don't change often.

Payload size is often overlooked. Sending 5MB of...

Want to support this author?

By unlocking the full story, you directly support local writers. You'll also be able to track your reads, and discover amazing content!

Cloud Computing - SELF TAUGHT COMPUTER SCIENCE | Soma