Use case · Content delivery

Route every request to the right origin.

When you run multiple origins — US-East, EU-West, APAC — the client's country and ASN tell you which one to hit. IP-Atlas MMDB makes that lookup a memory read, not a network round trip.

Signals you'll use

FieldUse
countryContinental routing — US → us-east, CN → apac, etc.
asnShortcut for edge-network peerings — e.g. prefer GCP origin for Google ASN clients.
is_datacenterDon't treat a server-to-server call as a human session; route to API-origin, not CDN-origin.
latitude, longitudeNearest-origin selection when you have many PoPs.

Edge Worker routing pattern

// Cloudflare Worker — pick origin by country
const ORIGIN = {
  US: 'https://us-east.app.example.com',
  GB: 'https://eu-west.app.example.com',
  JP: 'https://apac.app.example.com',
  DEFAULT: 'https://us-east.app.example.com'
};

export default {
  async fetch(req, env) {
    const ip = req.headers.get('cf-connecting-ip');
    const r  = await env.IPATLAS.lookup(ip);  // KV-cached wrapper
    const target = ORIGIN[r.country] || ORIGIN.DEFAULT;
    return fetch(target + new URL(req.url).pathname, req);
  }
};

MMDB at your own Nginx

# nginx.conf — ngx_http_geoip2_module
load_module modules/ngx_http_geoip2_module.so;
geoip2 /etc/nginx/ipatlas-2026-04.mmdb {
  $geo_country country;
  $geo_asn     asn;
}
server {
  location / {
    proxy_pass https://origin-$geo_country.internal;
  }
}

Memory-mapped MMDB lookup is ~800 ns. On a box handling 50K RPS that's less than 0.1% CPU.

When NOT to geo-route