SaveMyCert
Log in
5 of 5 free questions left today·for 10 a day
Modernize Infrastructure and Applications with Google Cloud

Cloud Migration Strategies and Compute Terms: Rehost, Replatform, Refactor, Containers, Serverless and Spot VMs (Cloud Digital Leader)

15 min readCDL · Modernize Infrastructure and Applications with Google CloudUpdated

Cloud migration is the process of moving an organization's workloads, meaning its applications and the resources they need, from its own data centers to a cloud provider such as Google Cloud, and choosing how much each one changes on the way. This lesson covers task 4.1 of the Google Cloud Digital Leader exam guide. It defines the migration vocabulary: workload, discovery and assessment, retire, retain, rehost (lift and shift), replatform (move and improve), refactor and reimagine, and shows how to pick an approach for each workload. It then defines the compute terms a modernization uses: virtual machines, containers, microservices, Kubernetes, serverless computing, managed services, Spot VMs, autoscaling and load balancing.

What you’ll learn
  • Define a workload and explain why migrations are planned workload by workload
  • Explain what discovery and assessment produce and why dependencies and usage matter
  • Distinguish retire, retain, rehost, replatform, refactor and reimagine, and choose one for a workload from its constraints
  • Compare virtual machines and containers, and explain microservices and the role of Kubernetes
  • Explain serverless computing and managed services and when each removes operational work or idle cost
  • Describe when Spot VMs fit and how autoscaling and load balancing keep an application responsive and available

What a cloud migration moves: workloads

A cloud migration moves workloads from where they run today, usually an on-premises data center or a colocation facility, to a cloud provider such as Google Cloud. A workload is a specific application or service together with the compute, storage, data and network resources it needs to run. Migrations are planned and tracked workload by workload, not server by server, because the business cares whether the payroll system or the customer portal works, not which box it happens to sit on.

Three things that are often confused with a workload are not workloads:

  • Capacity or consumption, the amount of compute an organization buys or uses each month, is what gets measured and billed.
  • A server inventory, the list of physical machines, is an input to discovery. One server can host several workloads, and one workload can span several servers.
  • A migration plan sequences workloads into waves with target dates. Each wave contains one or more workloads.

Google Cloud describes the journey in phases: assess the current estate, plan the landing zone and the order of moves, migrate (deploy) the workloads, then optimize them once they are running. Google Cloud supports each phase with tooling such as Migration Center, which gathers inventory data and produces cost estimates, and with programs and partners that help organizations plan and carry out the move. The rest of this lesson covers the vocabulary every phase uses.

Discovery and assessment

Discovery and assessment is the first step of a migration: discovery builds an inventory of the applications that exist, how they depend on each other and how much they use; assessment uses that inventory to estimate cloud costs and choose an approach for each workload. It comes before anything is moved, and it does not move or change anything itself.

Its business value comes from two kinds of finding:

  • Dependencies show which applications call each other or share data. Workloads that depend on each other usually have to move in the same wave, or the move breaks something that still runs on premises.
  • Usage (CPU, memory, storage, traffic over time) shows what each workload really needs. That supports right-sizing and a realistic estimate of what it will cost to run in the cloud, rather than copying the size of an on-premises server bought for a peak that rarely comes.

Assessment informs decisions; it does not carry them out. It often shows that some applications need changes to run well in the cloud, that some should stay where they are for now, and that some should simply be switched off. Planning the order of moves and modernizing particular workloads are later steps that build on what assessment found.

Retire and retain: the two ways not to migrate

Retire and retain are the two outcomes in which a workload does not move. Retire means decommissioning a workload because it is no longer needed. Retain means deliberately keeping a workload where it runs today because there is a good reason to, and reviewing that decision later.

RetireRetain
What happensThe application is switched offThe application keeps running where it is, for now
Typical reasonsNo users; a newer system already does the same job; duplicated functionalityA regulation requires the data to stay in the facility; hardware recently bought or still being paid off; a support or licensing contract that has not ended; a dependency that cannot move yet
Business valueAvoids paying to migrate and run something with no valueAvoids a move that is not allowed, or not worth it, yet
LaterGoneRevisited when the reason changes

A simple test separates them: retire needs a reason to stop, retain needs a reason to stay. An application that is in use and required cannot be retired, however old it is. An unused application has no reason to stay, so retaining it just keeps paying for it. A finding that only says a workload would be easy to move, or would benefit from the cloud, is an argument for migrating it rather than a reason to keep it.

Retaining is not a refusal to modernize. When the reason to stay is a rule about where the workload runs, no amount of change to the application lifts that rule, so it stays in place until the rule or the situation changes.

Rehost, replatform, refactor and reimagine

These four terms describe how much a workload changes when it moves, from not at all (rehost) to a completely new solution (reimagine). Speed falls and cloud benefit rises as you go down the list. The nicknames follow the Cloud Digital Leader exam guide; Google Cloud's architecture documentation uses slightly different labels for some types, so recognize the idea rather than the label.

ApproachAlso calledWhat changesSpeed and effortCloud benefit
RehostLift and shiftNothing: the workload moves as it is onto cloud virtual machinesFastest and cheapest to carry outLowest at first; sizing and design carry over
ReplatformMove and improveA few targeted changes while moving, such as swapping a self-run database for a managed database service; code stays mostly the sameModerateLess operational work, some better scaling
RefactorNo common nicknameThe code and architecture, for example splitting a monolith into microservicesSlower and costlierFull cloud-native benefits: independent releases and scaling
ReimagineRethinkThe business process itself; something new is built, often with AI and cloud-native servicesSlowest; the old application is not reworkedNew capability and new ways of serving customers

Rehost

Rehosting copies a workload unchanged onto cloud VMs. It suits deadline-driven moves, such as leaving a data center when its lease ends. Its known drawback is that it moves inefficiencies too: servers sized for on-premises peaks stay oversized, and designs that cannot scale out still cannot. A lift-and-shift estate can therefore cost more than expected and gain little elasticity until the team optimizes it after the move. That is normal and expected, not a sign that the cloud is the problem.

Replatform

Replatforming makes targeted improvements during the move without rewriting the application. The classic example is adopting a managed database so that patching and backups move to the provider. It is the usual answer when a team wants less upkeep but has no budget or time for a rewrite.

Refactor

Refactoring changes the application's code and architecture to gain cloud-native benefits. If the goal needs a different architecture, for instance separate teams shipping features independently or scaling one busy part on its own, only refactoring delivers it: approaches that keep the monolith leave it released and scaled as one unit.

Reimagine

Reimagining starts from the business goal rather than the old application. The organization rethinks the process and builds a new solution. The distinction from refactoring is the one most often tested. Take a retailer's returns process: splitting its returns application into microservices that still require a receipt, a store visit and a manual check is refactoring (same process, new architecture); replacing it with a process where customers start a return online, drop the parcel at a pickup point and are refunded automatically is reimagining (new process).

Choosing an approach for each workload

A migration rarely uses one approach for everything: after one assessment, each workload in the portfolio gets the approach that fits its own constraints. The deciding details are usually stated plainly:

  • No users or a replacement exists: retire.
  • A regulation, recent hardware investment or a contract keeps it in place: retain, and review later.
  • A hard deadline and no changes allowed: rehost.
  • Less operational effort without a rewrite: replatform onto managed services.
  • A goal that needs a new architecture, with time and budget accepted: refactor.
  • A new way of doing the business, not a better copy of the old one: reimagine.

For example, a university with an intranet wiki that duplicates a newer collaboration tool, a research-lab system whose data must stay in the country's own facility, and a shared file server that has to be out of the data center within weeks would retire the wiki, retain the lab system and rehost the file server. Many organizations also combine approaches over time for the same workload: rehost first to meet a deadline, then replatform or refactor once it is running in the cloud.

Virtual machines and containers

A virtual machine (VM) is a software-defined computer with its own operating system, running on a physical host alongside other VMs. A container is a package of an application together with the libraries and settings it needs, which shares the host's operating system kernel instead of carrying its own full operating system.

Virtual machines let one physical server run many isolated servers, each with its own OS. That is why lightly used physical servers can be consolidated onto far fewer machines. In Google Cloud, VMs are provided by Compute Engine (its business value is covered in the infrastructure offerings lesson).

Containerization solves the "works on my laptop, fails in production" problem: because the container includes the application's dependencies, it behaves the same on a developer laptop, in testing and in production, and on any platform that runs containers. Containers are started from images; a container registry stores and versions those images but does not run them.

Virtual machineContainer
What is virtualizedThe hardwareThe operating system
ContainsA full guest OS plus the applicationThe application and its dependencies only
Shares with the hostThe physical hardwareThe OS kernel
Start-up and footprintSlower to boot, largerStarts in seconds or less, lighter
Typical valueConsolidation, running existing servers unchangedConsistency across environments, portability, density

Containers are lighter and faster because there is no full operating system to boot or store for each one; the host's kernel does that work for all of them.

Applications, microservices and Kubernetes

A microservices architecture builds an application as a set of small, independent services that talk to each other through APIs, each deployed, released and scaled on its own. The alternative, a monolith, is one application deployed as a single unit, so every change needs a full release and the whole application scales together.

The business value is independence. During a sale, an online store built from microservices can scale only its checkout service while the rest of the site stays as it is, and separate teams can ship features to their own services without waiting for one big release. Each service usually owns its own data, so a change in one does not force changes in the others.

Microservices are commonly packaged as containers, and an organization running hundreds of containers needs software to manage them. Kubernetes is the open-source container orchestration system that does this: it places (schedules) containers onto machines, restarts containers that fail, and scales them with demand. Google Cloud's managed Kubernetes service is Google Kubernetes Engine (GKE), covered with the other infrastructure offerings.

Serverless computing and managed services

A managed service is one where the cloud provider runs and maintains the underlying infrastructure and software, handling provisioning, patching, scaling and upkeep, so the customer's staff can focus on using the service. Serverless computing goes furthest in that direction: the customer runs code or containers with no servers to provision or manage, the platform scales automatically, including down to zero when idle, and the customer typically pays only while requests or events are being handled.

Managed services are about who does the operational work: running in the cloud does not by itself make something managed, and how a service is priced does not decide it either. The test is whether the provider, not your staff, provisions, patches and maintains it.

Serverless fits event-driven work (reacting to file uploads or messages) and workloads with long idle periods. In general, the more of the stack the provider runs, the less upkeep the customer does and the less it pays for idle time:

ModelWho maintains the serversCost when idle
Self-managed serversThe customerBilled while the servers run, busy or not
Managed serviceThe providerUsually billed for the capacity provisioned
ServerlessThe provider; there are no servers for the customer to seeCan scale to zero, so little or nothing

Google Cloud's serverless compute products, Cloud Run and Cloud Run functions, are covered in the infrastructure offerings lesson.

Spot VMs

Spot VMs are Compute Engine virtual machines that run on Google Cloud's spare capacity at a deep discount compared with standard VMs, in exchange for the fact that Google Cloud can stop (preempt) them at any time when it needs the capacity back. They suit fault-tolerant, interruptible work such as batch processing, rendering, simulations that save checkpoints, and test environments. They do not suit live, customer-facing services such as a payment API, where a sudden stop would drop requests.

Spot VMs have no maximum runtime: they keep running until they are preempted or you stop them. That is the difference from the older preemptible VMs, which offer the same kind of discount but always stop after at most 24 hours. Google Cloud recommends Spot VMs over preemptible VMs for new work, and because nothing stops a Spot VM at a fixed deadline, long-running jobs are interrupted less often.

Spot VMsPreemptible VMs (legacy)
PriceDeep discount on spare capacityDeep discount on spare capacity
Can Google Cloud stop it?Yes, at any timeYes, at any time
Maximum runtimeNone24 hours
StatusRecommended for new workSuperseded by Spot VMs

Other Compute Engine pricing and placement options solve different problems: committed use discounts lower the price of steady usage in exchange for a one- or three-year commitment, and sole-tenant nodes dedicate a whole physical server to one customer, at a premium, for isolation, compliance or licensing needs. Neither can be stopped by Google Cloud to reclaim capacity.

Autoscaling and load balancing

Autoscaling automatically adds instances when demand rises and removes them when it falls, so capacity follows demand. Load balancing spreads incoming requests across a group of instances and stops sending traffic to any instance that fails its health checks. They are usually used together, and each solves a different problem.

  • Autoscaling keeps an application responsive during unpredictable surges and stops the organization paying for peak capacity all day. It changes how many instances run.
  • Load balancing shares traffic across the instances that exist and routes around failures, so users keep being served when one server goes down. It decides where each request goes.

Neither one does the other's job. A load balancer does not create instances when traffic triples, and autoscaling alone does not stop users being sent to a failed instance.

Tip. Questions on this topic are short business scenarios and a few direct definition questions. Migration items describe a workload and its situation and ask which approach fits, so watch the stated constraint: no users, a regulation or contract, a hard deadline with no changes, a wish for less upkeep without a rewrite, a goal that needs a new architecture, or a new business process. Some ask what discovery and assessment provide, why a lift-and-shift estate costs more than expected, or how to classify two proposals as refactoring or reimagining. Compute items ask you to name the concept described (VMs, containers, microservices, Kubernetes, serverless, managed services, autoscaling, load balancing) or to pick the model that meets cost and operations goals together. Harder items combine two facts, such as where Spot VMs fit versus a live service and how they differ from legacy preemptible VMs, or assign a different approach to each workload in a portfolio. Expect a few Select TWO items.

Key takeaways
  • A workload is an application or service plus the resources it needs; migrations move workloads in waves, not servers.
  • Discovery and assessment come first: dependencies decide what moves together, usage decides size and cost.
  • Retire needs a reason to stop (no users, a replacement); retain needs a reason to stay (regulation, recent hardware, a contract) and a later review.
  • Rehost is fastest but carries over sizing and design; replatform adds targeted upgrades like a managed database; refactor changes the architecture; reimagine changes the business process.
  • Each workload in a portfolio gets its own approach, decided by its stated constraints.
  • VMs virtualize hardware with a full OS each; containers package the app with its dependencies and share the host kernel, so they are lighter and portable.
  • Microservices are released and scaled independently; Kubernetes orchestrates containers by scheduling, restarting and scaling them.
  • Managed means the provider does the upkeep; serverless also removes servers entirely, scales to zero and charges per use.
  • Spot VMs are deeply discounted, can be stopped at any time and have no maximum runtime, unlike legacy preemptible VMs' 24-hour cap; keep live services off them.
  • Autoscaling changes how many instances run; load balancing spreads traffic and routes around failed instances.

Frequently asked questions

What is the difference between rehost, replatform and refactor?

Rehost (lift and shift) moves a workload to cloud virtual machines without changing it, which is fastest but keeps its old sizing and design. Replatform (move and improve) makes a few targeted changes during the move, such as adopting a managed database, while the code stays mostly the same. Refactor changes the code and architecture, for example into microservices, to gain cloud-native benefits at higher cost and time.

How is reimagining different from refactoring?

Refactoring rewrites an existing application so the same business process runs on a new, cloud-native architecture. Reimagining rethinks the business process itself and builds a new solution, often with AI and cloud-native services, instead of reworking the old application.

When should a workload be retained instead of migrated?

A workload is retained, meaning kept where it runs for now, when there is a good reason to stay, such as a regulation requiring the data to remain in the facility, hardware that was recently bought, or a support contract that has not ended. The decision is reviewed when that reason changes. An application with no users is retired, not retained.

Why can a lift-and-shift migration cost more than expected?

Rehosting copies workloads unchanged, including servers sized for on-premises peaks and designs that cannot scale out. In the cloud those servers keep running at their old size and gain little elasticity, so costs stay high until the team right-sizes or modernizes the workloads after the move.

Why are containers lighter than virtual machines?

Each virtual machine runs its own full operating system on virtualized hardware. A container packages only the application and its dependencies and shares the host's operating system kernel, so there is no full OS to boot or store for each one. That is why containers start faster and use fewer resources.

What is the difference between Spot VMs and preemptible VMs?

Both run on Google Cloud's spare capacity at a deep discount and can be stopped by Google Cloud when it needs the capacity. Spot VMs have no maximum runtime, while the older preemptible VMs always stop within 24 hours. Google Cloud recommends Spot VMs for new fault-tolerant work such as batch jobs.

Is serverless the same as a managed service?

Serverless computing is a kind of managed service. In any managed service the provider runs and maintains the infrastructure and software. Serverless goes further: there are no servers for the customer to provision at all, the platform scales automatically, including to zero when idle, and the customer typically pays only while requests or events are being handled.

What do autoscaling and load balancing each do?

Autoscaling changes how many instances run, adding them when demand rises and removing them when it falls, so capacity follows demand. Load balancing spreads incoming requests across the running instances and stops sending traffic to any that fail health checks. Together they keep an application responsive and available without paying for peak capacity all day.

Source

This lesson covers the "Modernize Infrastructure and Applications with Google Cloud" domain of the official CDL exam guide. Vendors revise their guides — check the source for the current version.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?