Live data from Hacker News

Serverless maps at 1/700 the cost of Google Maps API

protomaps.com

101–110 of 118 posts

Re: Serverless maps at 1/700 the cost of Google Maps API

#101

Can any of you suggest a nice tutorial or something for rendering maps for self-hosting at much higher zoom levels? Many of these examples are for larger areas where zoom level 10 is sufficient, but I make hobby maps of mountain bike / hiking trails where the displayed area is only ~10km wide at the most with lots of fine detail. Thus, my maps tend to be shown at zoom levels 12-18, which is much higher than any of th…

I'm not sure of exactly what you need but a few years ago I toyed with my own OSM server. There was a tuto on a site named linuxbabe to install everything on Ubuntu.

FWIW I generated all the tiles up to zoom 18 for France (which is the best mapped country as far as OSM go), it represented about 300 GB of data.

You will need a big SSD, 16 GB ram for a big country, 32 GB for Europe, I think you can do the world with 64 GB but ofc more is always better. Count a few weeks to generate everything, probably less if you have a very good computer / server (mine was quite old, 2012ish I think).

Re: Serverless maps at 1/700 the cost of Google Maps API

#102
post #95

In these discussions I rarely see Apple Maps mentioned, but I just checked and MapKit JS includes 25,000 requests per day with a $99 yearly Apple Developer subscription. Considering the cost of the alternatives, even if you don’t care about iOS development, it might be worth it to get one just for MapKit.

This is double the number of requests for 50cents per month if they're doing their comparison properly.

Yeah, I was just mentioning it as an alternative since many companies already have Apple Developer accounts — for them this option would be free.

Re: Serverless maps at 1/700 the cost of Google Maps API

#104
post #100
post #99

Earlier quoted context omitted.

I've just coded my latest site using aws but I'm going to be teaching myself terraform in the coming week so I can rewrite the infrastructure as code so I can move providers easily if I ever have any problems in the future.

Terraform is not going to make you cloud-agnostic. If you switch cloud providers, you'll still use Terraform but you will have to rewrite much, if not all, of your TF code.

Yeah, it is disappointing that something like this isn't the standard but I can code it myself if I really want to:

https://awstip.com/how-to-make-terraform-truly-cloud-agnosti...

And even if I don't, I imagine rewriting a terraform workflow is probably easier than taking cloudformation code and then rewriting it into whatever the equivalent is in google or microsoft land. Atm I'm pretty happy with aws and don't see myself moving but I like to have the option if needed.

Re: Serverless maps at 1/700 the cost of Google Maps API

#105
post #45
post #34

Earlier quoted context omitted.

OSM needs no data plan, just the GPS signal and updated maps downloaded from either Organic Maps (the easy way); or OSMand, if you plan to do serious tasks on mapping your town for instace.

to be fair, doesn't google maps offer the same? Have downloaded offline maps of cities while traveling without a data plan

Dowlading maps it's far easier under Organic/OSMand. You choose the country and/or the region, and download them. That's it.

Re: Serverless maps at 1/700 the cost of Google Maps API

#106

The real meat of this story: > A web application with 50,000 map loads using the Google Maps API will cost $350 per month. > A similar amount of traffic running through a Protomaps CDN install on Cloudflare, with an average of 20 tiles per session, costs fifty cents in Cloudflare Workers request fees. $350 versus $0.50! Who's going to be the first to build a (maybe Google Maps-compatible?) API on top of this and sell…

TCO = Total Cost of Ownership.

The cost will likely be in developmetn and maintanance, not service fees.

Use whichever API is clean, simple, stable and you don't have to think about.

This might be a solution for larger operations that have some intrinsic relationships with maps.

Re: Serverless maps at 1/700 the cost of Google Maps API

#107

Earlier quoted context omitted.

There are lots of usecases for apps that don't need these advanced features, and just want a nice backdrop for their geo data. The current offerings of google, mapbox, bing, etc are prohibitively expensive when you just need a small subset of their features. The company I work for is a happy customer of maptiler.com which even offers routing and reverse geocoding. It might not be as great and up to date as google's,…

In this case you should just use Leaflet and OpenStreetMap for a grand total of $0 per month.

Just so you know, I make it a point to report to OSM maintainers any relatively sizeable app using their tile servers, just so they can be banned.

The default OSM tile server is not here to serve your startup.

Re: Serverless maps at 1/700 the cost of Google Maps API

#108
post #74
post #73

Earlier quoted context omitted.

> Tested in production at scale: On AWS, response times average 100 ms for cache hits, 200 ms for misses. Cloudflare is significantly slower, but is improving as Cloudflare's R2 offering matures. They are comparing the price using Cloudflare, which although cheap, has poor performance. I don't know anything about these services or their pricing. Maybe AWS costs about the same as Cloudflare, but it's cheeky to have in…

Author here. AWS is quite a bit more expensive than cloudflare, mostly because of egress charges from Cloudfront. Cloudflare R2 latency is tricky to predict and can be anywhere from a few hundred milliseconds to 1s+ in my experience. This is for cache misses, only, of course; cache hits are comparable to AWS. Cloudflare really has every incentive to improve their product so I expect this to be much more competitive i…

I haven’t really seen many R2 performance benchmarks, but 1s+ for retrieval is nuts. Is that time to first byte or total time? On what average object size?

Re: Serverless maps at 1/700 the cost of Google Maps API

#110

The real meat of this story: > A web application with 50,000 map loads using the Google Maps API will cost $350 per month. > A similar amount of traffic running through a Protomaps CDN install on Cloudflare, with an average of 20 tiles per session, costs fifty cents in Cloudflare Workers request fees. $350 versus $0.50! Who's going to be the first to build a (maybe Google Maps-compatible?) API on top of this and sell…

[deleted]
Post reply on HN