Choosing A Hosting Platform
Hosting choices range from shared hosting and virtual machines to managed application platforms, containers, functions, and large cloud service portfolios.
Why This Matters
They exist because teams trade control, operational labor, scaling behavior, compliance, ecosystem integration, and cost predictability differently.
Working Model
Compare the application processes, storage, database, cache, queue, networking, secrets, observability, regions, support, and recovery requirements before comparing provider logos.
Practical Rules
- Start with workload and team capability.
- Prefer managed services when they remove undifferentiated operations.
- Estimate total cost including labor and data transfer.
- Plan backups and exit paths.
- Use infrastructure as code for repeatability.
Failure Modes
- Choosing only by introductory price.
- Using serverless for incompatible long-running state.
- Assuming managed means no operational responsibility.
- Adopting many proprietary services without an exit analysis.
Verification
- Deploy a representative staging workload.
- Test scaling and failure.
- Restore backups.
- Review bills and quotas.
What You Should Be Able To Do
After this lesson, you should be able to explain why hosting categories exist and how to compare DigitalOcean, AWS, Google Cloud, Azure, and simpler providers, choose a suitable approach for a real PHP project, and verify the result instead of relying on assumptions.
Practice
Practice: Build A Hosting Decision Matrix
Compare a small PHP SaaS across VPS, PaaS, containers, and serverless.
Your answer must:
- state the intended outcome;
- show the commands, data flow, or implementation shape;
- identify at least one unsafe alternative;
- explain how the result will be verified.
Show solution
Score operational effort, runtime fit, database needs, scaling, background jobs, compliance, cost, observability, and team experience with documented weights.
The important part is not memorising one command or vendor screen. The solution makes the invariant, failure behavior, and verification evidence explicit.
Practice: Estimate Total Cost
Go beyond monthly instance price.
Your answer must:
- state the intended outcome;
- show the commands, data flow, or implementation shape;
- identify at least one unsafe alternative;
- explain how the result will be verified.
Show solution
Include database, backups, storage, egress, load balancing, monitoring, support, CI, idle environments, engineering labor, and incident risk.
The important part is not memorising one command or vendor screen. The solution makes the invariant, failure behavior, and verification evidence explicit.
Practice: Plan Portability
Identify which parts of a PHP application are easy or hard to move.
Your answer must:
- state the intended outcome;
- show the commands, data flow, or implementation shape;
- identify at least one unsafe alternative;
- explain how the result will be verified.
Show solution
Record runtime, container, SQL, object storage, queue, IAM, networking, observability, and deployment dependencies. Avoid pretending complete portability is free.
The important part is not memorising one command or vendor screen. The solution makes the invariant, failure behavior, and verification evidence explicit.