Serverless
Netlify
A platform for sites and JAMstack: Git deploys, forms, serverless functions and a CDN.
What it is
Netlify appeared in 2014 and popularized the JAMstack approach: static pages built ahead of time and served through a CDN, plus APIs and functions for dynamics.
You connect a Git repository and Netlify builds and publishes the site on every push. There are previews for pull requests, rollbacks to earlier deploys and redirects through netlify.toml.
Extra features include Functions (serverless, based on AWS Lambda), Edge Functions, Forms (form handling without a backend), Identity and Blobs. Next.js, Astro, SvelteKit, Nuxt and other frameworks are supported.
Use it when
- A static or hybrid site, blog, documentation, landing page.
- You need forms, redirects and previews without a separate backend.
- The team wants Git deploys with no server setup.
- A simple serverless backend for a few endpoints.
Avoid it when
- A complex backend with long processes and persistent connections.
- Very high traffic where a predictable price is needed.
- You need deep Next.js integration that Vercel supports better.
Key concepts
- JAMstack
- JavaScript, APIs and prebuilt markup: the site is built ahead of time and served from a CDN.
- Deploy preview
- A separate URL for each pull request to check changes before merging.
- Netlify Functions
- Serverless functions in the
netlify/functionsfolder, available at/.netlify/functions/<name>. - Redirects / rewrites
- Rules in
netlify.tomlor_redirectsfor redirects and API proxying. - Forms
- HTML forms with the
netlifyattribute are collected by the platform without your own server.
Example
Interview questions
1. What is JAMstack?
An architecture where pages are built ahead of time and served from a CDN, while dynamics go through JavaScript and APIs. It is fast, cheap and safer, because there is no server running logic for every request.
2. How do Netlify Functions work?
They are serverless functions based on AWS Lambda that live in the project folder and deploy together with the site. They run on request and suit webhooks and small APIs.
3. How is Netlify different from Vercel?
Both give Git deploys and previews. Vercel is stronger with Next.js because the same company makes it, while Netlify is more framework-neutral and has built-in forms and identity.
Comparisons with this technology
Related technologies
- VercelA frontend platform from the creators of Next.js: Git deploys, a preview for every PR, serverless functions and edge.
- CloudflareA global network with CDN, DNS, DDoS protection, plus Workers, R2 and D1 for running apps at the edge.
- AWS LambdaAn AWS service that runs functions in response to events and bills only for execution time.
- AstroA framework for content sites: ships minimal JavaScript by default, with interactive islands on demand.
- Next.jsA full-stack React framework: routing, SSR, static generation, API routes and server components.
- GitHub ActionsGitHub Actions is CI/CD built into GitHub: YAML workflows run on repository events such as push or pull request.
Logos belong to their owners and are used for identification only. Icons: Simple Icons (CC0), Devicon (MIT).