DeploymentsLocations

Locations

Each deploy runs in one location. Pick the one closest to your users, and create one deploy per location to run in several.

Choose a location#

Set the location in the deploy form, under DeploymentsNew deploy or on an existing deploy's Edit.

  • Location lists the locations you can deploy to, and new deploys default to the first one.
  • The Deployments table shows each deploy's location in the Location column. The Nodes and Pods pages show the location of each node and replica.

How to pick#

  • Closest to your users. Latency to your users is usually the deciding factor.
  • Close to your data. If the deploy talks to a database or API hosted elsewhere, put it near that dependency.
  • Where your machine type is offered. A dedicated deploy's Machine type must be offered by a cluster in the selected location.
  • The same as the deploys sharing its hostname. See Locations and domains.

Change a deploy's location#

Edit the deploy, choose a different Location and Save deploy.

Run in several locations#

A deploy runs in one location, and a hostname is served from one location. To run the same application in several places:

  1. Create one deploy per location

    In the same environment, create a deploy of the same build in each location, for example api-lon and api-mia.

  2. Give each its own hostname

    Attach a hostname per location, such as api.lon.example.com and api.mia.example.com, and publish one CNAME for each.

  3. Add geographic routing on top

    Use your DNS provider's geo or latency routing to send users to the nearest hostname.

Locations and domains#

One hostname resolves to one cluster, so every deploy serving that hostname (for example on different path prefixes) must be in the same environment and the same location. DevLyft checks this when you attach a route and rejects a hostname attached to a deploy in a different environment or location. We don't currently serve one hostname from several locations at once. See Routes and path prefixes.

When placement is pending#

If a deploy shows placement.state: PENDING, it hasn't been assigned to a cluster yet, usually because the location doesn't have enough room for the environment. It retries on its own. Contact info@devlyft.io if it stays that way.