TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to Serve over 100K Web Pages a Day on a Slower Home Internet Connection

311 pointsby sT370ma2about 5 years ago

34 comments

scalableUniconabout 5 years ago
Somewhat unrelated but, there are some WordPress themes that are trying to keep the bytes sent minimum. One such example is: <a href="https:&#x2F;&#x2F;sustywp.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sustywp.com&#x2F;</a> and there&#x27;s an excellent article by its author: <a href="https:&#x2F;&#x2F;blog.jacklenox.com&#x2F;2018&#x2F;06&#x2F;04&#x2F;delivering-wordpress-in-7kb&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.jacklenox.com&#x2F;2018&#x2F;06&#x2F;04&#x2F;delivering-wordpress-i...</a>
评论 #23114382 未加载
ryanmjacobsabout 5 years ago
I just recently started hosting my personal website in my closet on a laptop: <a href="https:&#x2F;&#x2F;notryan.com" rel="nofollow">https:&#x2F;&#x2F;notryan.com</a>.<p>I also host a Discourse forum. It&#x27;s pretty snappy for being in my closet (<a href="https:&#x2F;&#x2F;forum.webfpga.com" rel="nofollow">https:&#x2F;&#x2F;forum.webfpga.com</a>) Beats paying DigitalOcean $15&#x2F;month ($180&#x2F;year!) for a machine with 2vCPU + 2 GB RAM (the minimum for Discourse).<p>I think more people should consider self-hosting, especially if it&#x27;s not critical. It makes the Internet more diverse for sure.
评论 #23115142 未加载
评论 #23113009 未加载
评论 #23114208 未加载
评论 #23118738 未加载
评论 #23112989 未加载
评论 #23112747 未加载
评论 #23121961 未加载
评论 #23113984 未加载
Eccoabout 5 years ago
Item #9 (use a CDN) is pretty much the exact opposite of the title (serve from home connection)...
评论 #23114971 未加载
sylvain_kerkourabout 5 years ago
Hi OP, you seem to be the author of the blog (according to your post history). Your contact email seems not working so I will write it here: Just a big thank you for you blog! I take so much pleasure to read it at least once a week! THIS is the internet I like!
arcade79about 5 years ago
Reading through the webpage, I was thinking that points 1, 2 and 4 really wasn&#x27;t relevant. We&#x27;re talking about bandwidth limitations being the key factor here - not the rest.<p>1. Page Loading Issues are irrelevant, unless it&#x27;s because of large items served over limited bandwidth. 2. Static vs Dynamic webpages are irrelevant, if the pages themselves are small. Dynamic of course incurs some CPU on the server-side, but that is a machine not bandwidth issue. 3. Limiting the amount of data is obviously important. 4. Number of requests to the server is only relevant for the request-size, CPU and tcp-overhead (which can be alleviated via multiplexing). 5. Yes, do compress the pages. 6. Agree, website development kits often makes the pages much larger. 7. Certainly, but this shouldn&#x27;t be necessary if you have good cache-headers.<p>One thing that was not mentioned, was ensuring that static items are cachable by the browser. This has a huge impact.
评论 #23114659 未加载
评论 #23114235 未加载
评论 #23115382 未加载
willvarfarabout 5 years ago
This is a tangent, but I want to add to the less-is-more vibe!<p>I run some surprisingly-spiky-and-high-traffic blogs for independent journalists and authors, that kind of thing. Lots of media files.<p>There are two ways this typically goes: either you use some platform, and try and get a custom domain name to badge it with, or else you imagine some complicated content-management system with app servers, databases, elastic search clusters etc?<p>At the time wordpress etc weren&#x27;t attractive. I have no idea what that landscape is like now, or even what was so unattractive about wp then, but anyway...<p>So we&#x27;re doing it with an old python tornado webserver with one core, 256MB RAM VM at a small hosting provider. (I think we started with 128MB RAM, but that offering got discontinued years ago. It might now be 512MB, I&#x27;d have to check. Whateever it is, its the smallest VM we can buy.) The webserver is started-if-crashed using cron minute and flock -n.<p>The key part of the equation is that the hosting provider I use did away with monthly quotas. Instead, they just throttle bandwidth. So when the HN or some other crowd descends, the pages just take longer to load. There is never the risk of a nastygram asking for more money or threatening to turn off stuff or error messages saying some backend db is unavailable etc.<p>Total cost? Under $20&#x2F;month. I think domains cost more than hosting.<p>The last time I even checked up on this little vm? More than a year ago, I think. Perhaps two? Hmm, maybe I should search for the ssh details...<p>My personal blog is static and is on gh-pages. A fine enough choice for techies.
评论 #23112576 未加载
评论 #23112120 未加载
ramraj07about 5 years ago
How about just putting your static site in S3? What happens when traffic spikes (other than increase in bandwidth)?
评论 #23113421 未加载
评论 #23112881 未加载
meeritaabout 5 years ago
I use Digital Ocean $5 VMs and I never had any problem serving +100k a day on static pages.
评论 #23112537 未加载
me551ahabout 5 years ago
Alternative.<p>Get a cheap openvz box from lowendbox which will cost you between 3-15$ a year.<p><a href="https:&#x2F;&#x2F;lowendbox.com&#x2F;tag&#x2F;yearly&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lowendbox.com&#x2F;tag&#x2F;yearly&#x2F;</a>
评论 #23113159 未加载
pvillanoabout 5 years ago
Shameless plug for my 8kb website (if you don&#x27;t include the 30x larger pdf of my resume).<p>S3 hosting + Cloudflare SSL free tiers<p><a href="https:&#x2F;&#x2F;saej.in&#x2F;" rel="nofollow">https:&#x2F;&#x2F;saej.in&#x2F;</a>
rcarmoabout 5 years ago
My personal web site spent years on slow cable&#x2F;DSL, and I used Coral CDN at the time to deal with peak traffic. Today I have 1Gbps&#x2F;200Mbps fiber and keep it running off a tiny free VPS with Cloudflare, and sometimes wonder if I need the VPS at all.<p>(One of the reasons I moved it off my LAN was security - not providing an ingress point, etc.)
评论 #23113081 未加载
评论 #23113188 未加载
评论 #23113532 未加载
superkuhabout 5 years ago
&gt; your website may occasionally miss potential traffic during &quot;high-traffic&quot; periods.<p>The thing with personal home websites is that there&#x27;s really no actual problem if the site gets overloaded, or if it goes down for a day or a week or is only up intermittently at all.<p>These requirements of constant availability and massive scaling aren&#x27;t universal requirements. It&#x27;s okay if a wave of massive attention is more than your upstream can support. If people are interested they&#x27;ll come back. If they don&#x27;t it&#x27;s fine too.
cjdellabout 5 years ago
Another way would be to upload your site to your local IPFS node. Your files will be automatically cached by other IPFS nodes as people discover your site providing free load balancing and redundancy.<p>Your site will still be viewable even after you turn your local node off until all traffic goes to zero and the caches eventually expire.<p><a href="https:&#x2F;&#x2F;docs.ipfs.io&#x2F;guides&#x2F;examples&#x2F;websites&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.ipfs.io&#x2F;guides&#x2F;examples&#x2F;websites&#x2F;</a>
评论 #23114189 未加载
nickdothuttonabout 5 years ago
After making a rare popular post (32K hits in a few hours) I moved my static site (a gohugo.io effort) to AWS Lightsail. For less than a fistful of dollars per month it’s someone else’s problem. I keep page size down (it’s text heavy) and so far I haven’t needed any CDN.<p>If I’m having trouble viewing a page on someone’s hammered server I either look in Google’s cache or use links&#x2F;elinks to grab the text (usually what I’m interested in).
hakubeabout 5 years ago
Host your website on Netlify and Cloudflare so you don&#x27;t have to worry about bandwidth, power&#x2F;network interruption
评论 #23112711 未加载
评论 #23113447 未加载
评论 #23114318 未加载
PeterStuerabout 5 years ago
I do wonder how all this compares in overall costs and performance to just serving the static website from S3 or B2?<p><a href="https:&#x2F;&#x2F;www.grahn.io&#x2F;posts&#x2F;2020-02-08-s3-vs-b2-static-web-hosting&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.grahn.io&#x2F;posts&#x2F;2020-02-08-s3-vs-b2-static-web-ho...</a>
bullenabout 5 years ago
I dither all my images on the front page: <a href="http:&#x2F;&#x2F;sprout.rupy.se" rel="nofollow">http:&#x2F;&#x2F;sprout.rupy.se</a><p>The platform is open-source: <a href="https:&#x2F;&#x2F;github.com&#x2F;tinspin&#x2F;sprout" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tinspin&#x2F;sprout</a>
评论 #23113393 未加载
评论 #23113261 未加载
评论 #23113718 未加载
评论 #23126421 未加载
rakooabout 5 years ago
To go along the self-hosting crowd, the whole decentralized web with alternatives to HTTP is solving issues like uptime and low upstream bandwidth by distributing distribution itself, the way bittorrent does. Dat (via beaker browser) and zeronet come to mind.<p>Contrapoint: content must be static
joenathanoneabout 5 years ago
My ISP (Cox) doesn&#x27;t allow inbound traffic on port 80. Anyone know any tricks of getting around that? I&#x27;m currently using a reverse proxy on a friends server to tunnel through an alternative port, but I&#x27;m looking for a better solution.
评论 #23118150 未加载
xriskabout 5 years ago
doesn’t putting CF in front of your home web server mostly solve this problem? CF will cache static assets for you and take all the pain of a traffic surge away.<p>also prevents leaking your home IP address.
ronyfadelabout 5 years ago
Or just use Netlify for static websites. It’s free. One of my blog posts got 50k views in 24 hours and Netlify didn’t bat an eye.
评论 #23113030 未加载
评论 #23112589 未加载
sT370ma2about 5 years ago
I am enjoying reading everyone&#x27;s comments. There is a lot here for me to think about. Thank you!
fouricabout 5 years ago
&gt; The SSL handshake alone can take as long as a third of a second.<p>Is this true? If so, then it&#x27;s a good reason for me not to enable SSL&#x2F;TLS on my sites that don&#x27;t need it (e.g. read-only documents or blog posts).
评论 #23116877 未加载
评论 #23116947 未加载
评论 #23116912 未加载
评论 #23116937 未加载
ciprian_craciunabout 5 years ago
The article features some very good advice, regardless of how you actually host the site, that should be followed by many other sites around the web...<p>It basically boils down to the old KISS principle &quot;keep-it-stupid-simple&quot;.
评论 #23112544 未加载
fareeshabout 5 years ago
For the kind of site described here, there are plenty of CDNs which will just treat it as a rounding error in terms of their running costs, if at all it costs anything, and give it to you for free
agustifabout 5 years ago
lowtech magazine [1] is an amazing example at sustainablity serving a website, they use solar powered only infra and the website is only available theoretically, if there&#x27;s been enough sun to power the servers that day (In Barcelona, at least we&#x27;ve sun much of the year)<p>[1] <a href="https:&#x2F;&#x2F;www.lowtechmagazine.com" rel="nofollow">https:&#x2F;&#x2F;www.lowtechmagazine.com</a>
j0057about 5 years ago
I feel a lot of people are missing the point of self-hosting here. Do we really want to run everything under the sun in three big cloud providers?
TedDoesntTalkabout 5 years ago
This reads like a list from the 90s and first decade of the 21st century to optimize page load times. It’s nearly identical.
aloukissasabout 5 years ago
Or, you know, use netlify or vercel and get all of that out of the box without thinking about it :)
评论 #23114265 未加载
throwaway55554about 5 years ago
What are some good ways to isolate that server from the rest of your LAN?
评论 #23115239 未加载
delducaabout 5 years ago
I use cloudflare argo tunnel for this.
jonplackettabout 5 years ago
The pink background on this site really screwed with my eyes. It was like my brain was constantly trying to white balance correct it.
评论 #23117636 未加载
fortran77about 5 years ago
Use the CloudFlare free tier, too!
gjs278about 5 years ago
I ran garyshood.com off of a pentium 3 dell poweredge and a comcast connection in its peak (2009-2012). I couldn&#x27;t offer an upload speed of more than 20-40kb&#x2F;s without slowing down the house. but with traffic shaping rules and following most of what he&#x27;s outlined here, it was easy. it wasn&#x27;t even cpubound, it was just network bound, but I could still handle 100-300k unique visits a month. I did have to host the downloadable exe for the autoclicker on a third party for $3 a month, even at 120kb that thing would use too much house bandwidth.