Redirect & DB Tuning
Bounding MaxMind GeoLite2-City.mmdb RSS Across Workers
Understand why loading the ~70 MB GeoLite2-City.mmdb expands worker RSS by ~140 MB per process and when to drop down to GeoLite2-Country.
City MMDB ~140 MB/Worker · Country MMDB ~10 MB · Shared mmap
The Hidden Multiplier in Multi-Worker Shorteners
On disk, GeoLite2-City.mmdb sits near 70 MB, but parsing its search tree or opening independent reader buffers across 8 RoadRunner or PM2 workers consumes ~140 MB per process—over 1.1 GB on a high-RPS node.
Using Cloudflare Country Headers or Country MMDB on 4 GB Nodes
If your dashboards only segment clicks by country, swap to GeoLite2-Country.mmdb (10 MB) or read CF-IPCountry behind Cloudflare DNS to reclaim over 1 GB of RAM for Redis.
Measured Thresholds & Shortener Stack Parameters
| GeoIP2 Configuration | RSS Overhead per Worker | 8-Worker Shlink Impact |
|---|---|---|
| GeoLite2-City.mmdb | ~140 MB RSS | +1.12 GB total worker RSS |
| GeoLite2-Country.mmdb | ~10 MB RSS | +80 MB total worker RSS |
| Disabled (Headers / CF-IPCountry) | 0 MB RSS | Zero MMDB memory overhead |