# Configure Cloud Run functions (1st gen)

Use this page to understand what configuration options are available in
Cloud Run functions, how to control the behavior of your functions, and what the
best practices are for each type of configuration.

## Guard against high request levels

You can control how many instances your function creates to serve requests.
This can help to curb costs and guard against
[abnormally high request levels](https://docs.cloud.google.com/functions/1stgendocs/configuring/max-instances.md.txt#limits_best_practices).
See [Using maximum instances](https://docs.cloud.google.com/functions/1stgendocs/configuring/max-instances.md.txt)
to learn more.

## Avoid cold starts and reduce latency

You can avoid cold starts for your application and reduce application latency by
setting a minimum number of instances. Note that setting a minimum number of
instances incurs cost. See
[Using minimum instances](https://docs.cloud.google.com/functions/1stgendocs/configuring/min-instances.md.txt) to learn
more.

## Secrets

You can use [Secret Manager](https://docs.cloud.google.com/secret-manager/docs.md.txt#docs) with your
Cloud Run functions to securely store API keys, passwords, and other
sensitive information. See
[Using secrets](https://docs.cloud.google.com/functions/1stgendocs/configuring/secrets.md.txt) to learn more.

## Environment variables

You can create key/value pairs for use with your function. See
[Using environment variables](https://docs.cloud.google.com/functions/1stgendocs/configuring/env-var.md.txt) to learn
more.