3 ms·
> As of 2018, the althttpd instance for sqlite.org answers about 500,000 HTTP requests per day (about 5 or 6 per second) delivering about 50GB of content per da
by 0xbadcafebee 5y ago
> As of 2018, the althttpd instance for sqlite.org answers about 500,000 HTTP requests per day (about 5 or 6 per second) delivering about 50GB of content per day (about 4.6 megabits/second) on a $40/month Linode. The load average on this machine normally stays around 0.1 or 0.2
Interesting. If the load avg is consistently low, it could mean they're over-paying for CPU. If this was a non-dedicated AWS instance you might want low load so you don't chew up CPU credits, but you'd also want to use an instance type that creates some load so you're utilizing what you're paying for. Linode VPCs don't use cpu credits so the calculation is a bit simpler. I'm also curious how much of that bandwidth couldn't be offset by a CDN or mirrors.
If you were using a serverless platform, you'd ideally want to use something like static site hosting feature where you're mostly just paying for storage and egress. Or a serverless application platform to auto-scale traffic as needed. The main problem with doing this, of course, is the cost of egress: cloud providers with fancy serverless platforms often have redonkulous egress costs, so using a plain old VM on a VPC provider can be cheaper if you have more bandwidth demands than compute.
(I am aware none of this is a concern if you'd rather just spend $40 and forget about it. I am a nerd.)
- GordonS 5y ago> I'm also curious how much of that bandwidth couldn't be offset by a CDN or mirrors As you say, at $40/m it's academic for a lot of people, but AFAIK, the whole site is static, so presumably if you put it behind Cloudflare’s free tier it would serve all but the file downloads from the edge. A pure guess, but I'd imagine that would mean serving 75% of requests from the edge.
- SQLite 5y agoLook again. The entire Althttpd website is 100% dynamic. Notice that the hyperlink at the very top of this HN article is to a Markdown file (althttpd.md). A CGI runs to convert this into HTML for your web-browser. The core SQLite website has a lot of static content, but there are dynamic elements, such as Search (https://www.sqlite.org/search?s=d&q=sqlite https://www.sqlite.org/search?s=d&q=sqlite) and the source code repository (https://www.sqlite.org/src/timeline?n=100&y=ci https://www.sqlite.org/src/timeline?n=100&y=ci). So far today, 23.48% of HTTP requests to the sqlite.org domain are for dynamic content, according to server logs.
- SQLite 5y agoLinode doesn't follow the cafeteria pricing style. You buy a package. $40/month is the minimum for us to get the disk space and I/O bandwidth we need. We could get by with less CPU, perhaps, but the extra memory and extra cores do reduce latency and they are nice to have on days when SQLite is a top story at HN. (Load avg has been running at about 0.95% all day today.)