Serverless and edge hosting (Vercel, Netlify, Cloudflare) checklist¶
Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).
Also apply the general checklist.
This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.
Recommended (6โ8)¶
-
HOST-4(8) Keep request and user data out of module-level variables and the local file system, and keep durable state in managed storage, such as a database, key-value store or blob store. (specific/web-hosting) -
HOST-8(8) Store credentials only as the platform's secret variables: Vercel Secret environment variables, Netlify variables marked as containing secret values, and Cloudflare secrets. Never put them in plain variables or invercel.json,netlify.tomlor Wrangler files. (specific/web-hosting) Automatable: Netlify secret scanning. -
HOST-9(8) Give production its own secrets and data stores, and don't let preview or development deployments use them. (specific/web-hosting) Automatable: Vercel Separate Production Secret Values. -
HOST-1(7) Run code that queries a regional database or API in the same region as that backend, and keep edge execution for work that doesn't need it, such as redirects, rewrites, headers and geolocation. (specific/web-hosting) -
HOST-5(7) Connect to relational databases through connection pooling built for the platform: Hyperdrive on Cloudflare Workers, and on Vercel a pool created once per instance and registered withattachDatabasePool. (specific/web-hosting) -
HOST-6(7) Set CDN caching deliberately on function responses: a shared-cache lifetime withs-maxageorCDN-Cache-Control,stale-while-revalidatewhere slightly stale content is acceptable, andprivateorno-storeon per-user responses. (specific/web-hosting) -
HOST-10(7) Keep platform configuration in files in the repository, such asvercel.json,netlify.tomlor the Wrangler configuration, and treat them as the source of truth instead of changing settings in the dashboard. (specific/web-hosting) -
HOST-11(7) Keep preview deployments private: check that Vercel Deployment Protection or Netlify's private previews cover them, and put Cloudflare Access in front of Workers previews and Pages preview deployments, which are public by default. (specific/web-hosting) -
HOST-12(7) Recover from a bad release by rolling back to the previous production deployment, and keep data and schema changes backward compatible so that the previous version still works. (specific/web-hosting) -
HOST-13(7) Send logs and traces to an external observability service with a log drain or OpenTelemetry export, because the platforms keep runtime logs only for hours or days. (specific/web-hosting) -
HOST-2(6) Start new projects on each platform's recommended compute: the Node.js runtime on Vercel, and Workers with static assets on Cloudflare. (specific/web-hosting) -
HOST-3(6) Keep each request well within the platform's duration, CPU, memory and payload limits, and move long or retryable work to background functions, queues or workflows. (specific/web-hosting) -
HOST-7(6) Tag cached responses with cache tags, and purge or invalidate them by tag when the underlying content changes. (specific/web-hosting)