Live data from Hacker News

I made a simple geolocation service

maxkostinevich.com

131–140 of 187 posts

Re: I made a simple geolocation service

#131
Though a little bit off-topic, before the service http://freegeoip.net/json/ ceased, I used it a lot in testing. I built one myself with the simplified source code from https://github.com/voyagin/freegeoip since I want to minimize the response time. BTW, the listed repo isn't mine.

Re: I made a simple geolocation service

#133
post #98

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.

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…

Have you considered not including the entire bootstrap.css on the front page since you only use about 1% of it :)

Re: I made a simple geolocation service

#134
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…

Have you considered not including the entire bootstrap.css on the front page since you only use about 1% of it :)

I would assume the majority (99.9%) of the requests is actually API calls without delivering CSS.

Re: I made a simple geolocation service

#135
post #114

Earlier quoted context omitted.

He could have used the CF cache API in the worker, which would drop the cost quite a lot.

How would it reduce the cost? They are only return data from inside the header of the request they received and doing (an unnecessary) lookup to turn the country code into a country name. What would you cache it cheaper? No matter what his worker needs the smallest time/memory slot there is. You cannot make it cheaper while still using workers.

[deleted]

Re: I made a simple geolocation service

#136

Full marks to Cloudflare for engineering a radically effective and simple alternative to AWS Lambda (+API Gateway): It is simply a fantastic Serverless offering for low-latency network-bound workloads. For paying customers, they even thrown in freemium access to their globally distributed KV store and a forever-free Zonal Cache to sweeten the already good enough deal. That said, good luck with their Support team in c…

> now need to plan to add mitigation in scenarios where Workers blacks-out our traffic (but Support can't be of immediate help because "free customer").

How is it that you prefer to engineer those workarounds instead of just paying $20/month? It surely can't be worth in engineering hours and ongoing maintenance of hacky workaround code?

Re: I made a simple geolocation service

#137

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 pu…

A big part of why you can't freely distribute Maxmind's Lite databases is them trying to apply CCPA requirements.

That law will affect open source solutions just as much.

Re: I made a simple geolocation service

#138

Though a little bit off-topic, before the service http://freegeoip.net/json/ ceased, I used it a lot in testing. I built one myself with the simplified source code from https://github.com/voyagin/freegeoip since I want to minimize the response time. BTW, the listed repo isn't mine.

I run a hosted version on https://freegeoip.whoisbot.io but it looks like MaxMind changed their database url so it stopped working

Re: I made a simple geolocation service

#139
post #98

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.

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…

Sorry silly question, still learning. Can you talk about how your linode setup is? Do you report back the same fields?

Re: I made a simple geolocation service

#140
post #89
post #22

Google App Engine had this quite a while ago (almost a decade, I think)and a very generous free tier. Also has approx lat-long, city, state and country. https://blip.runway7.net https://github.com/runway7/blip I lost track of the consumer apps I've used this on and still haven't received a $1+ bill.

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?

Try https://blip.runway7.net/v2.beta – I've added unix timezone based on the country and state code. The ISO databases have timezones associated with the level 2 code, which roughly corresponds to a state inside a country.
Post reply on HN