Skip to content

Managed Cloud Infrastructure

Cloud Infrastructure for SaaS Applications: VMs, PaaS or Kubernetes?

SaaS founders and lead engineers get selection criteria, cost drivers and seven questions for choosing between virtual machines, a managed PaaS and Kubernetes.

By Stack Harbor Engineering · Published · 10 min read

The best cloud infrastructure for a software as a service (SaaS) application is the option its team can operate, nights and weekends included. For a SaaS company with no dedicated infrastructure engineer, that usually means a managed platform as a service (PaaS) or virtual machines (VMs) that a provider operates. Kubernetes earns its place when engineers are assigned to run it, or when the product depends on its ecosystem. The deciding question is who will patch the operating system, run the database and answer the alerts.

What are the infrastructure options for a SaaS application?

A SaaS team chooses between four infrastructure models: virtual machines, a managed PaaS, Kubernetes and hyperscaler-native services. Each moves a different share of the operating work to a provider.

Virtual machines. A virtual machine is a software-defined server with its own operating system. The provider runs the hardware and the virtualization layer. The customer operates everything from the operating system up: patches, runtimes, the web server, the database, backups and monitoring. A managed hosting provider can take over that work.

Managed PaaS. A platform as a service runs the application from its code or from a container image. The platform provisions runtimes, databases, load balancers and scaling, and the team does not manage the operating system. Self-serve products such as Heroku and Render follow this model. So do the application platforms that managed cloud providers operate.

Kubernetes. Kubernetes is an open-source system that schedules containers across a cluster of machines and restarts them when they fail. Managed Kubernetes services from the large public clouds run the control plane, which is the part that makes scheduling decisions. In most configurations the customer remains responsible for worker nodes, version upgrades, traffic routing, secrets, monitoring and the deployment definitions.

Hyperscaler-native services. The large public clouds, often called hyperscalers, sell serverless functions, managed container services and managed databases. The team operates few servers. In exchange, the application code is written against one vendor’s interfaces.

How do VMs, a managed PaaS and Kubernetes compare for SaaS?

The table compares the four models on the criteria that matter most to a small SaaS team.

CriterionVirtual machinesManaged PaaSKubernetesHyperscaler-native services
What your team operatesThe operating system and everything above it, unless a provider is contractedThe application and its configurationThe cluster configuration, upgrades, routing, monitoring and the applicationThe application and the cloud account
Skills needed in houseSystem administration, security, backupsApplication developmentPlatform engineering, plus application developmentCloud architecture, access control, cost control
ScalingResize the server or add servers, by hand unless the team builds the automationRules add or resize nodes, when the application tier is statelessAutomated, once the team builds and tunes itAutomated, billed by usage
PortabilityHigh, a standard Linux server can be rebuilt at most providersDepends on how standard the runtimes and images areHigh across clusters, lower once cloud add-ons are usedLow, the code calls one vendor’s interfaces
Main riskNobody patches or watches the serversOutgrowing the platform’s regions or feature setThe platform consumes the engineering time meant for the productA bill and an account that grow without an owner

When are virtual machines the right choice for a SaaS?

Virtual machines are the right choice when the team needs control of the server and has someone to look after it. Four conditions point to VMs.

  1. Someone owns the operating system. An engineer on staff patches, hardens and monitors the servers, or a provider does so under contract.
  2. The workload needs control at the operating system level. Licensed software, a hosting control panel or custom networking fits a server better than a platform.
  3. Load is steady and predictable. A larger server, or an extra server added as planned work, covers growth.
  4. The application holds state on the server. A monolith that writes sessions and uploads to local disk cannot yet run as several identical copies.

Virtual machines are the wrong choice when nobody patches the operating system or when deploys still happen by hand over a remote shell. They also fit poorly when traffic spikes need capacity within minutes and nobody has built automated scaling. A separate article covers whether to hire a DevOps engineer or outsource operations.

When is a managed PaaS the right choice, and when is it not?

A managed PaaS is the right choice for a small SaaS team that runs a conventional application and wants its engineers on the product. Three conditions point to a PaaS.

  • The application runs on a mainstream runtime, such as PHP, Node.js, Java, Python, Go, Ruby or .NET, or ships as a container image.
  • The application tier is stateless, or can be made stateless, so the platform can run several identical copies. Sessions, uploads and caches move to shared services.
  • The team wants staging environments, repeatable deploys and rollback without building the tooling.

On a PaaS, scaling still needs a decision, and the knowledge base explains when to add nodes and when to resize them. A SaaS that isolates each customer faces a second choice, covered in the guide to one environment per tenant versus a shared environment.

A managed PaaS is the wrong choice in four situations.

  • The product depends on the Kubernetes ecosystem. Software that is packaged for Kubernetes, or that relies on Kubernetes operators, needs a cluster.
  • The workload needs specialised hardware. Ask whether the platform offers graphics processing units (GPUs) or similar hardware before assuming it does.
  • The application is built on hyperscaler-native services. Serverless functions and proprietary data services do not exist on a generic application platform.
  • The business needs regions the platform does not have. A platform with sites in one country cannot serve users on another continent locally.

Does a small SaaS team need Kubernetes?

A small SaaS team usually does not need Kubernetes. Kubernetes solves the problem of running many services on many machines with one consistent interface. A team with one application, a few workers and a database does not have that problem yet.

Kubernetes is the right choice under four conditions.

  1. Engineers are assigned to the platform. Running the cluster is part of somebody’s job description, with a second person who can cover.
  2. The product is many services with separate release cycles. Several teams deploy independently and need shared rules for routing, scaling and access.
  3. Customers install the product in their own clusters. A SaaS that also ships a self-hosted edition often standardises on Kubernetes for both.
  4. The stack relies on Kubernetes-native software. Some data, machine learning and networking tools assume a cluster.

Kubernetes is the wrong choice when the reason is fashion, hiring appeal or a hope that it will fix availability. A cluster adds recurring work: version upgrades on the project’s release schedule, traffic routing and certificates, secrets, network policy, monitoring and cost allocation. The knowledge base article on moving a cPanel application to Kubernetes shows how much depends on settling the database, secrets and storage first.

Should you rewrite a legacy monolith or move it to a managed platform?

Move a legacy monolith to a managed platform when the application works and the problems are operational. Outages, deploys that cannot be rolled back and slow periods under batch load are platform problems.

One example scenario shows the trade-off. A Canadian business-to-business SaaS of about twelve people ran a ten-year-old Laravel monolith on a single dedicated server. The founders had budgeted six months for a rebuild. The Laravel monolith modernization example scenario reports that, in that one example scenario, Stack Harbor advised against the rebuild. The same application moved to Stack Harbor’s managed Cloud PaaS in an eight-week migration, without a rewrite. Infrastructure cost went up 11%. It also estimates sixty hours a month of founder engineering time returned to the product. That is one result for one workload, not a typical outcome.

The same example scenario says a rebuild may be the right call when the architecture prevents the team from shipping the next product line.

What drives the cost of each option?

For a small SaaS team, the infrastructure line is rarely the largest cost difference between VMs, a managed PaaS and Kubernetes. Labour usually is.

Cost lineVirtual machinesManaged PaaSKubernetes
Infrastructure resourcesServer sizes, storage, bandwidthResources used, often plus a platform feeWorker nodes, load balancers, and a control plane fee on some managed services
Operating labourHigh, unless a provider is contractedLow for the team, included in the platform or the managed scopeHigh, and specialised
ToolingMonitoring, backups and deploy tooling bought or builtMostly included, confirm what is in scopeMonitoring, routing, secrets and delivery tools assembled by the team
MigrationLow for a server-based applicationModerate, higher when the application tier must first become statelessHigh, the application is containerised and its deployment redefined

Three drivers move a quote on any option. Staging and preview environments multiply resources. A replicated database costs more than a single instance. Round-the-clock incident response costs more than business-hours coverage.

To put a number on labour, log one month of engineer hours spent on patching, deploys, incidents and cost questions. Multiply by a loaded hourly cost and add the result to each option. The article on how managed cloud hosting is priced explains the drivers behind a provider’s quote.

Which questions should a SaaS team answer before choosing a platform?

Seven questions settle most of the choice between virtual machines, a managed PaaS and Kubernetes for a SaaS application.

  1. Who is on call for the platform tonight? Name the person. If there is no name, buy the operations with the platform.
  2. How many separately deployed services exist today? Count what exists, not what the roadmap imagines.
  3. Can the application tier run as several identical copies? If not, list what ties it to one server.
  4. Which services does the code call that exist at one vendor only? A long list means the platform decision is already made.
  5. Where must production data and backups live, and where are the users? Regions rule options in or out quickly.
  6. Do customers or partners require a specific platform? A self-hosted edition or a procurement rule can settle the matter.
  7. What does the current setup cost each month, labour included? Without that figure, no option can be compared fairly.

A missing name at question 1 and a small count at question 2 point to a managed PaaS or to operated virtual machines. A long list at question 4 points to staying on that cloud. A separate article compares running Amazon Web Services (AWS) yourself with a managed cloud. Platform engineers on staff, many services, or a yes at question 6 point to Kubernetes.

Where Stack Harbor fits

Stack Harbor is a Canadian-owned managed cloud operations provider (MSP) for production environments, headquartered in Montréal. It works with SaaS companies, agencies and publishers. Its clients are small and mid-sized businesses (SMBs) and agencies of roughly 5 to 200 people that run production systems without a 24/7 operations team of their own. Its own Canadian infrastructure runs in two data centres in Montréal.

Stack Harbor offers two of the four models on its own infrastructure. Cloud PaaS is a managed application platform with managed runtimes for PHP, Node.js, Java, Python, Go, Ruby and .NET. It includes managed databases, blue/green and rolling deploys, and one-click cloning of production to staging. Horizontal scaling triggers on CPU, memory or custom metrics. The platform runs on the Virtuozzo application platform, and the knowledge base explains why Stack Harbor runs Virtuozzo.

Cloud Compute provides virtual machines, bare metal and private networking, with a managed scope that ranges from self-operated to fully managed. Vertical resize is live, horizontal scale-out is a planned operation, and regional cutover is a managed operation, not an automatic one.

Stack Harbor does not sell Kubernetes as a managed service. Its services page describes Cloud PaaS as the platform layer for teams that do not want to operate Kubernetes. Its high-availability (HA) clusters page calls Kubernetes useful for some workloads and overkill for most growing SMBs. A SaaS that needs the Kubernetes ecosystem, or regions beyond Stack Harbor’s own data centres, should look elsewhere. For a SaaS that belongs on AWS, managed AWS operations covers the client’s own account, and hosting with Stack Harbor is not required.

The auto-scaling solution sets the scaling rules and a hard cap on node count before go-live. In most SMB designs the database does not scale automatically. The deployment pipeline solution adds builds, tests, an approval gate and rollback.

Stack Harbor does not publish prices. Cloud PaaS pricing combines a platform fee per environment with the resources used. A fixed quote follows a scoping call, as the page on how Stack Harbor scopes and prices an engagement explains.

Before comparing platforms, a SaaS team should write down who will operate each layer once the product is live.

FAQ

Questions buyers ask about this

What is the best cloud infrastructure for a SaaS application?
No single infrastructure is best for every SaaS application. A small team with a conventional web application and no operations staff is usually best served by a managed PaaS. A team with infrastructure engineers, or a workload that needs control of the operating system, fits virtual machines. Kubernetes fits a company that has engineers assigned to run the platform or that depends on the Kubernetes ecosystem.
Does a 12-person SaaS company need Kubernetes?
A 12-person SaaS company rarely needs Kubernetes. Kubernetes solves the problem of scheduling many services across many machines, and it brings upgrade, networking, security and observability work with it. A company of that size usually runs one application, a few workers and a database, which a managed PaaS or a small group of virtual machines can run. The exceptions are a product that customers install in their own clusters and a product built on Kubernetes-native software.
Is a managed PaaS enough for a growing SaaS?
A managed PaaS is enough for a growing SaaS when the application runs on a supported runtime, the application tier can run as several identical copies, and the platform has the regions the customers need. A PaaS stops being enough when the product needs the Kubernetes ecosystem, specialised hardware, or services that exist on one hyperscaler only.
Should we rewrite our legacy monolith or move it to a managed platform?
Move the monolith to a managed platform when the application works and the problems are operational, such as outages, risky deploys and slow periods. Consider a rewrite when the architecture itself prevents the team from shipping the next product line. A rewrite delivers no new customer value while it runs, so it needs a stronger justification than an ageing codebase.
Does a managed PaaS lock a SaaS company in?
Every platform creates some lock-in, and the useful question is where it sits. An application that runs on a standard runtime or in a standard container image, with a standard database engine, can move to another platform with a planned migration. Lock-in is deepest when the application code calls services that exist at one vendor only. Ask any platform provider which parts of the setup are portable and which are specific to the platform.
Does Stack Harbor offer managed Kubernetes?
Stack Harbor does not sell Kubernetes as a managed service. Its Cloud PaaS is a managed application platform positioned for teams that do not want to operate Kubernetes. For a SaaS company that runs on Amazon Web Services (AWS), Stack Harbor offers managed AWS operations in the client's own account, and hosting with Stack Harbor is not required.

About Stack Harbor

Stack Harbor is a Canadian-owned managed services provider headquartered in Montréal, Québec. It is an MSP for production cloud environments, not office IT. It offers three services: Cloud Infrastructure, an Application Platform, and Management, Monitoring & Support. Its own infrastructure runs in two data centres in Montréal, and its operations team also manages environments that clients run on AWS, Azure, Google Cloud and other providers. Stack Harbor works with SaaS companies, agencies, publishers and WordPress and WooCommerce operators that run production systems without a 24/7 operations team of their own, in English and French.

About Stack Harbor →

Share

Tell us what you are running. We will tell you what needs to change.

Book a consult with Stack Harbor. We review your current environment, the risks in it and your support needs, then give you a fixed scope and price after the scoping call.