Cloud Service and Deployment Models Questions
The foundational service models (IaaS, PaaS, SaaS, FaaS) and deployment models (public, private, and hybrid cloud) and when each is appropriate. Covers the shared-responsibility boundary, the core value proposition of cloud versus on-premises, how service-model choice shifts operational ownership, vendor lock-in risks and mitigation, and when a single-cloud, multi-cloud, or hybrid-cloud strategy is the better choice. The conceptual entry point before any provider-specific or architectural depth.
Compare the IaaS, PaaS, and SaaS delivery models, with a concrete example of each. Discuss the pros and cons for a small engineering team, then recommend which model, or combination of models, you would adopt to host a medium-sized web application serving around 10,000 daily active users, run by a 4-person team with limited operations experience. Describe a hybrid approach you might reach for instead, and explain when it would make sense.
Sample Answer
Direct answer
For a 4-person team with limited operations experience hosting an application around 10,000 daily active users, I would recommend PaaS as the primary model, a managed application platform plus a managed database, reserving IaaS only for any piece that genuinely needs it, and treating SaaS as a source of building blocks to buy, such as authentication or transactional email, rather than as the hosting model for the core app itself.
Comparing the three for a small team
IaaS gives full control and potentially the cheapest per-unit compute, but the team would own OS patching, scaling configuration, and monitoring, which competes directly with the very small number of engineering hours available for the actual product. Wrong default here.
PaaS gives up some control, but a 4-person team gets a production-grade deployment, managed scaling, managed database, automated patching, without hiring or becoming operations specialists. That is exactly the trade a resource-constrained team should make.
SaaS is the right model for well-defined, already-solved problems adjacent to the product, using a SaaS product for email delivery, a SaaS-provided authentication service, or a support-ticketing tool for customer service, rather than for the core application, since the core app is presumably the team's actual differentiated product and isn't something an off-the-shelf SaaS product would be.
The recommendation
A managed application platform for the app tier plus a managed database for storage, with a couple of SaaS building blocks glued in for auth and transactional email rather than built from scratch. This keeps the team's operations surface down to "watch a dashboard and occasionally adjust a scaling policy" instead of "own a fleet."
A hybrid approach, and when it makes sense
A hybrid here would mean keeping the core app on a managed platform while running one specific piece on IaaS, for example a background job that needs a software dependency the managed platform doesn't support, or a steady, cost-sensitive batch workload where a small reserved virtual machine is genuinely cheaper at this scale than the managed equivalent. This makes sense once the team has one clear, isolated piece of the system with a requirement PaaS can't satisfy, or a cost delta large enough to justify the added operational surface for that one piece, not as a blanket decision to control more of the stack.
The analytics variant: a different lock-in calculus
If the workload were analytics or business intelligence (BI) flavored instead of a general customer-facing app, for instance this same 4-person team standing up internal reporting dashboards, the PaaS-first instinct needs an extra check. A fully SaaS BI tool gets a working dashboard fastest, but it usually couples the team's reporting logic and data tightly to that vendor's proprietary query language and connectors, a much larger vendor lock-in exposure than picking a managed application platform for a general web app, where the exit path (redeploy the same container elsewhere) is comparatively cheap. A PaaS-level option, a managed data warehouse queried with standard SQL, costs the team a bit more setup and ongoing responsibility, someone has to model the data and maintain the queries, but keeps the exit path open, since standard SQL and exported data are portable in a way a BI SaaS product's proprietary dashboard definitions typically are not. For a 4-person team specifically, that's worth naming explicitly rather than defaulting to "SaaS is always right for a small team," because the team's limited operations capacity has to be weighed against how expensive it would be for that same small team to unwind a deep SaaS BI dependency two years later if the vendor's pricing or roadmap stops fitting.
Trade-offs and pitfalls
The first pitfall is treating "small team, limited ops" as an automatic vote for SaaS everywhere; SaaS for your core differentiated product usually means you're not actually building a product anymore, just configuring someone else's. The second is over-indexing on cost-per-unit-compute when comparing IaaS to PaaS at this scale: at 10,000 daily active users, the labor cost of even a fraction of one engineer's time spent on operations very likely exceeds the sticker-price premium of PaaS, so the "PaaS costs more per server" argument that matters at large scale mostly doesn't apply yet.
Define the three primary cloud service models: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). For each model, give a one-paragraph definition, one concrete vendor example (AWS, Azure, or GCP), and state which layers (networking, virtualization, OS, runtime, middleware, application, data) the provider manages versus the customer. Then classify these real services and justify each: AWS EC2, GCP App Engine, Azure SQL Database, Salesforce, and Google Workspace.
Sample Answer
Direct answer
All three service models sit on one spectrum: how much of the technology stack the provider manages for you, versus how much you still manage yourself. Infrastructure as a Service (IaaS) hands you raw compute, storage and networking and you own everything from the OS up. Platform as a Service (PaaS) additionally takes over the OS, runtime and middleware (the software layer that sits between the OS and your application, such as message queues, application servers, or authentication/session handling), so you just deploy code. Software as a Service (SaaS) is a finished application: you own only your data and how you configure and use it.
The three models, one at a time
IaaS. The provider manages the physical data center, the network hardware, and the virtualization layer (the hypervisor that carves one physical server into many virtual machines). You manage the OS, runtime, middleware, application code, and data. Example: Amazon Web Services (AWS) Elastic Compute Cloud (EC2), which rents you a virtual machine and stops there. IaaS is the right default when a workload needs a specific kernel version, custom drivers, or full control of the network stack, for example lifting an existing application that depends on a particular OS build.
PaaS. The provider additionally owns the OS, runtime and middleware. You push application code (or a container image) and the platform patches, scales and load-balances it for you. Example: Google App Engine on Google Cloud Platform (GCP). PaaS fits a small team that wants to ship a web application without hiring dedicated operations staff.
SaaS. The provider owns everything, including the application itself. You own only your data and its configuration: which users exist, what they can see, how records are structured. Example: Salesforce. SaaS is the right choice for a standard business capability, such as a customer relationship management (CRM) system, where building your own would create no advantage.
| Layer | IaaS | PaaS | SaaS |
|---|---|---|---|
| Networking | Provider | Provider | Provider |
| Virtualization | Provider | Provider | Provider |
| Operating system | Customer | Provider | Provider |
| Runtime | Customer | Provider | Provider |
| Middleware | Customer | Provider | Provider |
| Application | Customer | Customer | Provider |
| Data | Customer | Customer | Customer |
Data never fully moves to the provider's column. You always decide who is allowed to see it and whether it is used correctly, even when the provider secures every layer beneath it.
Worked example: classifying five real services
- AWS EC2 = IaaS. It hands you a virtual machine. You choose and patch the OS, install a runtime, and own everything above the hypervisor.
- GCP App Engine = PaaS. You deploy application code; the platform owns the OS, the language runtime, and automatic scaling. You never log into a server.
- Azure SQL Database = PaaS, not IaaS, even though "it's a database" makes it sound like infrastructure. Microsoft manages the OS and the database engine's patching and high availability; you manage schema, queries and data. Contrast this with running SQL Server on an Azure virtual machine, which would be IaaS, because you would own the OS and the engine installation yourself.
- Salesforce = SaaS. A finished CRM application. You configure objects, fields and workflows and own your customer records, but Salesforce owns the application code, runtime and infrastructure underneath.
- Google Workspace = SaaS. Gmail, Docs and Drive are ready-to-use applications. Your real responsibility is your data and access configuration: who is in your organization and what they can share externally.
The same ladder shows up on an ML (machine learning) team's bill. A GPU-backed virtual machine running a custom training loop is IaaS: you install the framework, the drivers, and manage the OS yourself. A managed training job that takes your training script and returns a model artifact sits in the PaaS band: the provider owns the cluster orchestration and worker scaling (coordinating many machines to run the job together, and adding or removing machines as the workload changes), you own the training code, data and the resulting model. A managed model-serving endpoint is the same band: you supply the model, the platform owns the runtime and autoscaling of the inference containers (the running, ready-to-answer copies of your packaged model that handle prediction requests).
Trade-offs and pitfalls
The most common misclassification is calling a managed database IaaS "because it holds data like a database server would." The test is not what the service does, it's which layers you still touch: if you never patch an OS or install the database engine, it is PaaS regardless of the product name. A second pitfall is assuming SaaS means zero responsibility; you are always responsible for who has access and how it is configured, and a breach caused by an over-permissioned admin account is still your incident even though the vendor wrote no bad code. Finally, don't treat the three models as a single company-wide choice: most real organizations run all three at once (EC2 for a legacy system, App Engine for a new service, Workspace for email), and the interesting decision is made per workload, not once.
Serverless functions are often described as a form of PaaS. Explain whether serverless (e.g., AWS Lambda, Azure Functions, GCP Cloud Functions) is best classified as PaaS, something between PaaS and SaaS, or a distinct model. Discuss responsibilities for runtime, scaling, and application code management.
Sample Answer
Direct answer
Serverless functions, also called Function as a Service (FaaS: AWS Lambda, Azure Functions, Google Cloud Run functions, the platform formerly known as Cloud Functions), are best understood as a further point along the PaaS spectrum rather than a wholesale new category or a step toward SaaS. The provider takes over everything PaaS already took over (OS, runtime, middleware) plus two things classic PaaS still leaves you: capacity planning and idle cost. What makes serverless feel distinct is a difference of granularity and billing, not a different responsibility layer.
Why not SaaS, and why "further along PaaS"
SaaS gives you a finished application. Serverless gives you a place to run your application code, so it fails the core SaaS test immediately: does the provider own the application logic? No, you still write the function.
PaaS gives you a managed runtime you deploy a service into and typically leave running continuously; you still think in terms of "how many instances" and pay for a provisioned server whether or not it's handling a request. Serverless removes the instance concept from your mental model entirely: the platform decides how many copies of your function to run, scales all the way to zero when idle, and bills per invocation and execution duration rather than per hour of a running server. That is a difference in degree along the same "who manages what" ladder PaaS is already on, not a new category.
The three responsibilities the question names
- Runtime: entirely the provider's. It picks the execution environment, patches the language runtime, and you only choose a supported version and keep your code compatible with it.
- Scaling: entirely the provider's, and automatic. It scales per invocation, including to zero, and the levers you get are reserved concurrency (a cap that both guarantees and limits how many copies of your function can run at once, useful for protecting a downstream dependency like a database connection pool, at no extra charge) and, on some platforms, provisioned concurrency (an additional-cost option that keeps a guaranteed number of copies pre-initialized and ready, so a request doesn't have to wait for a fresh one to start) to reduce cold starts.
- Application code: yours, same as PaaS. You still own business logic, dependencies, and any bugs in your function.
Worked example
Contrast two workloads. An internal admin dashboard that gets hit sporadically all day is a natural PaaS fit: a provisioned instance sits warm between requests, and you pay for that idle time regardless of traffic. An event-driven job that resizes an uploaded image whenever one lands in storage is a natural serverless fit: the function runs for, say, a few hundred milliseconds per image and you pay only for that time, at the cost of a cold-start penalty the first time an idle function wakes up to handle a request.
Trade-offs and pitfalls
Serverless trades away two things PaaS still gives you. First, statelessness: nothing reliably persists in memory between invocations, so any state the workload needs has to live in an external database or cache. Second, a hard maximum execution duration, which makes serverless a poor fit for long-running or streaming work. The common pitfall is treating "serverless" as free of operational burden entirely; in practice you trade server-patching burden for observability burden, since tracing a request across many short-lived, independently scaling function instances is genuinely harder to reason about than reading one long-lived process's logs.
Compare IaaS, PaaS and serverless computing models. For each model describe who is responsible for infrastructure management, typical use cases, scaling characteristics, operational overhead and cost considerations. Finally, recommend which model you'd choose for a microservices-based SaaS MVP and explain why.
Sample Answer
Direct answer
For a microservices-based Software as a Service (SaaS) Minimum Viable Product (MVP), the smallest version of a product built to test whether it's worth building further, serverless is usually the strongest starting point of the three models, specifically because an early MVP's traffic is low and unpredictable, and serverless is the only one of the three that lets infrastructure cost track that near-zero, uncertain usage instead of a provisioned baseline.
Comparing the three models
| IaaS | PaaS | Serverless | |
|---|---|---|---|
| Infrastructure management | You own OS, runtime, middleware | Provider owns OS, runtime, middleware; you own app and deploy config | Provider owns everything except your function code |
| Typical use case | Custom OS or kernel needs, legacy lift-and-shift, specialized compute | Standard web services and APIs where a team wants to focus on code, not servers | Event-driven, bursty, or intermittent workloads; individual microservice endpoints |
| Scaling | Manual or self-configured autoscaling of instances | Platform-managed autoscaling, still instance-shaped | Automatic, per invocation, scales to zero when idle |
| Operational overhead | Highest: patching, capacity planning, monitoring the OS layer | Medium: app-level monitoring and deploy config, no OS-level work | Lowest on infrastructure, but distributed tracing (following one request as it hops across many separate function calls, to see where time or errors occurred) becomes its own overhead |
| Cost model | Pay for provisioned capacity whether used or not, unless carefully right-sized | Usually a provisioned-tier cost plus some usage-based extras | Pay per invocation and execution time; near-zero cost at near-zero usage |
Recommendation for the microservices MVP
Serverless functions per microservice endpoint, for two reasons specific to an MVP. First, cost tracks actual, likely very low, usage instead of paying for provisioned capacity nobody's using yet. Second, the natural unit of a microservice, a small, independently deployable piece of functionality, maps cleanly onto a function's natural unit, one thing, triggered by one event or request, so the architecture and the billing and scaling model reinforce each other instead of fighting.
Worked example
Contrast the three models for one specific microservice in the MVP: send a welcome email on signup. On IaaS, that's a small, always-on virtual machine, patched and paid for around the clock to occasionally handle a handful of signups a day, wasteful at MVP scale. On PaaS, it's a small, always-on managed instance, better than IaaS operationally but still billed close to continuously even when signups are rare. On serverless, it's a function triggered directly by the signup event, running for perhaps a few hundred milliseconds, costing essentially nothing when there are no signups. That is the correct cost shape for a product that might get five signups a day during early testing and needs to be able to jump to five hundred without a re-architecture.
Trade-offs and pitfalls
The honest caveat on this recommendation is that "serverless-first for an MVP" stops being obviously correct once the product finds traction and specific services develop steady, high, predictable traffic, since a steadily busy function can end up costing more per unit of work than an equivalent always-on PaaS or IaaS instance. The practical move once that happens is to migrate the specific hot service, not the whole system, to a more provisioned model, while keeping genuinely spiky or rare services on serverless. A separate pitfall is assuming "microservices" implies "serverless" as a package deal; microservices is really about how you decompose the system, and it works fine with any of the three service models per service, so the service-model choice should still be made per microservice based on its own traffic shape, not inherited automatically from the architecture style.
Explain what a Platform as a Service (PaaS) offering is and how it differs from IaaS and serverless. Give concrete examples of PaaS products suited to web applications and to container-based workloads, then walk through the operational trade-offs a team takes on by choosing PaaS instead of one of the other two models.
Sample Answer
Direct answer
PaaS sits between IaaS and serverless on a single spectrum of "how much of the running instance do I still manage," rather than off to the side as an unrelated third category. IaaS gives you a virtual machine and you build everything above it. PaaS gives you a managed runtime and deployment target: you push code and the platform runs it continuously. Serverless goes one step further than PaaS by removing the concept of a continuously running instance altogether, scaling to zero and billing per invocation instead.
How PaaS differs from each neighbor
Versus IaaS. On IaaS you decide the OS, patch it, install a runtime, and configure a process manager, and an instance typically stays running whether or not it's serving traffic. On PaaS you supply application code or a container image and a deployment manifest; the platform handles OS patching, runtime installation, health checks and restarts, and autoscaling policy configuration replaces manual instance management.
Versus serverless. PaaS still asks you to think in terms of how many instances and what size, even if it autoscales them for you, and instances generally stay warm between requests. Serverless removes the instance concept entirely, scales per invocation including to zero, and bills per invocation and duration rather than per provisioned hour.
Examples for the two workload shapes the question asks about
Web applications: AWS Elastic Beanstalk, Azure App Service, and Google App Engine let you push source code and get a managed, autoscaled web service with a built-in load balancer.
Container-based workloads: managed container-runtime platforms such as Google Cloud Run or AWS App Runner take a container image, giving you the middleware and dependency control of a container, while the platform still handles the OS, orchestration, and autoscaling, including scaling to zero when idle. This is why these products sit right at the boundary between PaaS and serverless.
Operational trade-offs of choosing PaaS
Instead of IaaS: you give up fine-grained OS and kernel control and the ability to install arbitrary system-level software, and you gain freedom from patch management and instance-level monitoring and alerting.
Instead of serverless: you give up the cost benefit of scaling fully to zero for spiky or idle workloads and take on slightly more capacity-planning thinking, how many instances, what size, but you gain a simpler mental model for stateful or long-running processes and typically fewer cold-start surprises (the extra delay a request hits when it wakes an idle instance or function that has to initialize before it can respond).
Worked example
A small team is choosing between the three for a customer-facing web app with steady, moderate daily traffic that also needs a custom authentication middleware wrapping every request. Raw IaaS would mean owning OS patches for no real benefit, since nothing about the workload needs kernel-level control. Pure serverless functions would technically work but would mean re-architecting the middleware into a function-per-endpoint shape, adding real engineering cost for a workload that isn't particularly spiky. A container-based PaaS product lets the team package the existing middleware into the container image unchanged, deploy it once, and let the platform handle scaling and OS management, which is the best fit given steady traffic and existing middleware investment.
Trade-offs and pitfalls
The main pitfall is picking PaaS reflexively as "the safe middle choice" without checking whether the workload is actually spiky, where serverless's per-invocation billing would save real money, or genuinely needs OS-level control, where PaaS's restrictions become a real blocker, for example a workload needing raw socket access a managed platform won't expose. A second pitfall is assuming all PaaS products are equally restrictive: a container-based PaaS product gives you a much larger slice of control over the runtime and middleware than a source-code-only PaaS product, so the choice between PaaS flavors matters almost as much as the IaaS-versus-PaaS-versus-serverless choice itself.
That is every published Cloud Service and Deployment Models question for Software Engineer so far. Browse the other topics in this category, or practice this one interactively.