-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postpone GetLite2 downloading task #1528
Comments
I have thought about this many times. I will see how hard would be to do it and get it done if possible. |
So, after considering a couple of options, the way I have decided to approach this is the next. It would already be possible to disable the initial Geolite db download, without a big impact in Shlink's behavior (this was implemented in case the download fails, to prevent the container start-up to fail). By doing so, Shlink would skip locating the first visit, and trigger the downloading in background, so that next visits can be located. What I'm going to do is the next:
This has one side effect though. When locating visits right away, Shlink knows the full non-anonymized IP address, which makes the geolocation slightly more precise. With this approach, all visits that happen before the initial GeoLite download, will be located with their anonymized IP address. It shouldn't have a big impact, as the download is usually reasonably fast, and the deviation between regular IP and anonymized one is not always that big. It might have a relatively bigger impact if you have a huge amount of traffic, but this is the best approach I can come up with. |
Summary
I am deploing shlink with knative, and will auto scaling to zero pod if possible.
So It will be very slow when knative auto scaling up because it will create new pod and wait geolite2 downloading finished.
I am suggesting make downloading job async and geolocate the early data after that
The text was updated successfully, but these errors were encountered: