Live data from Hacker News

I made a simple geolocation service

maxkostinevich.com

121–130 of 187 posts

Re: I made a simple geolocation service

#121
post #48
post #34

Also please see https://github.com/analogic/ipgeo daily actualized ip/country database with open license (shameless ad)

That would be a lot more appealing if it explained where the data is sourced from, included the update scripts, and how it is licensed - the only issue asking that question was closed without a word.

It likely uses the data published by RiRs. I wrote something similar that discusses where it sources the data and how to generate it. https://github.com/geoacumen/geoacumen-country

I've been meaning to make automatic Github releases for it.

Re: I made a simple geolocation service

#122

I applaud your efforts but it's disingenuous to title this how you "made a geolocation service" when you are just reading a field in someone else's geolocation service.

plus clickbaity title in disguise. writing 2req/sec would show that it's slower than my fridge.

Re: I made a simple geolocation service

#123
I've been trying to build open source MaxMind alternatives for a bit. (Mostly so I could distribute them with my open source projects)

IP to country is fairly easy and I open sourced all the scripts and the database itself [0].

But IP to city is much harder, I'm not actually sure it's viable for anyone to do that without relying on some other 3rd party service.

I'd be very interested to hear if anyone knows how to pull that off in an open sourceable manner.

[0] https://github.com/geoacumen/geoacumen-country

Re: I made a simple geolocation service

#124
post #89

Earlier quoted context omitted.

Is there a good lat/lon to timezone database that lets you leverage this into a presumptive timezone offset from UTC and thus local time?

Can’t you just ask the client which timezone it’s in? Every browser knows, and it will be a more accurate answer: the user might be on a foreign VPN or temporarily in another TZ, but not working on that timezone.

My application is not browser-based.

I’d like to set a system clock timezone via geoip only, without location lookup via wifi. On my more secure systems I have location services disabled and it’d be nice to have an accurate local time automatically.

Re: I made a simple geolocation service

#125

Earlier quoted context omitted.

Even if all requests were clustered into one hour per day, it’s only 54 requests per second. Pretty sure a Pi would be up to the job.

Yes, HN hit my blog on a 3b+ and that was no issue.

Which blog out of curiosity and 3b requests in which period of time? Is your blog static? Thanks!

Re: I made a simple geolocation service

#126
post #98

Earlier quoted context omitted.

Indeed. Using another service and being a wrapper around it is not all that impressive. He is also using workers which makes his solution expensive. I run ifconfig.io which now gets just over a billion hits a day. It is basically an echo service, and it just parrots back what cloudflare tells it. But since I run it on linode, it costs me a whopping $40 dollars a month for 35 billion returns a month. Using workers wou…

Thanks for sharing. This is a perfect example which proves lambda/serverless/cf worker are snake oils.

I think there's situations where Lambdas make sense in spite of their pricing. I applied for a job on the Warren campaign and their tech stack relied on AWS lambdas. I think that makes sense for them. It's a short-lived endeavor that isn't going to be around next year. Spending a bit more to not have to deal with the headache of maintaining your own infra makes sense in scenarios like that.

Re: I made a simple geolocation service

#127
post #124

Earlier quoted context omitted.

Can’t you just ask the client which timezone it’s in? Every browser knows, and it will be a more accurate answer: the user might be on a foreign VPN or temporarily in another TZ, but not working on that timezone.

My application is not browser-based. I’d like to set a system clock timezone via geoip only, without location lookup via wifi. On my more secure systems I have location services disabled and it’d be nice to have an accurate local time automatically.

I have a need for this too, and considering making a basic service for it.

Re: I made a simple geolocation service

#129

Earlier quoted context omitted.

Thanks for sharing. This is a perfect example which proves lambda/serverless/cf worker are snake oils.

I think there's situations where Lambdas make sense in spite of their pricing. I applied for a job on the Warren campaign and their tech stack relied on AWS lambdas. I think that makes sense for them. It's a short-lived endeavor that isn't going to be around next year. Spending a bit more to not have to deal with the headache of maintaining your own infra makes sense in scenarios like that.

You assume that they made a correct and rational decision but you have no evidence to back it up. Retract your claim that there are situations where Lambdas make sense until you can provide concrete examples. Thanks.

Re: I made a simple geolocation service

#130
post #98

Earlier quoted context omitted.

Indeed. Using another service and being a wrapper around it is not all that impressive. He is also using workers which makes his solution expensive. I run ifconfig.io which now gets just over a billion hits a day. It is basically an echo service, and it just parrots back what cloudflare tells it. But since I run it on linode, it costs me a whopping $40 dollars a month for 35 billion returns a month. Using workers wou…

Thanks for sharing. This is a perfect example which proves lambda/serverless/cf worker are snake oils.

It's not.

If under 10 million requests per month, serverless will be cheaper and safer

Else if under 1 billion request per month, managed VPS will be cheaper

If over hundred of billions of requests per month, anything else than on premise is probably an error.

Then you have grey areas where you need to process.

But for most small project, you cannot beat the lambda prices. Especially if you expect bursts.

Post reply on HN