Atlaslog
Atlaslog / Field Notes / Tiles
Field note · Tiles

Seven tile subdomains configured, still only six connections

Quick answer

`subdomains: '01234567'` is set, but the network panel still shows six active requests with everything else queued. Either the URL template lacks `{s}`, or all subdomains resolve to one host behind HTTP/1.1 where the limit still applies.

Last verified 2026-11-03 · Multiple versions · Cite this page
Applies to: Leaflet 1.9.x / Nginx 1.24 / HTTP/1.1
Symptom
Checklist
  1. Check whether real request URLs contain a `t0` or `t3` prefix
  2. Group requests by domain in the network panel and count active hosts
  3. Run `nslookup t0.example.com` and `nslookup t1.example.com` to see whether they hit the same IP
  4. Check the response protocol and `server` header for HTTP/2
  5. Verify the URL template literally contains `{s}`
Fix

Enable HTTP/2 (`listen 443 ssl http2`) so the six-per-domain limit stops mattering, or point subdomains at different backends and use `https://t{s}.example.com/{z}/{x}/{y}.png`; cutting request count with `tileSize: 512, zoomOffset: -1` also helps.

Code
L.tileLayer('https://tile.example.com/{z}/{x}/{y}.png', {
  subdomains: '01234567'      // 配置了但未生效
});
L.tileLayer('https://t{s}.example.com/{z}/{x}/{y}.png', {
  subdomains: '01234567'
});
# Nginx:启用 HTTP/2 并给瓦片加长缓存
server {
  listen 443 ssl http2;
  server_name t0.example.com t1.example.com t2.example.com;

  location / {
    root /var/www/tiles;
    expires 30d;
    add_header Cache-Control "public, immutable";
  }
}

# DNS:不同子域指向不同节点,避免单机排队
t0.example.com  A  10.0.1.11
t1.example.com  A  10.0.1.12
t2.example.com  A  10.0.1.13
Watch out
All 120 field notesChinese originalRunnable examples
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
Cite this page

Atlaslog (2026). Seven tile subdomains configured, still only six connections. https://www.jingweizhi.com/en/cookbook/tile-subdomain-concurrency.html (accessed 2026-11-03).