4 ms·
$50 for 20k users a day? Good Luck. I don't think 512 MB VPS with any architecture could do that.
by lyime 18y ago
$50 for 20k users a day? Good Luck. I don't think 512 MB VPS with any architecture could do that.
- jonknee 18y agoWhy not? That's only a couple page views a second. Around $50/m can get you a gig of RAM. Use some for memcached, spend the rest running Nginx or Lighttpd.
- zepolen 18y agoMemcached is probably a little overkill for 5 req/s.
- jasonwatkinspdx 18y agoHN has very little user specific content in it's hot pages. Also, since it's mostly time based, there's a lot of locality. It should cache like mad. My guessing math puts it at 300MB for the hot data set (1000 100kb pages, 20k 10kb users). With 10 page views per unique, 90% hit rate on the page/user cache and 20% of page views being writes I'd guess average is less than 1 iop a second. Even at high peak to average ratios it's likely within what a single sata disk can do. I'd say it might be a little tight on a 512MB vps, but possible if you optimized carefully. On a reasonable dedicated machine it should run very well without any particular effort paid to optimization beyond basic caching.
- wooster 18y agoGiven the "more" links on the front page, I'm guessing HN is using continuations as state storage mechanisms, and that they're stored on a per-user basis. So, I'd expect the site's RAM requirements to be pretty hefty just on that basis, hence the 12GB of RAM.
- catch23 18y ago350k hits per day is only 4 req/s. Assuming there are typical peak hours, I'm guessing it could reach 300 req/s during peak hours. Nginx on a crappy 128MB server can deliver around 8000 req/s on a static page. Even if there was zero caching, I would hope you could manage 300 req/s. (and yes, I actually tested this on a crappy 128MB VPS. I also tested out using a rails, merb, and compojure generated pages and was able to reach 500-1000 req/s easily)
- wlievens 18y ago$50 a month will rent you a 2048 MB VPS.