You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Downloads at task start
From docker-entrypoint.sh and GeolocationDbUpdater, my understanding is that each container downloads the GeoLite2 database when it starts (unless skipped), then again when the last successful download is older than 30 days, and on retries after failures. Downloads seem to be tracked per container filesystem (currentFilesystemId() uses stat(FILE)['dev']).
Is that correct?
On Fargate, does every new task always count as a new instance, so it downloads at least once?
Are there any other situations where Shlink contacts MaxMind?
With SKIP_INITIAL_GEOLITE_DOWNLOAD=true
Does the download then happen only when a task handles its first visit (through the UrlVisited → UpdateGeoLiteDb background listener)?
Are the visits that task handled before the download finished located automatically afterwards (through GeoLiteDbCreated → LocateUnlocatedVisits)?
Is this the recommended setting to avoid hitting MaxMind's 30-per-day GeoLite limit if tasks crash-loop or scale often?
Per-visit lookups are local
Can you confirm that geolocating a visit never calls MaxMind? As far as I can see it only reads the local data/GeoLite2-City.mmdb through GeoIp2\Database\Reader, and the only network call is the database download in DbUpdater. Is that guaranteed by design?
Shared storage (EFS) for the database
Is it supported to mount /etc/shlink/data, or just the GeoLite file, on shared storage like AWS EFS when several Shlink instances run at the same time? My concerns:
DbUpdater::copyNewDbFile() overwrites the file in place while other instances may be reading it.
Download tracking is per container filesystem, so a shared file might not stop new tasks from downloading anyway.
The data folder also holds cache, locks, proxies and temp-geolite.
Or is it better for each instance to keep its own local copy?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Setup: Shlink 5.1.7 on AWS ECS Fargate, autoscaling 2–4 tasks, AWS RDS Postgres + AWS Valkey, GEOLITE_LICENSE_KEY set.
From docker-entrypoint.sh and GeolocationDbUpdater, my understanding is that each container downloads the GeoLite2 database when it starts (unless skipped), then again when the last successful download is older than 30 days, and on retries after failures. Downloads seem to be tracked per container filesystem (currentFilesystemId() uses stat(FILE)['dev']).
Is that correct?
On Fargate, does every new task always count as a new instance, so it downloads at least once?
Are there any other situations where Shlink contacts MaxMind?
Does the download then happen only when a task handles its first visit (through the UrlVisited → UpdateGeoLiteDb background listener)?
Are the visits that task handled before the download finished located automatically afterwards (through GeoLiteDbCreated → LocateUnlocatedVisits)?
Is this the recommended setting to avoid hitting MaxMind's 30-per-day GeoLite limit if tasks crash-loop or scale often?
Per-visit lookups are local
Can you confirm that geolocating a visit never calls MaxMind? As far as I can see it only reads the local data/GeoLite2-City.mmdb through GeoIp2\Database\Reader, and the only network call is the database download in DbUpdater. Is that guaranteed by design?
Shared storage (EFS) for the database
Is it supported to mount /etc/shlink/data, or just the GeoLite file, on shared storage like AWS EFS when several Shlink instances run at the same time? My concerns:
DbUpdater::copyNewDbFile() overwrites the file in place while other instances may be reading it.
Download tracking is per container filesystem, so a shared file might not stop new tasks from downloading anyway.
The data folder also holds cache, locks, proxies and temp-geolite.
Or is it better for each instance to keep its own local copy?
Thanks!
All reactions