logoalt Hacker News

OpenFreeMap survived 100k requests per second

596 pointsby hyperknotlast Saturday at 1:31 PM131 commentsview on HN

Comments

Starlevel004last Saturday at 5:39 PM

> I believe what is happening is that those images are being drawn by some script-kiddies. If I understand correctly, the website limited everyone to 1 pixel per 30 seconds, so I guess everyone was just scripting Puppeteer/Chromium to start a new browser, click a pixel, and close the browser, possibly with IP address rotation, but maybe that wasn't even needed.

I think you perhaps underestimate just how big of a thing this became basically overnight. I mentioned a drawing over my house to a few people and literally everyone instantly knew what I meant without even saying the website. People love /r/place style things every few years, and this having such a big canvas and being on a world map means that there is a lot of space for everyone to draw literally where they live.

show 4 replies
ivanjermakovlast Sunday at 8:36 AM

> Nice idea, interesting project, next time please contact me before.

I understand that my popular service might bring your less popular one to the halt, but please configure it on your end so I know _programmatically_ what its capabilities are.

I host no API without rate-limiting. Additionally, clearly listing usage limits might be a good idea.

show 2 replies
LoganDarklast Saturday at 2:49 PM

> I believe what is happening is that those images are being drawn by some script-kiddies.

Oh absolutely not. I've seen so many autistic people literally just nolifing and also collaborating on huge arts on wplace. It is absolutely not just script kiddies.

> 3 billion requests / 2 million users is an average of 1,500 req/user. A normal user might make 10-20 requests when loading a map, so these are extremely high, scripted use cases.

I don't know about that either. Users don't just load a map, they look all around the place to search for and see a bunch of the art others have made. I don't know how many requests is typical for "exploring a map for hours on end" but I imagine a lot of people are doing just that.

I wouldn't completely discount automation but these usage patterns seem by far not impossible. Especially since wplace didn't expect sudden popularity so they may not have optimized their traffic patterns as much as they could have.

show 2 replies
colinbartlettlast Saturday at 2:26 PM

Thank you for this breakdown and for this level of transparency. We have been thinking of moving from MapTiler to OpenFreeMap for StatusGator's outage maps.

show 1 reply
andailast Saturday at 5:29 PM

From the screenshot I wanted to say, couldn't this be done on a single VPS? Seemed over engineered to me. Then I realized the silly pixels are on top of a map of the entire earth. Dang!

I'm curious what the peak req/s is like. I think it might be just barely within the range supported by benchmark-friendly web servers.

Unless there's some kind of order of magnitude slowdowns due to the nature of the application.

Edit: Looks like about 64 pixels per km (4096 per km^2). At full color uncompressed that's about 8TB to cover the entire earth (thinking long-term!). 10TB box is €20/month from Hetzner. You'd definitely want some caching though ;)

Edit 2: wplace uses 1000x1000 px pngs for the drawing layer. The drawings load instantly, while the map itself is currently very laggy, and some chunks permanently missing.

show 1 reply
charcircuitlast Saturday at 2:52 PM

>Nice idea, interesting project, next time please contact me before.

It's impossible to predict that one's project may go viral.

>As a single user, you broke the service for everyone.

Or you did by not having a high enough fd limit. Blaming sites when using it too much when you advertise there is no limit is not cool. It's not like wplace themselves were maliciously hammering the API.

show 3 replies
ch33zerlast Saturday at 4:12 PM

Since the limit you ran into was number of open files could you just raise that limit? I get blocking the spammy traffic but theoretically could you have handled more if that limit was upped?

show 1 reply
Ericson2314last Sunday at 2:16 AM

Oh wow, TIL there is finally a simple way to actually view OpenStreetMap! Gosh, that's overdue. Glad it's done though!

show 3 replies
eggbrainlast Saturday at 2:55 PM

Limiting by referrer seems strange — if you know a normal user makes 10-20 requests (let’s assume per minute), can’t you just rate limit requests to 100 requests per minute per IP (5x the average load) and still block the majority of these cases?

Or, if it’s just a few bad actors, block based on JA4/JA3 fingerprint?

show 2 replies
rtaylorgarlocklast Saturday at 3:36 PM

Is it always/only 'laziness' (derogatory, i know) when caching isn't implemented by a site like wplace.live ? Why wouldn't they save openfreemap all the traffic when a caching server on their side presumably could serve tiles almost as fast or faster than openfreemap?

show 6 replies
cube00last Sunday at 2:26 PM

It's really surprising that no CDNs or cloud storage providers offer even the single PMTiles file in some sort of shared library customers can use.

I guess they'd all rather their customers each upload the 120GB file and then charge them all individually.

If they're crafty they'll have their storage configured so there's only one actual copy on the underlying infra so every other shadow copy is pure profit.

fnord77last Saturday at 2:47 PM

sounds like they survived 1,000 reqs/sec and the cloudflare CDN survived 99,000 reqs/sec

wiradikusumalast Sunday at 5:51 AM

"Wplace.live happened. Out of the blue, a new collaborative drawing website appeared, built from scratch using OpenFreeMap." -- as a founder, you know you're working on the wrong thing when there's a "fun project" getting daily traffic more than what you'd get in a lifetime :)

jspinerlast Saturday at 3:14 PM

The cache hit rate is amazing. Is there something you implemented specifically for this?

show 1 reply
hoppplast Saturday at 5:53 PM

Cool... You did well to ban them.

Its a ddos attack, lucky you dont have to pay for the brandwidth, then its a denial of wallet

perching_aixlast Saturday at 5:13 PM

Haven't worked with Cloudflare yet first hand, and I'm not familiar with web map tech. But if the site really is pretty much just serving lots of static files, why is Hetzner in the loop? Wouldn't fully migrating to Cloudflare Pages be possible?

show 1 reply
biker142541last Saturday at 11:58 PM

Curious how this would have compared to a static pmtiles file being read directly by maplibre. I’ve had good luck with virtually equal latency to served tiles when consuming pmtiles via range requests on Bunnycdn.

show 2 replies
parhamnlast Sunday at 5:50 AM

Since cloudflare is already sponsoring it, I do wonder how much of this type of service can be implemented all on cloudflare. Their stack could be great for tile serving.

show 2 replies
v5v3last Saturday at 2:43 PM

The article mentions Cloudflare, so how much of this was cached by them?

show 2 replies
arend321last Sunday at 11:56 AM

I'm using OpenFreeMap commercially, fantastic and stable service.

show 2 replies
bravesoul2last Sunday at 4:44 AM

429 is your friend... but well done for handling the load!

CommanderDatalast Sunday at 10:18 AM

I love sites like wplace can still go viral and blow up, in a age of an increasingly centralised web. Woot

feverzsjlast Saturday at 2:54 PM

So, OFM was hit by another Million Dollar Homepage for kids.

proshnolast Saturday at 8:47 PM

[dead]

willsmith72last Saturday at 4:08 PM

so 96% availability = "survived" now?

but interesting write-up. If I were a consumer of OpenFreeMap, I would be concerned that such an availability drop was only detected by user reports

show 2 replies