Live data from Hacker News

I made a simple geolocation service

maxkostinevich.com

171–180 of 187 posts

Re: I made a simple geolocation service

#172

The cheapest alternative has to be to ask the users where they are and store it on the user device? I never understood the need for geoip unless you ship spyware. If the exact location is important geoip is not accurate enough anyway. Forwarding to regional sites automatically is just annoying when it doesn't work properly or someone is traveling abroad.

If it's just to route to regional sites, that's fine. Letting the user select just makes sense. However, there's a lot of use cases that semi-accurate geo-locations make sense. The first of which is analytics. If I'm a marketing person at a SaaS company, I want to know where my customers physically are if possible for a variety of useful reasons. Good quality estimates for location also help with security and complia…

I want to know where my customers physically are if possible for a variety of useful reasons.

I hope you're factoring in error rates. Because right now Google, with its billions of dollars to spend on geolocation, tells me that my laptop is in Albuquerque, and my phone is in Los Angeles. Neither are within 500 miles of either.

Re: I made a simple geolocation service

#173
post #153

Earlier quoted context omitted.

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.

But if I expect bursts, Lambda could potentially cost me a few thousand dollars in a day while my own instance could handle it fine for like $50. Even paying $50/mo over a few years would pay off in that case.

Exactly. developer time lot more expensive. most people want to look cool & do cool things so they drink these cool aids.

it sounds lot cooler to say that " i made geolocation service using serverless/lamba" than "i made geolocation service using boring monolithic technology". where the former takes 150 hours to get it right and painful to add/manage features. where the later is very easy to maintain and very predictable priced.

Re: I made a simple geolocation service

#174

Earlier quoted context omitted.

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

There's a cost curve lambda excels at. For services handling under 100 requests a second it's cheaper than a cheap EC2 instances.

choosing EC2 was probably mistake, may be linode would have been better choice here.

Re: I made a simple geolocation service

#175

Earlier quoted context omitted.

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

If that’s your opinion I’d like to hear your rebuttal to this [1]. It’s hard to argue against actual numbers for an actual production app running at actual scale. [1] https://www.troyhunt.com/serverless-to-the-max-doing-big-thi...

if you are spending 279 using complicated cloudflare worker/azure function setup, you could have gotten away with $100 month if you have choosen linode/droplets.

32 million requests can be easily served with $50/month heroku node.

Re: I made a simple geolocation service

#176

Earlier quoted context omitted.

If that’s your opinion I’d like to hear your rebuttal to this [1]. It’s hard to argue against actual numbers for an actual production app running at actual scale. [1] https://www.troyhunt.com/serverless-to-the-max-doing-big-thi...

if you are spending 279 using complicated cloudflare worker/azure function setup, you could have gotten away with $100 month if you have choosen linode/droplets. 32 million requests can be easily served with $50/month heroku node.

I think you massively mis-read the article. $279/mo is what he would have spent. What he actually spends is under $1/mo. Sure a $50/mo Heroku box would do the trick but why spend $49/mo MORE when serverless is cheaper?

What I want to hear is how you argue serverless is “snake oil” when evidence says it’s massively cheaper even at scale. Less than $1/mo to serve 141m requests. How is that snake oil when even you say an equivalent “serverfull” solution costs 50x more?

Re: I made a simple geolocation service

#177

Earlier quoted context omitted.

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.

the issue with you calculation is that you are trying to save $40 a month by spending 100-500 person hours and screwing your code base.

Re: I made a simple geolocation service

#178

Earlier quoted context omitted.

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

https://blip.runway7.net/v2.beta should work for you, let me know if it doesn't?

Hi!

I need to be able to send a lat/long/timestamp to get tinezone.

Re: I made a simple geolocation service

#179
post #63
post #14

I (like many others it seems!) have also built a geolocation service however mine is built on top of MaxMind's DBs that are mentioned in the post. Its on a few boxes running OpenResty and now handles 130m+ requests/day. Was really fun to build! https://github.com/jloh/geojs https://www.geojs.io/open/

It's forbidden by MaxMind ToS, these dudes changed the rules and forces you to abide to the new conditions when you download an update. It's very borderline from them (at least ethically)

As another reply states I publish that the source of data is indeed MaxMind. I agree ethically it doesn't quite sit right so thats why I don't charge for the service.

Re: I made a simple geolocation service

#180
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?

I built something similar for https://ipdata.co. The API will return a time object like this for any IP:

    "time_zone": {
        "name": "America/Chicago",
        "abbr": "CDT",
        "offset": "-0500",
        "is_dst": true,
        "current_time": "2020-07-25T06:10:16.945136-05:00"
    }
Post reply on HN