skip to content

Deployment & Hosting

What a build emits, what a hosting target must provide for each feature to work, and what breaks when one release replaces the last. Asked because the same app behaves differently on every target.

on this pageshow

explore

questions

page 1 of 2

In a meta-framework, what is a deployment adapter and what does it change about the build output?

level: juniorimportance: must knowfreq 68%

answer

  1. one build, many host shapes
  2. translation step after the build
  3. entry, routing config, file layout
  4. cannot add a missing capability

basics

~20 s

A deployment adapter translates one framework build into the exact shape a chosen host runs: a startable server entry, per-request function bundles, an edge bundle, or plain files plus routing rules. Same application code, different packaging.

solid answer

~40 s

A meta-framework build emits framework-shaped artefacts: hashed client assets, prerendered documents, a server bundle that can render a route, and manifests tying routes to handlers. No host consumes that directly. The adapter repackages it into one host's contract — an entry file that listens on a port for a long-running process, handler bundles plus a routing config for a per-request function platform, a size-limited bundle for an edge runtime, or files plus rewrite rules for a plain file host. It also decides what is left out: a file-host build emits no server bundle at all. Swapping the adapter is usually a config change, but the capabilities the app may rely on change with it, and that is the part that bites.

go deeper

for a junior

Recall the one-line definition: the adapter packages a finished build into the shape one host can run. Be able to name the four shapes — a long-running process, per-request functions, an edge runtime, and a plain file host.

for a middle

Explain the mechanics: what the build already contains, what the adapter has to generate on top of it (entry, routing config, rules), and who serves static files on each shape. Say plainly that an adapter cannot add a missing capability.

for a senior

Show that you audit before switching: list the request-time features the app depends on and check each against the target, because most mismatches degrade silently instead of failing the build. Add a target-specific smoke test.

for a principal

Frame the adapter choice as where portability is bought or sold. Building against the narrowest shape keeps you movable and costs features; exploiting one host's extras is faster now and pins you later. Decide that deliberately, per product.

A **deployment adapter** is the step between "the build finished" and "the host can run it". Application code is written once against the framework; the adapter decides what that build turns into for one specific hosting shape. ## What the build hands the adapter Before any target is involved, a typical meta-framework build has produced: - **Hashed client assets** — JavaScript chunks, CSS and static files whose names carry a content hash so they can be cached forever. - **Prerendered documents** — HTML produced at build time for routes that did not need a request. - **A server bundle** — the code that can turn a request for a not-prerendered route into a response, conceptually `render(request) -> response`. - **Manifests** — a route table saying which handler serves which path pattern, and an asset graph saying which chunks a route needs. That set is a description of an application, not a deployable unit. Every host has its own contract, and the contract is what the adapter writes. ## What the adapter emits per target | Target shape | What it runs | What the adapter must emit | What it cannot offer | |---|---|---|---| | Long-running process | one process, started once, serving many requests | a start entry that binds a port and mounts the route table | nothing inherent — but you operate it yourself | | Per-request functions | a handler invoked per request, possibly on a fresh instance | one or more handler bundles in the platform's signature, plus a path-to-handler routing config | state kept in memory between requests; responses held open indefinitely | | Edge runtime | a restricted runtime close to the user | a small bundle using only the APIs that runtime provides | local filesystem, native dependencies, heavy request-time CPU | | Plain file host | static files, plus redirect and rewrite rules | prerendered documents and assets, plus rules for deep links and the not-found path | anything that has to happen at request time | ## Why it is a translation, not a copy Four things genuinely differ between targets, which is why a copy of the output folder is not enough: 1. **The entry signature.** A process target needs something startable; a function target needs an exported handler shaped the way that platform calls it. 2. **Who owns routing.** On a process, the framework's own route table matches the path. On a function or file host, the platform matches first, from a config file the adapter generates, and only then calls in. 3. **Who serves static files.** A process target can serve them itself; on the other shapes the host serves them and the render code never sees those requests. 4. **How configuration arrives.** Values read from the environment, and the base path assets are requested from, are wired differently per host. ## What the adapter cannot invent An adapter packages for a target; it does not add capabilities the target lacks. If the chosen shape has no place to keep state that every instance can read, a server-side data cache or on-demand regeneration cannot work there just because the adapter succeeded. If the shape cannot hold a response open, a held-open connection will end early. Most of these fail *quietly*: the build is green, the page renders, and the behaviour is simply different — a cache that never hits, a stream that arrives in one chunk, a regenerated page that reverts on the next request. That silence is why "which adapter" is a design decision and not a deployment detail. ## Switching targets Because the adapter is chosen at build time, moving hosts is mostly mechanical: pick a different adapter, rebuild, deploy. The real work is the audit that goes with it — list the features the app relies on (request-time rendering, streaming, regeneration, request-time asset work, long-held connections) and check each against what the new shape can actually provide. Meta-frameworks differ in how much of this they tell you: some fail the build when a route uses something the target cannot support, others build happily and let the difference show up in production. A last practical note: some hosts offer **more than one runtime** for the same application, so a single build can be split across shapes. That flexibility is a property of the target, not of the adapter, and it is worth knowing which of your candidate hosts have it before the choice is made.

  • Does choosing an adapter change the application source code?
    Normally no — the same route modules and components build for any target. What changes is the packaging and the set of behaviours you may rely on. Code only changes when the app used something the new shape cannot do, such as writing to local disk or keeping a cache in process memory.
  • Where do redirect and rewrite rules come from on a file-host build?
    The adapter generates them from the framework's route table, because a file host matches paths itself. Deep links to routes that have no matching file need a rewrite to the right document, and the not-found path needs a rule so the host answers with a 404 status rather than 200.
  • If a build succeeds for a target, is the app guaranteed to behave the same there?
    No. A successful build only proves the output was packaged in the host's shape. Features that need something the shape lacks — shared storage, a process that stays up, a runtime that flushes as it writes — usually degrade silently rather than erroring, so the target needs its own smoke test.

It is the plug adapter, not a transformer: it makes the same appliance fit a different socket, but it cannot supply voltage the socket does not carry.

saying these in an interview costs you the question

  • Says the adapter compiles the app and replaces the bundler
  • Thinks any build output can be copied onto any host
  • Believes the adapter adds features the target lacks
  • Assumes a green build proves the target supports every feature
  • Treats the target choice as an ops detail with no design impact
open as a page

What kinds of files does a meta-framework's production build leave in its output directory, and what is each for?

level: juniorimportance: must knowfreq 68%

basics

~10 s

A production build emits content-hashed client assets, prerendered documents for routes resolved at build time, a server bundle for routes that were not, and manifests mapping routes and assets to those files.

open as a page

In a meta-framework's development server, how is a route served differently from the way the built output serves it?

level: juniorimportance: must knowfreq 72%

basics

~20 s

A development server compiles a route on demand and renders it again on every request, with prerendering skipped and the cache tiers switched off. The built output compiles once ahead of time and reuses whatever it is allowed to reuse.

open as a page

In a meta-framework app running as several instances behind a load balancer, what does a shared cache store give you that per-instance memory does not?

level: juniorimportance: must knowfreq 62%

basics

~20 s

A shared store keeps one copy of regenerated pages and cached data that every instance reads and writes, so all instances agree. Per-instance memory gives each process its own copy, and those copies drift apart.

open as a page

In a meta-framework, what is a static export, and what must a file host do to serve it?

level: juniorimportance: must knowfreq 66%

basics

~20 s

A static export runs the build once and emits only files - HTML documents, JavaScript, CSS, media - with no server process behind them. The host's job is to map each URL to a file and return its bytes.

open as a page

When a meta-framework app moves from a long-running server process to per-request functions, which capabilities can silently break?

level: middleimportance: must knowfreq 62%

basics

~10 s

Everything that assumed the process stays alive between requests: in-memory caches and regeneration state, work continued after the response, connections held open, and streaming when any layer buffers the whole body before forwarding it.

open as a page

Why does a meta-framework build emit a separate module graph for the browser and for the server?

level: middleimportance: must knowfreq 58%

basics

~20 s

Because the two sides have different entry points, targets and permitted dependencies. The browser graph must stay small and carry no secrets or server-only code, while the server graph may use anything, so each is traversed from its own roots.

open as a page

Why does code that works against a development server fail only when the production build runs it?

level: middleimportance: must knowfreq 62%

basics

~20 s

The build executes your code: it compiles every route and renders the prerenderable ones on the build machine, with no browser and no incoming request. Paths a development session never reached fail there for the first time.

open as a page

When a meta-framework app is exported to files only, which capabilities stop working and what replaces each?

level: middleimportance: must knowfreq 70%

basics

~20 s

Everything that needed code running per request goes: request-time rendering, server-handled writes, regeneration, interception before a route resolves, request-time media work. Each is replaced by a browser fetch, a separate service, host rules, or another build.

open as a page

What is version skew between releases of a web app, and why does swapping the whole deployment atomically not prevent it?

level: middleimportance: must knowfreq 55%

basics

~20 s

Version skew is a browser running one release's client code while the server serves the next: a missing chunk, a moved write identifier, a changed payload shape. Atomic deploys swap only the server; loaded tabs keep the old client.

open as a page

A team self-hosts a meta-framework app that a managed platform used to run — which responsibilities now sit with them?

level: seniorimportance: must knowfreq 55%

basics

~20 s

Serving static output in front of the render process, absorbing request-time asset work that now competes for the same CPU, keeping instances free of sticky state, bounding memory in a long-lived renderer, and withholding traffic until a render succeeds.

open as a page

After a content edit, the instance that handled the write serves the new page while other instances and the CDN still serve the old one. How do you diagnose and fix it?

level: seniorimportance: must knowfreq 70%

basics

~20 s

The purge ran in one process and cleared only what that process holds. Locate each stale copy by comparing instances against the public URL, then share the cache store and purge the cache in front as a second explicit step.

open as a page

What must a bundle satisfy to run on an edge runtime target that a full server runtime does not demand?

level: middleimportance: should knowfreq 48%

basics

~20 s

It must use only the restricted API surface that runtime offers — web-standard request, response, streams and fetch — with no local filesystem or native dependencies, and stay inside tight bundle-size and per-request CPU budgets.

open as a page

In a meta-framework's build output, what does a route manifest contain, and what depends on it at runtime?

level: middleimportance: should knowfreq 52%

basics

~20 s

A route manifest maps each URL pattern to how that URL is answered - a prerendered document or a server handler - and to the assets that route needs. Server dispatch and client-side prefetching both read it.

open as a page

When a development server swaps a changed server module in place, what happens to state that module held at module scope?

level: middleimportance: should knowfreq 50%

basics

~20 s

Module-scope state is re-created: the fresh copy of the module runs its initialisation again, so any pool, cache or registry it built is new and empty, while the previous instance can survive unreferenced and still holding its resources.

open as a page

When a meta-framework lets you replace its cache store with your own implementation, what must that implementation provide and guarantee?

level: middleimportance: should knowfreq 48%

basics

~20 s

A small storage contract: get an entry by key, set a whole entry with its metadata, remove entries. Bytes must be opaque and serialisable, keys come from the framework, and a failed read must degrade to a miss.

open as a page

How does a file host resolve a URL like /docs/setup to a document, and why can a trailing slash change the result?

level: middleimportance: should knowfreq 50%

basics

~20 s

The host maps the path onto stored bytes. An extensionless path resolves either to a file with an added extension or to a directory's index document, and hosts differ - so one form can work where the other misses.

open as a page

After a release changes the shape of a route's data payload, why can a tab loaded from the previous build break on its next navigation?

level: middleimportance: should knowfreq 44%

basics

~20 s

A navigation fetches the route's data but renders it with code from the release that tab loaded. If the new release renamed, removed or re-nested fields, the old renderer reads what is no longer there and blanks or throws.

open as a page

How do a build's base path and asset origin appear in its output, and what breaks when either is wrong?

level: seniorimportance: should knowfreq 44%

basics

~20 s

Both are baked in at build time, prefixing asset URLs in generated HTML, in manifests, in emitted CSS and in the client runtime that composes chunk URLs later. Get either wrong and documents render while their assets fail to load.

open as a page

Given only a build's output, how do you tell which artefacts were produced once and which need a process at request time?

level: seniorimportance: should knowfreq 50%

basics

~20 s

Look for entry points, not file types. Finished documents and hashed assets are results, while a request-handling entry, an on-demand asset transformer or a writable runtime cache directory all mean code still has to execute per request.

open as a page

Your team keeps finding breakage only after deploying because everyone works against the development server — how would you change that?

level: seniorimportance: should knowfreq 46%

basics

~20 s

Verify against the built output: build on every change in the pipeline so every route is compiled and prerendered, and run the build locally before anything risky ships. Keep the development server for the edit loop.

open as a page

When a new release replaces the old one, which cached copies outlive the deploy, and what decides whether reusing them is safe?

level: seniorimportance: should knowfreq 55%

basics

~20 s

Anything inside a replaced process dies with it; anything outside survives, so a shared store and the cache in front keep serving copies built by the previous release. Reuse is safe only for entries that cannot differ between builds.

open as a page

Your exported site answers every unknown URL with the app's not-found screen and a 200 status - what breaks, and how do you fix it?

level: seniorimportance: should knowfreq 44%

basics

~20 s

That is a soft 404: the page says missing while the status says fine. Crawlers, link checkers, monitors and caches all read it as healthy, and a missing asset returns HTML. Serve the not-found document with a real 404.

open as a page

A long-open tab's form submissions start failing with not-found right after a deploy, and a reload fixes them. What happened?

level: seniorimportance: should knowfreq 46%

basics

~20 s

The client posts a write to a handler address the build minted. The new release recomputed that address and no longer answers the old one, so a stale tab posts where nothing is mapped. Reloading downloads current addresses.

open as a page

As an engineering lead, how would you set policy for which runtime target your organisation's web apps deploy to?

level: principalimportance: should knowfreq 44%

basics

~20 s

Start from a capability matrix of what each target shape can do, name one default target, require a written exception to leave it, and gate every target with a conformance test, because mismatches degrade silently.

open as a page

A team proposes making the development server behave exactly like the deployment — how would you evaluate that proposal?

level: principalimportance: should knowfreq 38%

basics

~20 s

Treat the divergence as bought, not accidental: it pays for the edit loop. Buy parity as automated gates and a separate mode, keep the fast loop as the default, and refuse half-measures that lie in a new way.

open as a page

How would you decide where a scaled-out meta-framework app's durable cache should live: a shared store, per-instance memory, or a CDN?

level: principalimportance: should knowfreq 44%

basics

~20 s

Put cache authority where a correction must be observable and a miss is expensive. Anonymous URL-addressable documents belong in front of the app, fleet-consistent expensive results in a shared store, and per-instance memory is a latency layer, never the authority.

open as a page

How would you decide whether shipping a product as a files-only static export is the right call or a trap?

level: principalimportance: should knowfreq 38%

basics

~20 s

Decide on the roadmap, not today's feature list. Files-only fits when no delivered HTML has to depend on the requester and publishing can be a build. It becomes a trap when per-request behaviour is inevitable and the exit was never priced.

open as a page

As lead of an app that deploys several times a day, how would you decide what one release may change while clients from the previous release are still running?

level: principalimportance: should knowfreq 30%

basics

~20 s

Measure how long sessions really live and make that the compatibility window: inside it, changes to what a loaded client touches must be additive or retained. Add a cheap escape hatch so an out-of-date client reloads without losing input.

open as a page

In a meta-framework, why do a prerendered route and a per-request personalized route get different cache headers on their responses?

level: middleimportance: nice to knowfreq 40%

basics

~20 s

How a response was produced decides who may keep it. A document identical for everyone may be stored by a shared cache in front of the app; one assembled from a session must be marked unstorable there.

open as a page

showing 1–30 of 31