Vercel Flags SDK Cold Start 7x Faster, No Longer Extends Function Duration

Vercel Flags SDK eliminates initialization network requests and moves reporting to the runtime, making cold starts about 7x faster.
Vercel made two key optimizations to its Flags SDK targeting cold start latency and reporting costs for feature flags in serverless environments. The SDK now bundles the datafile with the deployment and parses it immediately at client creation, using the datafile revision carried by each function invocation to check freshness — eliminating initialization network requests entirely. p75 cold start initialization drops from over 70ms to 10ms (~7x faster), with p99 flag read latency below 1ms for both cold and warm invocations. Usage events are now passed directly to the Vercel runtime instead of relying on `waitUntil`, so they no longer extend function duration, reducing pay-as-you-go costs and simplifying lifecycle management. Developers need to upgrade `@flags-sdk/vercel` to 1.5.3 or higher and redeploy to enable these improvements.
Vercel recently rolled out two key optimizations to its Flags SDK, directly addressing two core pain points of feature flags in serverless environments: cold start latency and the implicit occupancy of function execution time by background usage reporting. According to official data, SDK initialization time in p75 cold start scenarios dropped from over 70ms to 10ms — roughly a 7x improvement — while the usage reporting mechanism has been moved to the runtime, so functions no longer keep running after responding.

Cold start optimization: from 70ms to 10ms
In Vercel's serverless architecture, cold starts are a critical factor affecting user experience. Previously, the Flags SDK needed to validate or fetch the latest datafile over the network during initialization, and this network wait was counted directly toward function startup time.
The official blog notes that the new version makes two changes to eliminate this network dependency:
- Datafiles bundled with the deployment are parsed immediately: The SDK loads and parses the datafile bundled with the deployment when the client is created, ensuring data is ready before business code first evaluates any flag.
- Leveraging the revision number carried by function invocations: Each function invocation now includes the revision of the current datafile. The SDK uses this to determine whether the locally bundled datafile is up to date, completing validation without a network request.
Official internal testing shows that after eliminating the network wait, p75 cold start SDK initialization time dropped from over 70ms to 10ms — about a 7x improvement. Once initialization completes, flag reads are nearly instantaneous, with p99 read latency below 1ms for both cold and warm invocations.
A cold start refers to the entire process of initializing a runtime environment from scratch when a serverless function instance is first invoked or is invoked again after being reclaimed following a period of inactivity. On FaaS platforms like Vercel, this period typically includes container scheduling, runtime loading, dependency initialization, and first evaluation of user code, often adding hundreds of milliseconds compared to warm invocations. Because cold start overhead is added directly to user request response times, its impact is especially pronounced for latency-sensitive APIs and edge rendering. If a feature flag SDK makes network requests during initialization, that network round-trip is also counted toward cold start, amplifying tail latency. Common industry mitigations include provisioned concurrency, snapshot restore, and bundling configuration data with the deployment — the optimization described here falls into the last category.
Reporting mechanism change: no longer extends function duration
The Flags SDK previously implemented usage reporting via waitUntil, which caused functions to keep running after sending a response, incurring additional function duration billing. For high-frequency functions, this hidden cost is non-negligible.
The new version passes usage events directly to the Vercel runtime, which handles reporting, so reporting no longer counts toward function duration. This means developers no longer pay extra compute costs for reporting logic, and function lifecycle management becomes clearer.
waitUntil is an API provided by the Vercel runtime that hands asynchronous tasks after the response is sent (such as logging, metrics reporting, and cache writes) to the platform to complete in the background, avoiding blocking the response to the client. Note that although tasks taken over by waitUntil don't block the response, under traditional billing models they still extend the function's lifetime and are therefore counted toward duration. For high-frequency functions with massive invocation volumes, even millisecond-level background reporting adds up to substantial costs. Passing telemetry events directly to the runtime and letting the platform handle reporting strips this tail work out of the user's billing window and makes function lifecycle boundaries clearer, making it easier to troubleshoot timeouts and resource usage.
Upgrade path and scope of impact
To benefit from these improvements, developers need to upgrade @flags-sdk/vercel to version 1.5.3 or higher and redeploy the application. The official upgrade command is:
pnpm add @flags-sdk/vercel@latest
For more details, see the Flags SDK documentation.
What this means for developers
Feature flags handle canary releases, A/B testing, and emergency kill switches in modern deployments, and their performance overhead directly affects overall application performance. The two optimizations in this Vercel update target latency and cost respectively:
- Latency: The dramatic reduction in cold start initialization time means flag evaluation is no longer a bottleneck for serverless function startup, which is especially beneficial for latency-sensitive APIs and edge rendering scenarios.
- Cost: Reporting logic no longer extends function execution time, directly reducing operating costs in pay-as-you-go scenarios and simplifying the debugging complexity of function lifecycles.
For teams already using Vercel Flags, upgrading to version 1.5.3 and redeploying is a low-risk, high-reward operation; for teams evaluating feature flag solutions, these two improvements also make Vercel Flags more attractive as a platform-native option.
Background
Feature flags are a technique for controlling at runtime whether a code path takes effect. Typical uses include canary releases, A/B testing, targeted rollouts by user segment, and quickly disabling a feature during production incidents. By data source, they can be divided into static-file-based and remote-service-based: the former generates a datafile at build or deploy time, offering fast reads but requiring redeployment to update; the latter fetches in real time via a server-side interface, offering flexibility but introducing network dependencies. The "datafile bundled with the deployment + revision number carried by invocations" approach described here is a hybrid: it retains the low latency of local reads while validating data freshness through the version number along the invocation path, balancing performance and consistency.
One-line Summary
Vercel Flags SDK eliminates initialization network requests and moves reporting to the runtime, making cold starts about 7x faster.
Related articles
AWS AgentCore Gateway: Connecting AI A…
AWS AgentCore Gateway: Connecting AI Agents to Enterprise Backends with MCP
How AWS AgentCore Gateway acts as a primary MCP server to aggregate REST APIs, Lambda, and existing MCP services? Analyzing its AST real-time mapping, zero cold start, semantic search for tool overload, session isolation, and key injection security design, plus the architectural approach to decoupling enterprise AI agents from backends.

One Link Gives Figma AI a New Skill: Hands-On with MCP Connectors
Paste one MCP server link and the AI Agent in Figma gains new tool capabilities. We break down the setup flow, 20+ one-click apps, read/write permissions and execution policies, and the public HTTPS requirement.

Cognition SWE-2 in Practice: One Prompt to Handle the Whole Product Launch Process
Analyzing a YouTube creator's prompt for using Cognition SWE-2 to launch a product: a landing page, seven-email sequence, and non-buyer follow-up tool, plus how the 'test and report' constraint changes AI delivery quality.