NGS JetStream Placement Tags

JetStreams, KV Stores, and Object Stores, will generally be placed in an NGS geographic region and hosting provider close to where your client application is connected. Resource balancing and NGS subscription tier may also influence default placement.

To specify placement restrictions, use the following placement tags (alone or in combination of different tag types):

TagTypePlacement on NGS nodes:
geo:usGeo RegionIn the U.S.
geo:us-westGeo RegionIn the Western U.S.
geo:us-eastGeo RegionIn the Eastern U.S.
geo:us-centralGeo RegionIn the Central U.S.
geo:europeGeo RegionIn Europe
geo:asiaGeo RegionIn Asia
cloud:gcpCloud ProviderHosted in Google Cloud Platform
cloud:azCloud ProviderHosted in Microsoft Azure
cloud:awsCloud ProviderHosted in Amazon Web Services
CLI Example

Place new JetStream VEHICLE-EVENTS in the U.S. and hosted in Azure:

nats stream add VEHICLE-EVENTS \
   --tag "geo:us" \
   --tag "cloud:az" \
   --description "Capture vehicle events in an NGS stream" \
   --subjects "vehicle.*.*.*.event.>" \
   --retention limits --discard old --dupe-window 2m \
   --max-age 7d --max-bytes 10485760 --max-msgs 1000 --max-msgs-per-subject=-1 --max-msg-size 131072 \
   --replicas 1 --storage file \
   --no-deny-delete --no-deny-purge --no-allow-rollup

If NGS cannot fulfill placement based on your tags, the CLI will return:

nats: error: could not create Stream: insufficient resources (10023)