4 ms·
> tens of thousands of requests, a raspberry pi can pretty much serve 100k req. / second. An average dev laptop should be able to handle 1M req. / second witho
by jcelerier 4y ago
> tens of thousands of requests,
a raspberry pi can pretty much serve 100k req. / second. An average dev laptop should be able to handle 1M req. / second without much issues
- Cpoll 4y ago> a raspberry pi can pretty much serve 100k req. / second I appreciate the sentiment, but my intuition says that number is too high. What would that look like? I can't picture nginx or haproxy serving up a static 'hello world' response at that volume on a Pi3. And if you do anything with a slow-ish 3rd party API you're probably going to hit the TCP socket limit before you can respond to 100k/s. Legitimately curious about whether my intuition is wrong. I don't have an unused Pi handy to test it myself. Edit: It's possible you're citing https://levelup.gitconnected.com/serving-100k-requests-second-from-a-fanless-raspberry-pi-4-over-ethernet-fdd2c2e05a1e https://levelup.gitconnected.com/serving-100k-requests-secon... ? Pretty interesting article in any case, especially this claim: > This test pitted a native C++ server against a scripted Node.js one, so of course the outcome was given. Well, not really. If I run the same test using µWebSockets.js for Node.js, the numbers are a stable 75k req/sec (for cleartext). That’s still 8.5x that of Node.js with Fastify and just shy of 75% of µWebSockets itself. Edit 2: Doing a bit more research and finding some other benchmarks online, it seems like 100k with µWebSockets is plausible. I recant my skepticism.
- Sebb767 4y ago> a raspberry pi can pretty much serve 100k req. / second. An average dev laptop should be able to handle 1M req. / second without much issues Depends on what you do. It's quite easy to hit these numbers with a low number of static pages, but apps that can easily work with static pages usually don't have DevOps people. That's why I went with thousands, to have a reasonable number for an app that actually does some complex processing.
- blizdiddy 4y agoThat doesnt seem right. https://www.diva-portal.org/smash/get/diva2:1439759/FULLTEXT01.pdf https://www.diva-portal.org/smash/get/diva2:1439759/FULLTEXT... According to this paper, looks like 1000s of requests is more realistic, both for pi and laptop.
- bottled_poe 4y agoStill enough for 99% of websites.
- arinlen 4y ago> Still enough for 99% of websites. I'm not sure you have much experience working on websites. Multiple deployments are required for performance reasons, which is the main driving force for paying hefty bills for CDNs, and their recent investment in edge computing. You deploy to multiple deployments in multiple regions in a good part to drive down those 300ms requests to sub 50ms. Otherwise your user gets fed up and drops you in favor of a competitor. But if you work on a service who has only a dozen users in the same region and can wait in turns to see who can make a request, go right ahead with your production raspberry pi setup.
- MediocreSysEgnr 4y agohttps://en.m.wikipedia.org/wiki/Name_calling https://en.m.wikipedia.org/wiki/Name_calling I ultimately agree with you, but in between a raspberry pi and “hefty bills CDNs” is something like a half rack at a Colo, a f5, and a couple PowerEdges.
- hibbelig 4y agoThose 99% of websites don’t have the performance problem you’re talking about. You’re talking about the 1%. I bought artisanal knitted socks for Christmas. If their website is faster than their knitting that’s good enough. That website is part of the 99%.
- jcelerier 4y ago> You deploy to multiple deployments in multiple regions in a good part to drive down those 300ms requests to sub 50ms one raspberry pi per continent :p e.g. I'm in a small rural village in southern france right now and I get 2GB down / 1GB up more or less with a 9ms speedtest ping (which is slow, it's often 2ms) - anyone from europe would get < 50ms ping notwithstanding the latency between them and their isp by the time my website has, say, > 500k req/second I can definitely invest in, idk, some used 2015 i7 laptop to give myself a x10. For reference, 1M requests per second is Instagram in 2015, one of the most used websites in the world - by the time you're at that scale you've been bought by Facebook anyways.
- tbrownaw 4y ago> a raspberry pi can pretty much serve 100k req. / second. An average dev laptop should be able to handle 1M req. / second without much issues How big are these requests? If you're returning more than 1kB including all the headers, you're not beating 100kreq/s on a standard consumer-level 1Gbit link.
- gpderetta 4y agoThe argument is about the power of a single machine. If your enterprise is somehow limited by 1Gb links, no amount of scaling is going to address that.
- seedless-sensat 4y agoI think the parent's argument is that a Raspberry Pi is limited to 1Gb link, so how can do 100k reqs/sec
- tbrownaw 4y agoThat, plus if I open dev tools and look at requests for even this site, the only things that small are three of the images (the orange Y in the corner, the vote arrow, and a 1x1 somewhere). It wouldn't be possible to get that request rate outside of a microbenchmark, just because of the network speed the pi supports.
- gpderetta 4y agoyou can buy faster network cards for a RPi but this is missing the point: 100k req/sec is not a huge volume and a decent server should be able to handle it without issues.
- jcelerier 4y agoit's not, people have been able to put >1G network cards on a Pi: - 2.5G: https://www.jeffgeerling.com/blog/2020/testing-25-gbps-ethernet-on-raspberry-pi-cm4 https://www.jeffgeerling.com/blog/2020/testing-25-gbps-ether... - 10G (in practice 3.6G max which is more than what most can expect from their ISP): https://www.hackster.io/news/10-gbps-ethernet-on-a-raspberry-pi-a3596d276f16 https://www.hackster.io/news/10-gbps-ethernet-on-a-raspberry...