Earlier quoted context omitted.
Your service correctly returned the following data about my IP: "client": { "conn_speed": "broadband", "conn_type": "wifi", "proxy_description": "vpn", "proxy_type": "hosting" Is this what Fastly is thinking about my IP?
Yeah, that's coming from these four Fastly VCL variables: conn_speed: https://developer.fastly.com/reference/vcl/variables/geoloca... conn_type: https://developer.fastly.com/reference/vcl/variables/geoloca... proxy_desc: https://developer.fastly.com/reference/vcl/variables/geoloca... proxy_type: https://developer.fastly.com/reference/vcl/variables/geoloca... conn_type is interesting to me, I'm not sure how you would…
I made a simple geolocation service
151–160 of 187 posts
Re: I made a simple geolocation service
#152I built a simple API using pure NGINX to get the IP address of a client, for times when I needed to ask a customer for his IP address; it was easier sending them a URL for a service I control, than explaining how they could get that information another way. Now I have been thinking about opening it up for more people because while there are a variety of these services out there, one more does not hurt — it already ex…
Use my GEOIP and longitude and adapt your CSS to show me your content in nightmode when it is night time in my Longitude. That would be cool.
Re: I made a simple geolocation service
#153Earlier 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.
Re: I made a simple geolocation service
#154Earlier quoted context omitted.
Sorry silly question, still learning. Can you talk about how your linode setup is? Do you report back the same fields?
It's just a normal linode running archlinux. There are very minimal tweaks to handle the new connection load. I should write a blog post about it. It has steadily gained more traffic over the years and hasn't need much care and feeding. The go code can be found here if you're interested, though it some of the ugliest code I've written. I made it when ifconfig.me was having load issues many years ago. https://github.c…
Re: I made a simple geolocation service
#155Earlier quoted context omitted.
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
#156Earlier quoted context omitted.
It's just a normal linode running archlinux. There are very minimal tweaks to handle the new connection load. I should write a blog post about it. It has steadily gained more traffic over the years and hasn't need much care and feeding. The go code can be found here if you're interested, though it some of the ugliest code I've written. I made it when ifconfig.me was having load issues many years ago. https://github.c…
I love the simplicity. I'm sure I could find similar source code for similar services that is way over engineered and doesn't perform nearly as well. Do you serve this with a reverse proxy in front, or just as is? I'm assuming as is since you have the TLS configured right in the code, but I figure I'd ask.
I do have the service behind CloudFlare, which is essentially a reverse proxy. The reason is for CloudFlare is non-obvious; it is deserves a blog post, and that is connection pooling.
If I have all the requests go back to the origin, the bottle neck is not the go code, but Linux opening and closing all those single use TCP sessions. CloudFlare creates around 100k persistent connections to the backend, but then just keeps them open. This makes Linux much happier.
The high connection count actually made the service unstable once: https://github.com/georgyo/ifconfig.io/issues/2
Re: I made a simple geolocation service
#157Earlier 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.
[1] https://www.troyhunt.com/serverless-to-the-max-doing-big-thi...
Re: I made a simple geolocation service
#158Re: I made a simple geolocation service
#159I 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…
Re: I made a simple geolocation service
#160Earlier quoted context omitted.
Have you considered not including the entire bootstrap.css on the front page since you only use about 1% of it :)
I almost never do frontend work. I'll gladly take a PR if you want to make that one page faster and prettier. Though I don't want to make the build require yarn or other js/css compiler framework for a single page.