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
{{ message }}
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.
As discussed in ops, we can go for the maxmind geoip redistributing license, pay them a bit of money and then distribute the geolite city database with the plugin server to offer effortless and "good enough" quality GeoIP information.
Store the latest .mmdb (or compressed) geolite2 database
Deploy this to a custom subdomain on netlify or S3 or wherever, so we can access the database via HTTP on something like https://geoip.posthog.com/ip/latest.mmdb
Have a scheduled github action to update the database each month from maxmind
Also store the md5sum of the database in latest.md5sum or whatever, as we need to periodically update the database from the app and this helps quickly check if we're on the latest or not.
Expose a geoip global function object to plugin users
There needs to be a way to download the initial database and update it periodically. The plugin should be disabled until the database is downloaded... or it could await for it in geoip.get().
The database, once downloaded, needs to be stored in postgresql somewhere. That's the only persistent storage system we have. File system won't work. Reusing the plugin attachments table seems like an option?
The initial download could happen in the new geoip plugin's setupPlugin... and have a runEveryDay that checks if there are updates (basically just runs geoip.update()). Still we shouldn't have all teams or all threads updating it at the same time...
The main point is to have this geoip database reader running per-instance of the plugin server (or per worker thread), but not per enabled plugin in a team.
We should also not download the database for users who don't want geoip support.
I imagine "enable geoip" will be something added to the ingestion/preflight routine eventually, next to e.g. "enable session recording".
What did I miss?
The text was updated successfully, but these errors were encountered:
As discussed in ops, we can go for the maxmind geoip redistributing license, pay them a bit of money and then distribute the geolite city database with the plugin server to offer effortless and "good enough" quality GeoIP information.
Things we need to make this work:
.mmdb
(or compressed) geolite2 databasehttps://geoip.posthog.com/ip/latest.mmdb
latest.md5sum
or whatever, as we need to periodically update the database from the app and this helps quickly check if we're on the latest or not.geoip
global function object to plugin usersnew Reader().get()
line insidegeoip.get()
, just with a preconfigured database.await
for it ingeoip.get()
.setupPlugin
... and have arunEveryDay
that checks if there are updates (basically just runsgeoip.update()
). Still we shouldn't have all teams or all threads updating it at the same time...What did I miss?
The text was updated successfully, but these errors were encountered: