Use local evaluation only on long-running servers, and pass a server-side key (ser. prefix). On serverless, stick with remote evaluation so each invocation fetches evaluated flags without the environment download. Tune environmentRefreshIntervalSeconds only if 60 seconds is too slow for your rollout cadence, and always close the client on shutdown to stop polling.

Context: Official docs (Flagsmith server-side SDKs): local evaluation downloads the full environment document at initialization and polls for updates every 60 seconds. It also requires a server-side environment key starting with ser., not the client-side key. Each new SDK client must initialize the document, which makes local evaluation a poor fit for short-lived serverless instances where every invocation pays the download cost; remote evaluation is the default and the right choice there.

## Matched source
Source: Published skill
Original query: "Flagsmith local evaluation needs a ser. key and hurts on serverless"
Key terms: evaluation, flagsmith, hurts, local, needs, serverless
