4 ms·
My total hits on / of when PDFy hit the frontpage (https://news.ycombinator.com/item?id=8034431 https://news.ycombinator.com/item?id=8034431), and remained ther
by joepie91_ 12y ago
My total hits on / of when PDFy hit the frontpage (https://news.ycombinator.com/item?id=8034431 https://news.ycombinator.com/item?id=8034431), and remained there for some 24 hours, iirc:
root@debian:/var/log/lighttpd/pdf.cryto.net# cat access.log | grep "GET / " | grep "news.ycombinator.com" | wc -l
19387
That said, the Hacker News post led to a bunch of other places writing about it a day or so later, the most notable of which was Gigazine:
root@debian:/var/log/lighttpd/pdf.cryto.net# cat access.log | grep "GET / " | grep "gigazine.net" | wc -l
544
But most of their traffic came from the document viewer they embedded in their article:
root@debian:/var/log/lighttpd/pdf.cryto.net# cat access.log | grep "GET /d/C8gHjDOxTLdunq1a/embed" | grep "gigazine.net" | wc -l
41609
And this is what the bandwidth usage looked like during those few days:
root@debian:/var/log/lighttpd/pdf.cryto.net# vnstat -d
eth0 / daily
day rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
[...]
07/13/14 767.19 MiB | 949.01 MiB | 1.68 GiB | 162.72 kbit/s
07/14/14 1.27 GiB | 9.13 GiB | 10.40 GiB | 1.01 Mbit/s
07/15/14 7.05 GiB | 106.73 GiB | 113.79 GiB | 11.05 Mbit/s
07/16/14 2.89 GiB | 48.73 GiB | 51.62 GiB | 5.01 Mbit/s
07/17/14 2.22 GiB | 24.21 GiB | 26.43 GiB | 2.57 Mbit/s
07/18/14 1.23 GiB | 11.90 GiB | 13.13 GiB | 1.27 Mbit/s
07/19/14 1.31 GiB | 11.88 GiB | 13.19 GiB | 1.28 Mbit/s
07/20/14 1.38 GiB | 7.73 GiB | 9.11 GiB | 884.50 kbit/s
07/21/14 1.44 GiB | 9.55 GiB | 10.99 GiB | 1.07 Mbit/s
[...]
If I recall correctly, my HTTPd was hit with some 50-100 reqs/sec total (for static + dynamic). It didn't really have any issues with it, despite running on a cheap VPS with 512MB of RAM, on a non-optimal stack (lighttpd + PHP + MySQL).
I've noticed a significant increase of recurring traffic since (it still hovers at about 5-15GB of traffic a day as opposed to the 2GB before, and there's a steady stream of uploads).
As long as you don't run something obscenely heavy like WordPress or Joomla, and you don't use Apache, you'll probably be fine.
- amjd 12y agoThanks for sharing the stats! Are you still operating PDFy on a 512MB RAM VPS? Did you have to do any optimizations to the web server config to handle the traffic?
- joepie91_ 12y agoYup, it's still running on the same VPS. I do plan on offloading PDF file serving eventually, to a 'CDN' of sorts that I'm working on, but that's more for storage space reasons (especially cost-wise). The only real 'optimization' was this classic one: server.max-fds = 2048 If you forget that, you're going to have a very bad time when you get hit by a serious traffic surge :) The full configuration is here: https://gist.github.com/joepie91/e5bd63710b5910d2287a https://gist.github.com/joepie91/e5bd63710b5910d2287a It's really just a mostly standard config, some things pieced together. PHP is configured in on-demand mode, though - iirc, the default PHP configuration that ships with lighttpd on Debian is not.
- frik 12y agoDo you mind to mention the VPS hosting company? (you mentioned it is cheap: https://news.ycombinator.com/item?id=8039666 https://news.ycombinator.com/item?id=8039666)
- joepie91_ 12y agoIt's RamNode (http://ramnode.com/ http://ramnode.com/) :) I got a DDoS-mitigated VPS in Seattle. I believe the plan I have is normally $15, but I used a coupon code so I pay $9.30 recurring. I can definitely recommend them - however, I should add that their DDoS mitigation appears to suffer from the same issues as all other cheap VPS DDoS mitigation proxies; speeds are not always reliable, and connections occasionally break halfway through. That's not a problem with RamNode though, but with the mitigation provider (CNServers in this case) and/or proxy setup - their own connectivity is rock solid. Some other hosts I can recommend in a similar vein are RAM Host (http://ramhost.us/ http://ramhost.us/) and VPS-Forge (http://vps-forge.com/ http://vps-forge.com/), in case you want to set up a redundant system of sorts. I've hosted with both for years, and they're both rock solid and very helpful as well. (Relatively) small operations like RamNode, but very reliable.