Next.js is not a static site generator and it is not a Node server. It is a build output with a set of runtime expectations, and the question of where to host it comes down to whether the host meets those expectations or emulates them.
The expectations are specific. Incremental static regeneration needs a cache that survives a deploy, is shared across every instance, and can be invalidated on demand. Middleware needs to run before the cache is consulted, not after. Streaming needs a request path with nothing in it that buffers a response before sending it. Server actions need a real server that accepts POST requests to the same routes that serve GET requests, with the full Node API surface available.
Miss any one of those and the application still builds, still deploys, and still appears to work. That is the trap. ISR silently degrades to every-instance-caches-separately, so users see different versions of a page depending on which instance they hit. Streaming silently degrades to a buffered response, so time-to-first-byte gets worse and nobody notices because the page still renders. The failures are not build errors. They are behaviours that look like something else.
So this article is a compatibility matrix with the reasoning behind each cell. The part that matters is not whether a platform’s marketing page lists Next.js support. It is which of the four capabilities work natively, which work through an adapter, and which do not work at all.
Key takeaways
- ISR is the capability that breaks most quietly. On any platform running more than one instance, it needs a shared cache handler, and without one each instance regenerates and serves its own copy.
- Middleware only pays for itself when it runs in front of the cache. A platform that runs middleware inside the application server has kept the API and lost the point.
- Streaming fails whenever something in the path buffers. That is usually a proxy or a function integration, not the framework, and it shows up as worse time-to-first-byte rather than as an error.
- Server actions need the Node runtime and a POST path, which is why they are the capability most likely to work on a boring container host and least likely to work on an edge-only adapter.
The four capabilities, and what each actually requires
Incremental static regeneration
ISR renders a page, caches it, serves the cached copy, and regenerates in the background after a revalidation window or when something explicitly invalidates it. Three requirements follow from that.
The cache must be shared. The default implementation writes to the local filesystem. With one instance that is fine. With several, each instance has its own cache, regenerates independently, and serves whichever version it happens to hold. Users refreshing a page see it flip between old and new. The fix is a cache handler backed by something shared, which Next.js supports as a configuration hook, and which is exactly the work described in Vercel alternatives.
The cache must survive a deploy. If the cache is inside the container image or the function bundle, every deploy empties it and every page regenerates at once. On a large site that is a thundering herd against your database at the worst possible moment.
Invalidation must propagate. On-demand revalidation by path or by tag has to reach every instance and every CDN node holding a copy. A platform that caches at the edge but has no hook into the framework’s invalidation call will serve stale content until the TTL expires, regardless of what your webhook did.
Middleware
Middleware runs before a request is handled: rewriting, redirecting, checking a token, assigning an experiment bucket, setting a header. The value is entirely in where it sits. Running in front of the CDN cache, it can personalise the decision about which cached response to serve while the response itself stays cacheable. Running inside the application server, after the cache has already been bypassed, it is just a request handler that runs first.
The second thing to check is the runtime. Middleware was designed for a constrained edge runtime with no filesystem and no native modules, so libraries that work in a route handler may not work in middleware. More recent Next.js versions allow middleware to run on the Node runtime in some configurations, which widens what you can call but changes where it runs and therefore what it is worth. Ask a platform both questions: where does middleware execute, and which runtime does it get.
Streaming
Streaming sends the shell of a page immediately and fills in slower parts as they resolve. It is the main reason to use the newer rendering model at all, and it is the capability most often lost to infrastructure rather than to the framework.
It requires that nothing between the rendering process and the browser waits for a complete response. A proxy that buffers, a function integration that returns a single response object, a compression layer configured to compress whole responses, or a CDN that will not forward chunked responses all break it in the same way: the page still works and the first byte arrives later than it should. Nothing errors. This is why streaming has to be verified by observation rather than assumed from a support matrix.
Server actions
Server actions are functions in your component tree that execute on the server, invoked by a POST to the same route path. They need the Node runtime, they need multipart body handling for form submissions, and they need whatever body size limit sits in front of them to be large enough for the uploads you accept.
They also interact with ISR, because an action frequently calls revalidation after mutating something, and that call needs the same invalidation propagation described above. An action that succeeds while the page it revalidated stays stale is a confusing bug to chase, and the cause is in the cache layer rather than in the action.
Needs first-hand data: For each platform you are evaluating, deploy a test application exercising all four capabilities and verify each by observation rather than by documentation. Specifically: request an ISR page repeatedly across instances and check whether the rendered timestamp is consistent, watch a streaming response arrive in chunks rather than at once, confirm middleware executes on cache hits, and submit a server action with a file attached. Record which of the four degrade silently rather than failing.
The adapter problem
Next.js emits a build output with a documented structure, and every host that is not Vercel consumes that output through an adapter. The adapter’s job is to map the framework’s expectations onto the platform’s primitives: routes become functions or a server process, the ISR cache becomes some storage service, middleware becomes an edge function or a request hook, and static assets become CDN objects.
Three things follow, and they matter more than any feature list.
Adapters lag the framework. A Next.js release can introduce a capability the adapter does not yet map. The gap is usually weeks to months and it is occasionally longer for the less-used capabilities. If you upgrade the framework aggressively, this is a real operational cost.
Adapters make choices you cannot see. Whether a route becomes one function or many, whether the ISR cache is consistent or eventual, whether middleware runs at the edge or in the server, whether responses stream, are all adapter decisions. Two platforms with the same checkmarks can behave differently for reasons that are only visible in the adapter source.
An adapter is a dependency with a maintainer. Some are maintained by the platform vendor, some by an open source project that several platforms build on, and some by a community. Check which, and check how recently it kept up with a framework release, because that is the signal that predicts your next upgrade.
The alternative is the one path with no adapter at all: build with the standalone output and run next start in a container. That is the framework’s own server, so every capability works by construction. What you take on instead is the infrastructure the adapter would have provided: a shared cache handler, a CDN in front, invalidation wiring, and image optimisation. That is a real amount of work and it is well-understood work, with the mechanics laid out in Vercel alternatives.
HTTP caching semantics: the standard underneath, not a product
Every platform here is a cache with compute attached, and the rules that govern those caches are not any vendor’s. They are the HTTP caching specification: the meaning of Cache-Control directives, freshness and staleness, revalidation with ETag and If-None-Match, the Vary header’s effect on the cache key, and the stale-while-revalidate and stale-if-error extensions.
Understanding this is the difference between configuring a CDN and guessing at one. ISR is, at bottom, an application-level implementation of the same ideas the specification already describes.
What it gives you
- A shared vocabulary that works across every CDN and every browser, so a correct
Cache-Controlheader behaves predictably regardless of which platform is in front of your application. - Revalidation that costs almost nothing when content has not changed, because a validator round trip returns a short not-modified response rather than the body.
- The stale-while-revalidate directive, which is the standard mechanism behind the behaviour ISR provides: serve the cached copy immediately, refresh it in the background.
- A precise model of what makes two requests the same request, through the
Varyheader, which is the thing that quietly destroys cache hit rates when a response varies on a header that differs per user.
What it does not do
- It defines freshness, not invalidation. There is no standard way to tell every cache in the world to drop an object right now, which is why every CDN has its own purge API and why on-demand revalidation is platform-specific rather than portable.
- It says nothing about caching personalised or authenticated responses safely, and getting that wrong is how one user’s page ends up served to another.
- Compliance is uneven in practice. Intermediate caches, corporate proxies and browsers each interpret edge cases differently, so the specification describes intent rather than guaranteed behaviour.
- It has no concept of the framework’s tag-based invalidation, so mapping a revalidation call onto cache purges is work the platform adapter has to do and is where platforms differ most.
The practical consequence for a Next.js deployment: set explicit cache headers on everything you control, keep Vary as narrow as possible, and know precisely what your platform does when the framework asks it to revalidate a tag. The broader caching layer is covered in CDN providers.
Vercel

Vercel is the framework’s own platform, and evaluating it on features is missing the point: it is the reference implementation, so every capability works because the capability and the platform were designed together. ISR, middleware placement, streaming, server actions, image optimisation and the preview workflow are one system rather than a framework plus an adapter.
Pros
- Every framework capability works on the day it ships, with no adapter in between and no lag behind a framework release
- Middleware runs in front of the cache with invalidation wired into the framework’s revalidation calls, which is the arrangement that makes ISR and personalisation coexist
- The deployment workflow, with per-branch preview URLs and instant rollback to immutable builds, is the strongest in this comparison
- Image optimisation, analytics and the caching layer are built in rather than assembled, which removes a meaningful amount of infrastructure work
Cons
- Several metered dimensions across function invocations, compute duration, bandwidth, image optimisation and edge requests make cost forecasting genuinely hard until you have run real traffic
- The coupling is to the platform’s caching and function model as much as to the framework, so leaving means rebuilding the parts you did not realise were platform features
- Long-running or CPU-heavy work does not belong here, so a backend of any weight ends up somewhere else and you are operating two platforms anyway
Best for: Product teams whose main constraint is shipping speed, who want every framework capability to work without infrastructure work, and who can absorb usage-based pricing.
Pricing: Plan tiers plus usage metering across invocations, compute duration, bandwidth, edge requests and image optimisation, with the usage dimensions rather than the plan tier driving most of the total at scale.
Cloudflare

Cloudflare runs Next.js through an adapter that targets Workers with Node compatibility enabled, which is a substantially better position than the earlier edge-only approach that required every route to fit the edge runtime. ISR caching maps onto Cloudflare’s own storage primitives, and static assets are served from the same network that serves everything else. The appeal is a single platform for the application, the CDN, the cache and any additional compute.
Pros
- One platform for application, CDN, cache and storage, so there is no cross-vendor invalidation path to wire up and no egress between tiers
- The adapter targets a Node-compatible runtime rather than the constrained edge runtime, so far more of the ecosystem works than in earlier approaches
- Middleware runs genuinely in front of the cache on the same network that serves your assets, which is the placement that makes it worthwhile
- Storage primitives for the ISR cache are first-party, so the shared-cache requirement is met by configuration rather than by assembling a service
Cons
- Adapter maturity is the binding constraint, and capability support tracks framework releases with a lag you should verify against the versions you actually run
- Native modules still do not load, so image processing and anything with a compiled binding needs a platform service or a different approach
- Debugging is harder than on a conventional server, because a failure can be in the framework, the adapter, or the runtime, and the boundaries are not obvious
Best for: Teams already on Cloudflare who want the application, the cache and the CDN on one network and are willing to verify adapter support for the capabilities they use.
Pricing: Metered on requests and CPU time with a free tier and a paid plan raising the ceiling, with the storage used for the ISR cache metered separately on operations and volume.
Netlify

Netlify maintains its own Next.js runtime and has done so for long enough that the integration is mature rather than experimental. ISR maps onto the platform’s cache primitives with on-demand invalidation wired to the framework’s revalidation calls, and middleware runs as an edge function on the Deno-based runtime in front of the cache. The surrounding product, with atomic deploys and instant rollback, is close to the Vercel workflow.
Pros
- A vendor-maintained adapter with a long track record, so framework upgrades are less likely to strand you than with a community adapter
- On-demand invalidation is wired into the platform cache, so revalidating a tag or path actually purges rather than waiting for a TTL
- Middleware runs at the edge in front of the cache, preserving the placement benefit rather than only the API
- Atomic deploys with instant rollback apply to the whole site including functions, so a bad deploy is one action to reverse
Cons
- Function execution limits are inherited from the underlying provider, so long-running server work needs the background function path or a different platform
- Several metered dimensions across build minutes, function invocations and bandwidth, which is the same forecasting difficulty as Vercel with less framework-specific tooling to explain it
- Capabilities occasionally land behind the framework’s release, and the gap is not always documented prominently
Best for: Teams who want a Vercel-shaped workflow with a mature vendor-maintained adapter and are already using or considering Netlify for the rest of their sites.
Pricing: Plan tiers with included build minutes, function invocations and bandwidth, metered beyond the allowances, with the bandwidth and function dimensions dominating at scale.
Render

Render runs Next.js the boring way: a container or a source build running the framework’s own server. That means every capability works by construction, because there is no adapter translating anything. What you configure instead is the infrastructure the adapter would have provided, principally a shared cache handler if you run more than one instance and a CDN in front if you want edge caching.
Pros
- No adapter, so ISR, middleware, streaming and server actions all behave exactly as the framework documents them, including on the day a new framework version ships
- Distinct service types for web services, background workers and cron jobs, so the parts of your application that are not the framework have a supported home
- Managed Postgres and Redis alongside the application with private networking, which covers both the database and a natural backing store for the shared cache handler
- Predictable instance-time billing rather than several usage meters, which makes cost forecasting straightforward
Cons
- Edge caching and invalidation are yours to configure, so achieving the cache behaviour Vercel gives by default is real work
- Instance-time billing means idle capacity is paid for, and scaling to zero is not available on paid services
- Regional deployment with a limited region set, so a globally distributed front end means putting a CDN in front rather than distributing the application
Best for: Teams who want the framework’s own server with no adapter risk, are comfortable configuring a shared cache handler, and prefer predictable instance pricing.
Pricing: Instance-time billing per service at fixed instance sizes, with managed databases and bandwidth metered separately and no per-invocation dimension.
Railway

Railway runs the framework’s server in a container the same way Render does, with the emphasis on getting from a repository to a running deployment in the smallest number of steps. Databases and caches are provisioned as adjacent services with private networking already configured, which happens to be exactly what a shared ISR cache handler needs.
Pros
- Full framework compatibility because it is the framework’s own server, with no adapter in the path to lag or misbehave
- A Redis or Postgres service provisioned alongside the application with networking already wired, which is the backing store a shared cache handler wants
- Usage-based metering rather than fixed instance sizes, so a small application costs a small amount without capacity planning
- The configuration surface is small enough to hold in your head, which makes debugging a deployment issue much faster than on a large cloud
Cons
- No built-in CDN or edge cache, so caching in front of the application is a separate vendor and a separate invalidation path you build
- Limited placement and networking control, so multi-region topologies and private connectivity requirements are not well served
- Usage-based metering across several resources is harder to forecast than a fixed price as a project accumulates services
Best for: Small teams and side projects who want a Next.js application and its database running quickly with full framework compatibility and minimal configuration.
Pricing: Usage-based on CPU, memory and network across all services in a project, with plan tiers adding included usage rather than changing the meter.
Fly.io

Fly runs the standalone output in a microVM, with the distinguishing feature being geographic placement: the same application in several regions with anycast routing. For a rendering tier that is genuinely useful, because server rendering benefits from being near the user in a way that a static asset does not. It also raises the ISR cache question sharply, since a per-region filesystem cache in a multi-region deployment is the silent-divergence failure at its worst.
Pros
- Full framework compatibility from running the framework’s own server, with no adapter in the path
- Multi-region placement as a platform primitive, so the rendering tier can sit near users rather than behind a CDN in one region
- Machines can stop when idle and start on request, which gives scale-to-zero economics without giving up a real server process
- Persistent volumes and a straightforward path to running the database nearby, which matters because server rendering is latency-sensitive to the data layer
Cons
- A multi-region deployment makes the shared ISR cache mandatory rather than advisable, and getting that wrong produces different content per region
- Data locality becomes your problem as soon as you deploy to more than one region, and rendering in many regions in front of one database changes little
- More operational responsibility than the managed platforms here, including region-level failure and placement decisions
Best for: Teams who genuinely need server rendering close to users in several regions and are prepared to solve the shared cache and data locality problems that come with it.
Pricing: Metered on machine size and running time with stopped machines not billed for compute, plus separate metering for volumes and bandwidth.
AWS Amplify
Amplify is AWS’s managed hosting for framework applications, including server-side rendering support for Next.js, with a build pipeline, a CDN in front and integration with the rest of AWS. It is the option that makes sense when the organisation is already on AWS and the constraint is staying inside that boundary rather than choosing the best framework experience available.
Pros
- Managed Next.js server rendering inside AWS, so identity, networking and existing accounts stay where the rest of the estate already is
- A CDN sits in front by default, so edge caching is present rather than something you add
- Build pipeline and branch-based deployments are included, which covers the preview workflow without a separate tool
- Sits alongside the rest of AWS, so a rendering tier that needs a private resource in a VPC has a supported path
Cons
- Framework capability support tracks releases with a lag, and the specifics of which capabilities are supported in which configuration are not always clearly documented
- Debugging spans several AWS services, so a rendering failure can require looking in the build system, the function layer and the CDN in turn
- Cost is spread across build, compute, storage and data transfer meters, which makes it harder to reason about than a single instance price
Best for: Teams already standardised on AWS who need the application inside that boundary and value integration over having the newest framework capabilities immediately.
Pricing: Metered across build minutes, server-rendering compute duration, storage and data transfer, with no single instance price and data transfer commonly the largest component.
Self-hosted Node
Building with the standalone output and running the framework’s server behind a reverse proxy is the baseline every other option is measured against. Every capability works, because this is what the framework was written to run on. What you own is everything the platform would otherwise provide, and the honest accounting of that list is longer than most teams expect: a shared cache handler, a CDN and its invalidation path, image optimisation, TLS, process supervision, health checks, deployment and rollback.
Pros
- Complete framework compatibility with no adapter, no lag behind releases and no platform-specific behaviour to discover
- Full control over the cache layer, so you can implement exactly the invalidation semantics your content model needs rather than the platform’s interpretation of them
- The cheapest option per unit of compute by a wide margin, particularly for steady traffic where usage-based platforms charge an elasticity premium
- No vendor coupling at all, so the deployment target becomes a commodity decision you can revisit
Cons
- You own the shared cache handler, the CDN, invalidation, image optimisation and the deployment pipeline, which is a real project before the first production deploy
- Rollback, preview environments and atomic deploys are things you build, and building them badly is worse than not having them
- Image optimisation needs a native library in the runtime, which is straightforward on a server and is another component to keep patched
- Somebody has to be on call for the infrastructure, which is the cost the managed platforms actually remove
Best for: Teams with existing infrastructure practice and steady traffic, where the compute saving and the absence of vendor coupling justify owning the surrounding pieces.
Pricing: No licence cost; you pay for the compute you run it on plus whatever CDN, storage and object cache you put around it, each metered by its own provider.
Needs first-hand data: Deploy the same application to your two finalists and compare time-to-first-byte for a streaming route, a cached ISR route and an uncached dynamic route, measured from at least two client locations. Record also what happens on the first request after a deploy. The deploy-recency behaviour differs sharply between platforms and is invisible in any feature comparison.
How to choose
Start by listing which of the four capabilities you actually use. Plenty of Next.js applications are server-rendered pages and route handlers with no ISR, no middleware and no server actions. If that is yours, every platform here works and you should choose on price, workflow and where your data lives. This question eliminates most of the comparison for a large fraction of teams.
If you use ISR, decide the cache question before the platform question. More than one instance means a shared cache handler, and the platform either provides one or you configure one against a store you run. A platform that claims ISR support without answering how the cache is shared across instances has not answered the question.
Check where middleware executes. In front of the cache, or in the application server. If it is in the server, you have the API and not the benefit, and you should ask whether you need middleware at all or whether a route-level check would do.
Verify streaming by watching it. Do not trust a matrix. Deploy a route that streams and confirm chunks arrive progressively. Something in the path that buffers produces a working page with worse time-to-first-byte, which is exactly the failure nobody catches.
Then weigh adapter risk against infrastructure work. These are the two costs on offer and you are choosing which one to pay. An adapter means someone else’s code maps the framework onto the platform and it may lag your upgrades. Self-hosting means no adapter and a list of components you own. Neither is free.
| ISR | Middleware placement | Streaming | Server actions | Adapter | |
|---|---|---|---|---|---|
| Vercel | Native, shared, invalidation wired | In front of cache | Native | Native | None, reference implementation |
| Cloudflare | Via platform storage primitives | In front of cache | Supported, verify per version | Supported on Node-compatible runtime | Open source, verify version support |
| Netlify | Platform cache with on-demand invalidation | In front of cache, edge function | Supported | Supported | Vendor-maintained |
| Render | Framework default, shared handler is yours | In the application server | Native, verify no buffering proxy | Native | None |
| Railway | Framework default, shared handler is yours | In the application server | Native | Native | None |
| Fly.io | Framework default, shared handler mandatory | In the application server | Native | Native | None |
| AWS Amplify | Managed, verify invalidation behaviour | Platform dependent | Verify per configuration | Supported | Vendor-maintained |
| Self-hosted Node | Yours to implement, fully controllable | In the application server | Native | Native | None |
| HTTP caching semantics (standard, not a product) | The model ISR implements | Not applicable | Not applicable | Not applicable | Not applicable |
My defaults, stated plainly. If shipping speed is the constraint and the budget tolerates usage pricing, Vercel, and do not pretend the coupling is not there. If you are already on Cloudflare and your team can verify adapter support against the framework versions you run, Cloudflare gives you one network for everything. If you want zero adapter risk and predictable cost, run the standalone output on a container platform and do the shared cache work once. And if you are considering self-hosting seriously, read the mechanics in Vercel alternatives before committing, because the list of pieces you take on is the whole decision. The wider category, including the platforms that host the rest of your stack, is in hosting platforms for developers.
Frequently asked questions
Why does my ISR page show different content on different requests?
Because each instance has its own cache. The default cache implementation writes to the local filesystem, so with more than one instance each one regenerates and serves its own copy, and refreshing flips between them. The fix is a shared cache handler backed by a store every instance can reach, configured through the framework’s cache handler hook. Any platform that autoscales, or that you have scaled past one instance, needs this, and it is the single most common Next.js self-hosting mistake.
Do I need Vercel to use middleware, ISR and server actions?
No. All four capabilities work on the framework’s own server, which means any container platform running the standalone output supports them without an adapter. What Vercel provides that a container platform does not is the surrounding infrastructure: a shared cache with invalidation wired to the framework’s revalidation calls, middleware placed in front of the CDN cache, and image optimisation as a service. You can assemble all of that; the question is whether you want to own it.
Why is my streaming route not streaming?
Something in the path is buffering. Common causes are a reverse proxy configured to buffer responses, a compression layer that compresses whole responses rather than chunks, a function integration that returns a single response object rather than a stream, or a CDN that will not forward a chunked response. The framework is rarely the cause. Test by requesting the route with a client that prints bytes as they arrive, and remove components from the path until chunks appear progressively.
Does middleware at the edge actually help if my application is in one region?
Yes, for the decisions it can complete without reaching your origin: redirects, rewrites, token validation, experiment assignment and header manipulation all finish at the edge and never touch your server. The larger benefit is that middleware in front of the cache lets you personalise which cached response is served while keeping the response itself cacheable. If your platform runs middleware inside the application server instead, both of those benefits are gone and you are running a request handler with extra runtime constraints.
Related reading
- Best hosting platforms for developers — the full category and where framework hosting sits within it.
- Vercel alternatives — the self-hosting mechanics in depth, including the shared cache handler and image optimisation.
- Best container hosting platforms — where the standalone output runs when you skip the adapter entirely.
- Best edge compute platforms — what the edge runtime can and cannot execute, which decides what middleware can call.
- Cloudflare Workers vs Vercel vs Deno Deploy — the runtime-level comparison behind two of the options above.
- Best CDN providers for developers — the caching layer you assemble yourself once you leave a platform that includes one.