{"docs":[{"id":175,"title":"Serverless, Containers or Virtual Machines: Choosing a Cloud Architecture","heading":"Serverless, Containers or Virtual Machines: Choosing a Cloud Architecture","subheading":null,"category":"Cloud","body":{"root":{"type":"root","children":[{"type":"heading","tag":"h3","version":1,"children":[{"type":"text","text":"Connected products in the cloud","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"IoT back ends show why the mix matters. Devices often hold long-lived MQTT connections, which suit a managed IoT message broker rather than functions. Messages from the broker can then trigger functions for rule processing, while containers run the APIs used by apps and dashboards.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Processing that runs for hours, needs a GPU or depends on software licensed to a machine usually belongs on virtual machines or batch services. Managed container platforms, which run containers without a cluster to administer, are a good default for web APIs.","version":1}]}],"direction":"ltr","format":"","indent":0,"version":1}},"tags":"Cloud, Architecture, Serverless, Containers","cardCta":{"label":null,"link":null},"pageCta":{"label":"Talk to AAVICO engineering","link":"/contact"},"excerpt":"Functions, containers and virtual machines trade control for convenience in different proportions. The workload, its traffic pattern and the team running it decide which fits.","featuredImage":null,"type":"Blog","readTime":"3 min read","publishedAt":"2026-11-15T16:42:00.000Z","heroImage":null,"introText":"Every major cloud platform offers three main ways to run code: functions that run on demand and scale to zero, containers on a managed platform or orchestrator, and virtual machines the team configures itself. All three can run the same business logic. They differ in how they scale, how they are billed, what limits they impose and how much operational work they leave with the team. Most production systems end up using more than one.","metrics":[{"id":"serverless-containers-or-virtual-machines-choosi-metric-1","value":"15 min","label":"The maximum duration of a single AWS Lambda invocation; other platforms set their own limits.","icon":null},{"id":"serverless-containers-or-virtual-machines-choosi-metric-2","value":"Scale to 0","label":"Functions and some container services use no compute capacity when idle.","icon":null},{"id":"serverless-containers-or-virtual-machines-choosi-metric-3","value":"Cold start","label":"The delay when a function or container starts from nothing to handle a request.","icon":null},{"id":"serverless-containers-or-virtual-machines-choosi-metric-4","value":"OCI","label":"The open container image format that runs across clouds and on premises.","icon":null}],"gallery":[],"challenge":{"root":{"type":"root","children":[{"type":"paragraph","version":1,"children":[{"type":"text","text":"Serverless functions look ideal until the workload does not fit: long-running jobs hit time limits, persistent connections are not supported, and steady high traffic can cost more than always-on capacity.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Virtual machines give full control but leave patching, scaling, monitoring and recovery with the team. Containers sit between the two, and a full Kubernetes cluster brings substantial operational complexity that a small team may not need.","version":1}]}],"direction":"ltr","format":"","indent":0,"version":1}},"blockquote":{"quote":"Match the compute model to the shape of the workload: spiky and short suits functions, steady services suit containers, special requirements suit virtual machines.","author":"","role":"AAVICO Engineering"},"supportImage1":null,"deliverables":{"root":{"type":"root","children":[{"type":"paragraph","version":1,"children":[{"type":"text","text":"Describe each workload: request pattern, duration, state, connection type, latency needs and any special hardware or licensing.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Pick the simplest model that meets each workload, preferring managed services that remove operational work the team does not need to own.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Package code in containers where practical, so it can move between functions, managed containers and virtual machines as needs change.","version":1}]}],"direction":"ltr","format":"","indent":0,"version":1}},"results":[{"id":"serverless-containers-or-virtual-machines-choosi-result-1","title":"Right Cost Profile","description":"Billing follows the workload, from pay per request to reserved capacity."},{"id":"serverless-containers-or-virtual-machines-choosi-result-2","title":"Less Operations","description":"Managed services take patching and scaling off the team."},{"id":"serverless-containers-or-virtual-machines-choosi-result-3","title":"Scalability","description":"Each part scales in the way its traffic actually behaves."},{"id":"serverless-containers-or-virtual-machines-choosi-result-4","title":"Portability","description":"Containerised code keeps options open across platforms and providers."}],"lookingAhead":{"root":{"type":"root","children":[{"type":"paragraph","version":1,"children":[{"type":"text","text":"Model costs at expected and peak load for each option before deciding. The cheapest model at launch is not always the cheapest at scale.","version":1}]},{"type":"paragraph","version":1,"children":[{"type":"text","text":"Infrastructure as code, with tools such as Terraform, OpenTofu or the provider templates, makes whichever choice you make reproducible.","version":1}]}],"direction":"ltr","format":"","indent":0,"version":1}},"supportImage2":null,"testimonial":{"quote":null,"author":null,"role":null,"photo":null},"challengesSolved":[{"id":"serverless-containers-or-virtual-machines-choosi-challenge-1","title":"Long jobs failing at function time limits","description":null,"icon":null},{"id":"serverless-containers-or-virtual-machines-choosi-challenge-2","title":"Persistent device connections on stateless functions","description":null,"icon":null},{"id":"serverless-containers-or-virtual-machines-choosi-challenge-3","title":"A cluster too complex for the team","description":null,"icon":null},{"id":"serverless-containers-or-virtual-machines-choosi-challenge-4","title":"Servers patched by hand","description":null,"icon":null}],"relatedPosts":[],"contactUs":{"show":true},"updatedAt":"2026-11-15T17:32:32.682Z","createdAt":"2026-11-15T17:32:32.682Z"}],"hasNextPage":false,"hasPrevPage":false,"limit":10,"nextPage":null,"page":1,"pagingCounter":1,"prevPage":null,"totalDocs":1,"totalPages":1}