FROM ARCHITECTURE
TO PRODUCTION
Shipped is not done.
YOUR APP WORKS.
THEN 10,000 USERS ARRIVE.
10 friends
The demo works. Low traffic hides weak points.
10,000 users
Requests pile up, CPUs saturate, the database struggles.
One bad deploy
The new version breaks a feature users already depend on.
TWO QUESTIONS.
ONE ENGINEER.
PART 1 — DESIGN
How do we select compute, storage, networking, communication, and scale?
PART 2 — DELIVER
How do we test, build, deploy, observe, recover, and improve?
REQUIREMENTS
BEFORE SERVICES.
Functional
Upload CV • check job status • download report
Non-functional
Speed • reliability • security • scale • budget
SIX INGREDIENTS
OF A GOOD SOLUTION.
COMPUTE
Where code runs: EC2, ECS, Lambda.
NETWORK
How traffic reaches services: DNS, VPC, ALB, API Gateway.
STORAGE
Where data lives: S3, RDS, DynamoDB.
COMMUNICATION
Sync HTTP, async SQS, events.
SCALING
Capacity, concurrency, bottlenecks.
RELIABILITY
Failure isolation, security, recovery.
WHAT HAPPENS
WHEN YOU CLICK UPLOAD?
POST /jobs { "fileKey": "uploads/cv123.pdf" }
202 Accepted { "jobId": "123", "status": "PENDING" }MAP THE IDEA TO AWS.
S3
Actual PDFs and output reports.
DynamoDB
Job ID, user ID, status, result key.
SYNCHRONOUS
VERSUS ASYNCHRONOUS.
SYNCHRONOUS
You wait at the counter until the food is ready.
ASYNCHRONOUS
You get an order number. The kitchen works while you do other things.
WHY PUT A QUEUE
IN THE MIDDLE?
30,000 waiting jobs after five minutes
If all 300/s are accepted into SQS, 30,000 accumulate in five minutes. Requests rejected before the queue are not saved.
WHAT IF THE SAME JOB
RUNS TWICE?
IDEMPOTENCY
Repeated execution produces the same intended effect.
DEAD-LETTER QUEUE
Capture repeatedly failing messages for investigation.
WHAT ACTUALLY IS
A DOCKER CONTAINER?
IMAGE
A read-only packaged blueprint: code + dependencies + configuration defaults.
CONTAINER
A running isolated process created from that image. Shares the host OS kernel.
REGISTRY
Amazon ECR stores your container images.
docker build -t cv-api:v1 . docker run -p 8080:8080 cv-api:v1
EC2, ECS OR LAMBDA?
EC2
A virtual machine. Maximum OS and machine control; you manage more.
ECS + FARGATE
Run containers; AWS manages underlying compute capacity.
LAMBDA
Event-driven code execution with managed scaling, within service limits.
AWS DESIGNS
THE MACHINE ITSELF.
NITRO SYSTEM
Dedicated hardware plus a lightweight hypervisor handles virtualization, network and storage I/O.
GRAVITON
AWS-designed Arm CPUs help optimize performance per dollar on supported workloads.
SERVERLESS
STILL HAS SERVERS.
SCALE UP.
OR SCALE OUT.
VERTICAL
Make one server bigger: 2 vCPU → 8 vCPU.
HORIZONTAL
Run more instances: 1 server → 4 servers.
CONCURRENCY
IS NOT THROUGHPUT.
Capacity ≈ concurrency ÷ average job duration
Assuming one job per execution, stable work durations and no other bottlenecks.
FILES ARE NOT
DATABASE ROWS.
AMAZON S3
Objects: CV PDFs, images, generated reports.
DYNAMODB
Key-value/document records: job states and result keys.
RDS / POSTGRES
Relational data, joins, SQL and transactions.
ELEVEN NINES.
WHAT DOES THAT MEAN?
39 REGIONS.
124 AVAILABILITY ZONES.
REGION
A distinct geographical area with AWS infrastructure.
AZ
One or more data centers designed for isolation within a Region.
NEARLY 20 MILLION KM
OF NETWORK FIBER.
PRIVATE BACKBONE
AWS operates long-distance networking that can reduce reliance on outside networks.
CLOUDFRONT
Caches suitable content closer to users at edge locations.
OUR APPLICATION,
NOW READY FOR REAL TRAFFIC.
Browser
POST /jobs · GET /jobs/{id}
validate · enqueue
buffer · retries
input files + reports
process · idempotent
job status
A GOOD DESIGN IS
MORE THAN FAST.
SECURITY
Who can access the PDFs? Are IAM permissions least privilege?
COST
What happens to spending if traffic increases 10×?
FAILURE
If the worker crashes or the DB slows, does work disappear?
MERGED IS NOT SHIPPED.
SHIPPED IS NOT DONE.
UNIT. INTEGRATION.
CONTRACT. END-TO-END.
UNIT
Does discount(1000, 10%) return 900?
INTEGRATION
Can our API really write a row in PostgreSQL?
CONTRACT
Does the frontend still receive orderId?
END-TO-END
Can a user upload a CV and download a report?
“IT WORKED UNDER LOAD
ON MY LAPTOP.”
LOCAL
Maybe no TLS, no cross-zone network latency, tiny datasets, and one process.
PRODUCTION
Real networks, database locks, AWS quotas, traffic bursts, downstream failures.
FROM A COMMIT
TO A RUNNING VERSION.
git push → tests → build once → deploy same artifact
ONE SERVER MISSED.
$440 MILLION LOST.
WHAT FAILED
Inconsistent deployment + legacy behavior reactivated.
WHAT TO BUILD
Version checks, repeatable rollout, kill switch, monitoring.
CODE CAN BE LIVE
WITHOUT THE FEATURE BEING LIVE.
DEPLOY
Version 2 is now running on the servers.
RELEASE
Only 5% of users can access the new scoring algorithm.
ROLLING. BLUE–GREEN.
CANARY.
ROLLING
Replace instances in small batches.
BLUE–GREEN
Prepare a second environment and switch traffic.
CANARY
Expose a small traffic share; compare errors and latency.
DATABASE CHANGES
NEED A COMPATIBILITY PLAN.
v1 reads name → both fields temporarily supported → v2 reads full_name
A DEPLOYMENT
SHOULD HAVE A CHECKLIST.
BEFORE
Migrations tested, artifact identified, flags safe, rollback understood.
DURING
Watch errors, latency, queue age and business signals.
AFTER
Compare to baseline, confirm outcomes, record lessons.
LOGS, METRICS,
AND TRACES.
LOGS
“Job 123 failed: unsupported PDF.”
METRICS
“SQS oldest message age is 840 seconds.”
TRACES
“The database call took 2.9 of 3 seconds.”
THE FOUR SIGNALS
AND THE FIFTH QUESTION.
ERRORS
4xx/5xx rates, failed jobs.
LATENCY
p50, p95, p99, job completion time.
TRAFFIC
Requests per second, jobs per second.
SATURATION
CPU, memory, DB connections, queue pressure.
What do users actually feel?
Our API can return 202 in 50 ms while the job sits in SQS for 20 minutes.
AVERAGES CAN
HIDE UNHAPPY USERS.
SLI. SLO. SLA.
SLI
A measurement: % of jobs completed within two minutes.
SLO
Our goal: 99.9% of valid jobs within two minutes over 30 days.
SLA
A formal agreement about service levels and consequences.
99.9% IS NOT
100%. THAT’S ON PURPOSE.
ERROR BUDGET = allowance for unreliability
If failures are consuming the budget rapidly, prioritize stabilization over risky releases.
RETRY WISELY.
FAIL GRACEFULLY.
TIMEOUT
Do not wait forever on a dependency.
BACKOFF + JITTER
Space retries out; avoid synchronized retry storms.
CIRCUIT BREAKER
Stop hammering a dependency that keeps failing.
BULKHEAD
Reserve resources so one workload cannot drown another.
THE DEPLOY IS GREEN.
THE QUEUE IS NOT.
MITIGATE
Roll back or disable the change. Avoid blindly scaling workers.
VERIFY
Watch queue age, completions, errors, and user impact.
FOUR QUESTIONS
FOR REAL ENGINEERS.
START FREE.
THEN BUILD SOMETHING REAL.
AWS EDUCATE
Free beginner learning and console labs; no personal AWS account or card required.
AWS SKILL BUILDER
Hundreds of free courses; some advanced labs need subscriptions.
KODEKLOUD
Hands-on Linux, Docker, DevOps and selected free labs.
LOCALSTACK
Local AWS-compatible emulation, subject to current plan limits.