Free to read. Sign up to save your progress and take knowledge-check quizzes.

Sign up free
9 min read·Updated March 24, 2026

Hosting & Deployment

Modern hosting platforms have removed most infrastructure complexity from web application deployment — a git push to a connected repository is all it takes to deploy globally, with SSL, CDN, and preview environments included automatically.

Listen to this lesson

Free preview · first 0:30
0:00 / 0:30

Audio & video lessons are paid features

Plus unlocks audio streaming. Pro adds downloadable audio, video, certificates, and more.

Plus adds:
  • Audio streaming
  • Downloadable PDFs
  • All AI Playbooks
  • Personalized content
Pro also adds:
  • Certificates of completion
  • Audio MP3 downloads
  • Video lessonssoon
  • & More…soon

Watch this lesson

Video coming soon

Learning Objectives

  • Compare the leading hosting platforms for web applications and AI-powered applications
  • Explain the key differences between serverless, edge, and persistent server deployment models
  • Select the appropriate hosting platform based on application type and requirements

Modern Hosting Has Changed Everything

The hosting landscape for web applications has been transformed. What used to require server provisioning, SSL certificate management, CDN configuration, and deployment scripting now happens automatically on connection to a GitHub repository.

For AI application developers, this means the deployment decision is made once at project setup — and then mostly forgotten. The right platform choice depends on application type (static vs. server-side vs. full-stack), traffic patterns, database requirements, and team preferences.

PlatformBest ForServerless FunctionsDatabase Support
VercelNext.js/React; preview environments; global CDNYes (Edge Functions)No native; connects to Supabase, PlanetScale, etc.
NetlifyStatic sites; JAMstack; A/B testingYes (Netlify Functions)No native; connections via plugins
Cloudflare Pages + WorkersEdge-first; global latency; AI inference at edgeYes (Workers, true edge)D1 (SQLite), KV, R2 storage
RailwayFull-stack with databases; persistent servicesNo (persistent servers)PostgreSQL, MySQL, Redis, MongoDB
RenderSimple full-stack; free tier; auto-deployNo (web services)PostgreSQL, Redis
Fly.ioContainerized; global edge; WebSocketsNo (persistent VMs)SQLite (LiteFS), connect to external
GitHub PagesFree static hosting; documentation; portfoliosNoNo

Vercel — The Next.js Platform

Vercel is the deployment platform created by the team that built Next.js — and it's optimized specifically for Next.js (though it supports all major frameworks).

The Vercel developer experience sets the standard:

Zero-config deployment: Connect a GitHub (or GitLab, Bitbucket) repository; Vercel detects the framework and deploys automatically. No yaml files, no build scripts to write.

Preview deployments: Every pull request gets its own unique preview URL — a fully working deployment of that branch. This enables review of UI changes without running anything locally, and creates a direct link between a PR and its visual result.

Instant global CDN: Static assets are served from 200+ edge locations globally. Next.js server-side rendering runs in Vercel's serverless function network, which auto-scales without configuration.

Edge Functions: Run JavaScript at the edge — in the same 200+ locations as the CDN — for ultra-low latency server-side logic. Useful for personalization, authentication middleware, and AI inference on small models.

v0 integration: v0-generated components deploy directly to Vercel with one click, completing the design-to-production workflow without leaving the browser.

Pricing update (September 2025): Vercel restructured Pro pricing to a credit-based model — $20/month base plus $20 in usage credits. v0 also moved to strict credit pricing. The free Hobby tier remains available for personal projects.

For most Next.js applications — including AI-powered SaaS products — Vercel is the path of least resistance from code to production.

Netlify

Netlify is a strong Vercel alternative with some distinctive capabilities:

Split testing: Built-in A/B testing at the platform level — route a percentage of traffic to a different branch and measure the difference without additional tooling.

Netlify Observability: Performance monitoring and error tracking built into the platform — no third-party APM needed.

AI Gateway: Route AI API calls through Netlify's infrastructure with built-in caching, rate limiting, and observability for LLM-powered features.

Prerender (GA December 2025): Server-side rendering at the edge for dynamic content — improving SEO and initial load performance.

Identity and Forms: Built-in user authentication and form submission handling — no backend required for simple sites.

For static sites and JAMstack applications, Netlify and Vercel are the two dominant options. The choice often comes down to specific feature needs or team familiarity.

Cloudflare Pages + Workers

Cloudflare operates from 300+ edge locations globally — more than Vercel, Netlify, or AWS CloudFront. This global distribution makes Cloudflare the choice when latency in many regions simultaneously matters most.

Cloudflare Workers: True serverless functions that run at the edge — close to the user, not in a centralized data center. Unlike Vercel Edge Functions (which run at edge locations but aren't full serverless), Workers are a full compute environment.

Cloudflare Workers AI: Run inference on AI models at the edge — with 2-4x inference speedups in 2025-2026. Cloudflare's acquisition of Replicate (November 2025, 50,000+ AI models) and the Astro web framework (January 2026) significantly expanded the platform's AI and frontend capabilities. Workers AI now includes Leonardo.AI, Deepgram, FLUX.2, Kimi K2.5, and many more models.

Cloudflare D1: Edge-native SQLite database, replicated across Cloudflare's network. For applications that need a database near the edge.

The tradeoff: Cloudflare's Worker environment has constraints (limited execution time, specific APIs) that require adaptation from traditional Node.js development patterns. For teams willing to work within these constraints, the global performance advantage is significant.

Railway — Full-Stack with Databases

Railway fills a gap the Vercel/Netlify category doesn't address: deploying full-stack applications that need persistent servers, background workers, and databases as a unified service.

Where Vercel focuses on serverless (stateless functions that scale to zero), Railway supports persistent servers — processes that stay running continuously. This matters for:

  • Applications with WebSocket connections (real-time features, live collaboration)
  • Background job processors (email queues, scheduled tasks)
  • Long-running compute (video processing, data pipelines)
  • Any service that can't be stateless

One-click databases: Add PostgreSQL, MySQL, Redis, or MongoDB to your project with one click. Railway provisions, connects, and manages it.

Service networking: Multiple services in a project communicate via Railway's internal network — connect your backend to your database to your cache to your queue worker without external networking configuration.

Railway's pricing is usage-based — no idle costs when services aren't handling requests.

Render

Render positions itself as the modern Heroku: familiar PaaS experience, deploy any application, free tier for personal projects.

The appeal for simpler projects: a generous free tier, PostgreSQL database with daily backups, Redis, and background workers — all deployable from GitHub with auto-deploy on push.

Render is appropriate for: solo developers with side projects, small team MVPs, applications that need always-on servers without Railway's more complex configuration, and any project where a free-tier hosting option with managed databases is the deciding factor.

Fly.io — Containers at the Edge

Fly.io runs Docker containers at the edge in 30+ regions globally. The combination of full container flexibility (any language, any dependency) with edge distribution is distinctive.

Key capabilities:

  • True persistent VMs: Not serverless — your application process runs continuously
  • Automatic global routing: Requests route to the nearest healthy instance
  • WebSockets and long-lived connections: Reliable because it's not serverless
  • Volume storage: Persistent disk storage per machine

The tradeoff: Fly.io requires Docker knowledge and more configuration than Vercel or Netlify. For applications that need persistent containers distributed globally — real-time applications, database proxies, game servers, complex WebSocket workloads — it's the right fit.

GitHub Pages — Free Static Hosting

GitHub Pages is free static site hosting directly from a GitHub repository. Limitations: static files only (no server-side code), 1GB repository size limit.

Perfect for: project documentation, personal portfolios, marketing landing pages for open-source projects, and any content that doesn't require server-side logic.

Choosing the Right Platform

The decision tree:

  • Next.js application: Vercel
  • Static site / JAMstack: Vercel or Netlify
  • Global low-latency requirements: Cloudflare Pages + Workers
  • Full-stack with persistent server + databases: Railway
  • Simple side project, free tier needed: Render
  • Container-based, edge-distributed: Fly.io
  • Free static hosting: GitHub Pages

Tip

Start on Vercel, move if you need to. For most new web applications, Vercel is the right starting point: zero configuration, excellent Next.js support, generous free tier, and preview deployments that improve team review workflows. If you hit its limitations (need persistent servers, complex WebSocket requirements, or very high traffic cost sensitivity), evaluate Railway or Cloudflare at that point.

Key Takeaways

  • Modern hosting platforms have removed most infrastructure complexity — connecting a GitHub repo to Vercel or Netlify is all that's required to deploy a web application globally with SSL and CDN
  • Vercel is the standard for Next.js applications; Netlify for static and JAMstack; Cloudflare for global edge performance; Railway and Render for full-stack applications requiring persistent servers and databases
  • The serverless vs. persistent server distinction matters: serverless (Vercel, Netlify, Cloudflare Workers) scales to zero cost but requires stateless design; persistent servers (Railway, Render, Fly.io) require always-on resources but support any application pattern
  • Choose based on your application's architectural requirements — most applications fit naturally on Vercel or Netlify; move to Railway or Fly.io when you have requirements that serverless can't handle

Save your progress & take the quiz

Sign up free to bookmark lessons, track which modules you've completed, and lock in what you learned with a quick knowledge-check quiz at the end of each lesson.

🧭Recommended for you