Environment settings

Overview

This topic explains the settings available for environments in LaunchDarkly.

Edit environment settings

To view or update the settings on the “Edit environment” panel:

  1. Click the project dropdown. The project menu appears:

The project menu.

The project menu.
  1. Select Project settings.
  2. Select Environments. The Environments list appears.
  3. Click the overflow menu next to your environment.
  4. Select Edit environment.
  5. Update the settings, then click Save environment.
  • Click X to close the “Edit environment” panel without saving changes.

The “Edit environment” panel includes the following settings:

SettingDescriptionLearn more
NameThe environment name
TagsCustomizable labels used for categorizationTags
Critical environmentAn environment that affects your customers or the health of your systemsCritical environments
Require commentsWhether to require a comment before saving flag or segment changesRequired comments
Require confirmationWhether to require entering the name of the environment before saving flag or segment changesRequired confirmation
Enable secure modeEnsures that one end user cannot inspect flag variations for another end user when you use some client-side SDKsSecure mode
Send detailed events to Data Export destinationsWhether to export evaluation events for end users that encounter the flagData Export
TTLNumber of minutes that the PHP SDK can cache feature flag rules locallyTTL settings
Environment ColorThe color used to indicate this environment in the LaunchDarkly UI
KeysReset the credential required to use a LaunchDarkly SDK to evaluate flags in this environmentReset SDK credentials

Approval settings are managed separately. To learn how to edit approval settings, read Configuring approvals for an environment.

TTL settings

TTL settings are only used in the PHP SDK

This setting controls how long the PHP SDK can cache feature flag rules locally. You only need to configure this if you are using the PHP SDK.

Each environment also has a time-to-live (TTL) setting. This sets the number of minutes that the PHP SDK can cache feature flag rules locally. The TTL is only used in the PHP SDK, because PHP’s shared-nothing architecture makes LaunchDarkly’s streaming model impossible. To learn more, read the PHP SDK reference.

For customers using PHP, we recommend setting your TTL to at least five minutes in production environments. This lets the PHP SDK cache feature flag rules for five minutes, so most calls to variation will not make a remote request. The tradeoff is that changes you make to your feature flag rules on your Flags list will not take effect for five minutes.

If your site has relatively low traffic (fewer than one request per minute), you may wish to increase the TTL to five minutes or more to take better advantage of the local cache.

If the TTL is set to zero minutes, the SDK will not use a local cache, and every call to variation will make a remote request to our CDN. You can set your TTL to zero in testing environments so it reflects changes immediately, but we do not recommend a zero minute TTL in production.

In high volume PHP environments, we strongly recommend using our Relay Proxy. To learn more, read The Relay Proxy.

To set the TTL:

  1. Navigate to the Account settings page.
  2. Click the Projects tab.
  3. Click the name of the project. The project page appears.
  4. Click the overflow menu next to your environment.
  5. Select Edit environment. The “Edit environment” panel appears.
  6. Enter a value in the TTL input and click Save environment.

Reset SDK credentials

You can reset the SDK key and mobile key if needed. For example, your organization’s security policy may require you to rotate your SDK keys on a regular basis.

To reset an SDK key or mobile key:

  1. Click the project dropdown. The project menu appears.

  2. Select Project settings.

  3. Select Environments. The Environments list appears.

  4. Click the overflow menu for your environment.

  5. Select Edit environment. The “Edit environment” panel appears.

  6. In the “Keys” section click Reset SDK key or Reset mobile key.

  7. (Optional) If you are resetting an SDK key, choose how many hours to keep the current SDK key active for, up to 720 hours (30 days). During this period, both the current SDK key and the new SDK key will work. This option is not available for mobile keys.

  8. Enter the name or key of your environment:

    The SDK key reset dialog.

    The SDK key reset dialog.
  9. Click Reset.