The compute layer is where application logic runs in a cloud system.
It can be built with virtual machines, containers, Kubernetes, serverless functions, batch jobs, or managed application platforms.
For a cloud architect, compute is not just about choosing where code runs. It is about control, scaling, reliability, deployment speed, security boundary, and operating cost.
Cloud Architecture Brief
Many beginners treat compute as simply choosing a server, but cloud architects must choose the right runtime model for workload, team skill, cost, and reliability.
Companies need compute design because every application, API, automation worker, data job, and AI service needs a reliable place to run.
The compute layer is the execution layer of cloud architecture. It runs code, processes requests, handles background jobs, and connects with network, storage, database, and security layers.
If you understand control versus abstraction, stateful versus stateless, scaling pattern, deployment model, and failure behavior, you can compare VM, container, Kubernetes, serverless, and managed platforms across any cloud.
Architecture Decision
three_tier
api_backend
public_cloud
User traffic enters through load balancer, reaches stateless application compute in private subnets, background workers process queued jobs, logs and metrics go to observability, and data is stored outside the compute layer.
Choose compute based on workload behavior instead of popularity.
The best compute choice depends on traffic pattern, team skill, operational maturity, compliance need, startup speed, scaling need, and failure tolerance.
Use Kubernetes for everything; put all workloads on one large VM; choose serverless without understanding cold start; ignore deployment and rollback requirements.
More control usually means more operations. More abstraction usually means less control but faster deployment and lower maintenance.
Cloud Building Blocks
VMs provide maximum control; containers standardize packaging; Kubernetes orchestrates containers; serverless removes server management; managed platforms trade control for simplicity.
Compute should usually stay in private networks behind load balancers, gateways, or controlled access layers.
Compute should not be treated as permanent storage. Use object, block, or file storage depending on data type.
Application data should live in databases, caches, queues, or storage services, not only on compute instances.
Use IAM roles, secrets management, patching, image scanning, runtime isolation, and restricted network access.
Monitor CPU, memory, latency, error rate, saturation, restarts, queue depth, deployment events, and logs.
Enterprise Readiness
Use multiple instances, health checks, rolling deployments, autoscaling, and avoid single compute dependency.
Design stateless application compute so new instances can be added or removed safely.
Restrict admin access, avoid hardcoded secrets, use least privilege service identity, and patch base images or servers.
Right-size instances, autoscale demand, shut down non-production compute, and avoid overusing expensive always-on capacity.
Check traffic, health checks, recent deployment, compute capacity, logs, metrics, network access, and dependency status.
Failure & Job Readiness
Single VM dependency, overloaded CPU, memory leak, broken deployment, no health check, hardcoded secret, and compute storing critical local data.
Confirm compute is stateless where possible; confirm health checks; confirm autoscaling; confirm logs; confirm secret handling; confirm rollback.
Rollback deployment, scale out, replace unhealthy instance, restart worker, restore image, rotate secret, or shift traffic to healthy compute.
A company needs to choose whether a new API should run on VMs, containers, Kubernetes, or serverless.
How do you decide between VM, container, Kubernetes, and serverless for a production workload?
Compare four compute options for one API: VM, container service, Kubernetes, and serverless. Score each by control, cost, operations, scaling, and failure risk.
Virtual Machine; Container; Kubernetes; Serverless; Autoscaling