How shards work
The load balancer that provisioning creates is shard 0. Each shard you add has a number (1, 2, 3, …) and serves its apps on its own API hostname:
Only the API hostname changes. The app’s frontend (
my-app.apps.yourcompany.com) is the same on every shard.
- Apps are placed at their first deploy. A new app goes on the lowest-numbered shard that has room. Shard numbers have no meaning beyond that: you can’t choose a shard for an app.
- Apps never move. An app keeps its shard, and its API hostname, for its whole life. Apps that exist before you add shards stay on shard 0 with the URLs they have today.
- A shard takes new apps only once its DNS record resolves. Until
*.sN.api.<domain>points at the shard’s load balancer, deploys skip it. - Subdomains of the form
s<number>(s1,s2, …) are reserved and can’t be used as app subdomains.
synthetiq production-app get <id> and read API host. Don’t derive it from the app’s domain.
Knowing when to add a shard
Deploys check capacity every time they run:- Warning: when every shard holds more than 80 apps, the deploy log says an administrator should add a shard.
- Limit: when every shard holds 90 or more apps, a new app’s first deploy fails and tells the user to contact their administrator. Redeploys of existing apps are never blocked.
status lists each shard and the number of apps on it:
Plan ahead in your certificate
Each shard’s listener needs a certificate covering*.sN.api.<domain>. To start, your API certificate only needs *.api.<domain>, for shard 0. To plan for capacity, you can optionally request it with spare shard names from the start:
*.api.apps.yourcompany.com*.s1.api.apps.yourcompany.comthrough*.s9.api.apps.yourcompany.com
- Request a separate certificate for the shard names (for example
*.s1.apithrough*.s9.api) and set it as each shard’sapi_cert_arn, or - Request a new API certificate with the extra names and update
certs.api_cert_arn. Provisioning swaps the certificate on the existing load balancer in place.
*.s10.api through *.s19.api), or ask AWS to raise the Domain names per ACM certificate quota.
Add a shard
1
Make sure a certificate covers the shard
The API certificate covers it if you issued it with spare shard names. Otherwise, issue one that covers
*.sN.api.<domain> (see above) and wait for ISSUED.2
Add the shard to the config
In A bare number uses Shard ids start at 1 and are permanent, because they are part of every API hostname on the shard. Add shards one at a time: an empty shard still costs a load balancer.
_infra/synthetiq.yaml, list the shard under alb_shards:certs.api_cert_arn. To use a different certificate, give the shard an entry:3
Preview and apply
Run
synthetiq infra generate, review the new synthetiq-alb-shard-N stack in the changeset, then synthetiq infra provision. In CI, this is the usual pull request → review → merge loop. See Previewing & Applying Changes.4
Create the shard's DNS record
provision prints one new record:Create it at your DNS provider (DNS-only if your provider proxies).
provision warns while the record is missing, and the shard takes no new apps until it resolves. synthetiq infra status shows the same.Vanity URLs on a shard
A vanity URL proxy forwards the API to the app’s internal API host. For an app on shard N, that ismy-app.sN.api.<domain>, not my-app.api.<domain>. Copy it from Reverse proxy targets in the app’s Deployments tab.
Limits
- Shards can’t be removed once apps are on them. Removing an entry from
alb_shardsdoes not delete its stack. - Load balancers per region default to 50 in AWS, which is room for about 4,500 apps. Raise it through Service Quotas if you need more.

