13 ms·
100k+ page views a month for $5 with a self-hosted static site
- barbellguy97 7y agoCan't you run this for free on Netlify?
- nickjj 7y agoI'm pretty close to reaching their free tier's cap on outgoing bandwidth. They only give you 100 GB. To buy another 100 GB I would have to pay $20 per month (4x as expensive). Also I don't feel comfortable basing my entire business on Netlify. My blog and course landing pages are how I earn a living. It's the same reason why I don't use GitHub pages. I just don't like the idea of having to adhere to their TOS (even if I'm not doing anything wrong) and also be limited to their free tier's traffic constraints. I'm sure they are a good company and I wish nothing but the best for them but I just don't see them as a good fit for me given the above.
- JoshMcguigan 7y agoHow do you view your Netlify usage while on the free tier? Your comment made me curious about my own usage, but I can't see a way to determine my current usage through the Netlify website.
- nickjj 7y ago> How do you view your Netlify usage while on the free tier? I am not sure. I never used their service. I got my usage numbers from DigitalOcean's dashboard. But I recently looked at Netlify to host another static site and they mention that 100 GB limit on their pricing page.
- williamjackson 7y agohttps://app.netlify.com/teams/<team-name>/settings/billing https://app.netlify.com/teams/<team-name>/settings/billing
- LeonM 7y ago> They only give you 100 GB. At 100k page view per month, you'll need to serve a 100MB page to reach that limit...
- nickjj 7y agoAccording to my DO stats I average ~60 GB per month in outgoing transfer. I guess it's because I have a lot of photo gallery images of travel trips and they get caught up in image search results. I'm not sure why it's so high to be honest. It is going to go up quite a lot too because now that I have a podcast, each episode is around ~50MB for the mp3. I might end up putting the mp3s on a CDN in the end. Probably DO Spaces.
- nathantotten 7y agoNetlify + Cloudflare has a very high free limit.
- blissofbeing 7y agoThese two don't play nice together. That is you can't use cloudflare as a CDN and netlify without netlify complaining to you about not being able to provision your ssl.
- deleted 7y ago[deleted]
- fimdomeio 7y agoThis might be impressive for that person's business but I don't think there's nothing that technically exciting about this. 100k/month is one page view every 25sec average.
- mistrial9 7y agotraffic, like customers in retail, comes in bunches..
- nickjj 7y ago> I don't think there's nothing that technically exciting about this. 100k/month is one page view every 25sec average. The numbers aren't meant to be brag or impress anyone. It's just an example showing real numbers based on my current site's traffic. I wrote it because over the past year at least 40 people have asked me how I host my site and what the process looks like to build it. Now when I get future emails, tweets or Youtube comments I have a place to link folks instead of having to wing a half-assed individual response. Also in a world where everyone thinks you need a multi-galaxy hyper inverted Kubernetes cluster with DeepMind-level AI to auto-scale to infinity I think it's a breath of fresh air to know you don't need to do that to host a lot of different types of content.
- DarthGhandi 7y ago> in a world where everyone thinks you need a multi-galaxy hyper inverted Kubernetes cluster with DeepMind-level AI to auto-scale to infinity In a world where you are promoting 100k views for $5 a month perhaps the people asking you for advice will be given a chance to consider the faster alternatives for exactly $0 Basic off the shelf webhosting with a half dozen middlemen taking their cut can handle that perfectly well :/ Sorry to be blunt, but it's entirely true.
- ttttodayjunior 7y agoWouldn't the web hosting cost? And which middlemen were you referring to?
- bArray 7y agoI keep telling people 'you probably don't need a massive server if you're just running static pages', again this seems confirmed (for some use cases). A few questions: 1. Do you have any protection against DDoS? I currently implement my own custom solution, people seem to be transitioning towards Cloudflare but I see such a move as dangerous. What's your mitigation and/or opinion? 2. You mention the ease of spinning up a new server - I personally just run a bash script for this. How do you automate the transference of your URL over to a new IP? 3. Have you ever experienced slow down and if so, how did this affect your site? 4. What are the most resource intensive aspects of your website? (I.e. What is using your bandwidth/CPU/RAM?)
- Kenji 7y agoYes I too am interested in how you mitigate DDoS without handing over your HTTPS keys to an intermediary man in the middle, be it Cloudflare or anyone else.
- partiallypro 7y agoWhy is moving to Cloudflare dangerous?
- thaumasiotes 7y agohttps://blog.cloudflare.com/why-we-terminated-daily-stormer/ https://blog.cloudflare.com/why-we-terminated-daily-stormer/ Moving to cloudflare gives cloudflare veto power over any attempt to access your site.
- CraftThatBlock 7y agoIt's pretty simple, don't say Cloudflare are nazis are you will be allowed on their platform. They have been very vocal about being neutral in almost every case.
- saagarjha 7y agoWhat if I say something less hateful but still negative about Cloudflare? What if I run a website like 8chan?
- fwxwi 7y agoIf it's just nginx serving files you can do this with a 386. I mean seriously what's so special about this? Maybe I'm missing something. Pretty sure nginx can serve thousands of static files with gzip+ssl per second using the crappiest ARM VPS available. Stick that in Online.net or OVH and you will pay no bandwidth fees. Of course if your baseline is a wordpress site where every page weighs 3 MB and takes 2 seconds to generate when there's no server load, then this might seem like black magic to you
- jonny383 7y agoYou do realise you're reading hackernews, right? Where the majority of this generation likely grew into the industries using AWS / Heroku / "your other managed server as a service tm"
- mcone 7y agoJust out of curiosity, why aren't you using a CDN like Cloudflare?
- reustle 7y agohttp://techrights.org/2019/02/17/the-cloudflare-trap/ http://techrights.org/2019/02/17/the-cloudflare-trap/ Some interesting reading on it
- Havoc 7y agoThat's pretty cool. I've been toying with loadtesting a WP site. Out of the box it can't handle much even with a beefy server. Currently looking at Wagtail as a hopeful happy medium between WP and static
- AndrewStephens 7y agoStatic sites served from the filesystem directly through any reasonable webserver are always going to be quick. 100k hits per month is nothing and a hackernews spike should not even be noticed unless you are serving up video or something large. My site sits on a $5 DO droplet and I have never even come close to hitting any kind of limit despite the occasional traffic spike. Dynamic content management systems are a convenience for the developer/maintainer of the site but push additional requirements onto the hosting CPU (and the client for javascript heavy sites). The cost of these requirements is often not clear but usually much larger than you might expect.
- paulddraper 7y agoYep. Wordpress will eat your server if you don't configure page caching. At $CORP, the web application went down when some heavy Wordpress traffic slowed down the shared DB :/
- treebornfrog 7y agoI'm no programmer but I've used varnish along with nginx, seems to work well.
- nkozyra 7y agonginx has a "good enough" caching system for most use cases.
- paulddraper 7y agoYou need some sort of cache, whether Wordpress-specific or Varnish or CDN or something.
- BiteCode_dev 7y agoYes, althought in the case of wordpress, it's also because it's really badly architectured: no internal cache, so many requests for just one page, comment are loaded even when you don't read them, etc. It's not optized at all.
- web007 7y agoThis site would be roughly $free to run through CloudFront on AWS, which would scale more-or-less infinitely at a sublinear cost. Their free tier covers 50GB of transfer and 2mm requests. If you need an extra 50GB as indicated elsewhere in the thread it would cost about $4.25 a month, less if it's not the full 50. I'm looking to move off of a cheap shared hosting provider and on to AWS for my ten-accidental-hits-a-month personal (static) sites, it doesn't make sense to even consider a webserver for a solved problem like this.
- richardw 7y agoI've moved a bunch of static sites to S3 (or Google equivalent) and CloudFlare. One article was hit by HN and (for fun) I spent the time massaging the CloudFlare rules to almost fully handle via cache and try get the response time as low as possible.
- nickjj 7y agoThe free tier for CloudFront only lasts for 12 months. After that you're on the regular plan.
- JCharante 7y ago*AWS
- ClumsyPilot 7y agoIt doesn't make much sense to compare it to a free service, where someone else does all the work for you.
- xwdv 7y agoWhy not just serve direct out of S3?
- tambre 7y agoS3 website hosting lacks official IPv6 support, HTTP/2, TLS 1.3.
- xwdv 7y agoWhat does that matter for a static blog site?
- tambre 7y agoOffers subpar speed and accessibility. Of course all the problems could be solved by simply using a CDN like Cloudflare.
- xwdv 7y agoWhy the hell wouldn’t you use a CDN? Throwing up files on S3 and then putting your site behind a CDN has to be way cheaper and more available than serving it out of some EC2 server running Nginx 24/7.
- hbcondo714 7y agoWe were looking to rewrite our WordPress site as a static site last year in the hopes of reducing dev and hosting costs. Our prelim research led us to Hugo but our discussion [1] with them, including a founder of Netlify, led us to sticking with WordPress since we have over 2M posts and can get 1,000+ new posts a day which would lead to a overly-complicated build process and delay publishing posts. [1] https://discourse.gohugo.io/t/transition-2m-posts-from-wordpress-to-hugo/12704 https://discourse.gohugo.io/t/transition-2m-posts-from-wordp...
- manigandham 7y agoStatic site hosting is usually just S3 + CDN so why wouldn't a CDN in front of Wordpress caching every page accomplish the same thing for you? No need to change the editorial process to an entirely new system.
- hbcondo714 7y agoYeah that is what we are doing now
- modeless 7y agoCloudflare + App Engine is working well for my mostly static site. The combination is completely free for any amount of traffic, and scales practically to infinity with literally zero effort.
- FpUser 7y agoStatic website with 100K page views/month can happily be served without breaking drop of sweat from a little NUC sitting in one's basement. Not sure what is so exciting about that particular number.
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- semi-extrinsic 7y agoI think views per second is a more intuitive metric. 100k views/month is 0.04 views/sec.
- PretzelFisch 7y agoIf your trying to spec hosting hardware this isn't helpful, since you have to plan for serving requests at peak time. The real question is what is the max views/sec the site receives in a given year.
- ClumsyPilot 7y agoA little NUC sitting in one's basement should not be underestimated. A modern NUC has 4 cores / 8 threads, an NVMe SSD and offers performance equivalent to a $300/month Azure/AWS VM. There are backup/availability/connection concerns, but in terms of performance bare metal on one's basement can't be beaten.
- FpUser 7y agoAs I have 1gbps symmetric connection I serve some API right from my basement. One API in particular has no problems serving hundreds of requests per second from the NUC with the exact parameters you just mentioned. As for backup I use 2 things: Internal scheduled backup to hard drives that will be physically disconnected most of the time. Standby redundant synchronized server deployed somewhere else for peanuts. It is not as performant as said NUC but will do while the emergency is fixed on main one.
- topicseed 7y agoI run a WP website with 500k monthly page views (~800 blog posts). How would you go on implementing a static site (Gatsby would be my choice) knowing that there are WooCommerce and Sensei (Courses) installed? WP-REST?
- qatanah 7y ago100000 / 30 / 24 / 60 / 60 = .03 views per sec. Nothing surprising here. But a great blog overall!
- LeonM 7y agoExactly my thoughts. Even a raspberry Pi can serve 100k page views in a matter of minutes (seconds?). But in a world of serverless-cloud-bigdata developers seem to have forgotten just how powerful modern computers are, and how much we have already been doing for decades with less powerful hardware. Just to give you an idea: in 1997 Rob Maldo grew Slashdot to 100k pageviews a day on a single server [0] [1]. [0] https://news.slashdot.org/story/17/10/03/2330258/slashdots-20th-anniversary-history-of-slashdot https://news.slashdot.org/story/17/10/03/2330258/slashdots-2... [1] https://en.wikipedia.org/wiki/Slashdot https://en.wikipedia.org/wiki/Slashdot
- dsiegel2275 7y agoI ran a small single page JavaScript app that at its peak had 10K visitors per day. I served all the static assets directly from a public S3 bucket fronted by Cloudflare (for caching, domain name resolution). For my use case it was the simplest (and cheapest) thing that could possibly work.
- vinaypai 7y agoI don't understand why this is on the front page of Hacker News. 100k monthly page views is 139 per hour. Even if you assume the peak rate is 10x the average, that's several seconds per page load. A standard install of WordPress running off s raspberry pi on your home cable connection could handle that quite easily.
- Scoundreller 7y agoIt really depends on your target market. If it’s a consumer service in a couple of times zones, you’ll get the bulk of your traffic in the evenings. E.g. my personal finance traffic would be mostly on weekday evenings. These were usually 9-5 working people, so not a ton of traffic overnight, holidays. Weekdays had more traffic than weekends. I switched to static some years ago because the VPS running Drupal kept crashing with 100k visitors per month.
- rchaud 7y agoSince the site in question is a personal blog site that isn't updated daily, the 100k page views likely aren't uniformly distributed across the entire month, but occur in a single spike at a certain time, e.g. when a link from it goes to the HN front page. In that scenario, the majority of hits will happen in the <24-hour period when the link is on Page 1. The rest of the month could see daily traffic in the hundreds, and it might still amount to 100k+ if added to the traffic obtained during the viral spike .
- wesammikhail 7y agoI think the most amazing thing that have enabled startups to grow is the existence of $5 VPS using hosts like Digital Ocean or any of the other ones out there. However, one of the things that seems to kills performance these days is the massive amount of code abstraction layers we put in place which unfortunately increases the overhead by a massive amount. In our case, I started and successfully exited a crypto trading service (tradedash.io which was sold to Bittrex.com) that made billions of dollars in transactions using nothing more than 2x $5 VPS. Our entire tech stack costed us less than $75 dollars per month. The backend API handled massive amounts of trading data as you can imagine using those two servers and they never even got close to being at full utility - even when tens of thousands of orders were placed and cancelled at the same exact second. We had thousands upon thousands of users hammering our servers with requests every second of every day and the dropplets did just fine. At the end of the day, it all comes down to building out your infrastructure properly. Clean your code base, use only what you need when you need it and make sure things are as fast and secure as possible. Dont over-complicate things for yourself and dont add abstraction layers just for the sake of it. That to me is the essence of good software and the main benefit of that is less overall headache as I dont have to go in and engineer a solution every time something breaks in some random library or abstraction layer. Scale will also be a fortunate side-effect of that as well.
- apta 7y agoThank you for posting this. Out of curiosity, what was/is your tech stack like?
- wesammikhail 7y agoPHP/MySQL and React/Redux. We also used Electron for the front-end desktop software. Electron certainly comes with a ton of baggage but upon evaluating all other options, we decided to go with it because it was the best fit for our team´s experience. Other than that, there were actually very few tech pieces involved. I am an extreme minimalist by nature so I kept things as simple as possible in order to minimize the surface and complexity of the code base. Overall, it took us 9 Months in total to build the application from a prototype phase to a full blown trading system. We did it so fast because we kept things simple and low in complexity.
- mikefallen 7y agoThought this was a great article don't know why so many negative comments
- tuananh 7y agowhen i see a statistic number in per month unit, it's probably not very impressive when using a smaller unit like per hour / per second. i've used a $20 DigitalOcean in the past that used to serve 5 millions pageviews per month. but that number is not very impressive at all. at peak, there were at most 2,500 people online (number via Google Analytics) and that's not a lot. I know I could have done better with other solutions but most of the editors are familiar with WordPress so I had to keep using it and optimize the heck out of it.
- apatheticonion 7y agoUsing S3 and CloudFront to serve static content and I doubt you'd break out of free tier. If you need dynamic content served from a CMS, put your CMS's public API behind cloudfront and bust it when the owner makes changes. For websites that don't get edited a lot, you can use lambda to store the website content as a JSON file which sits on S3 (somewhere like /content.json). If you have multiple editors, use Dynamo or Firebase as the content store (again, behind cloudfront). With every one of these options, the most expensive part would be the domain name.
- _salmon 7y agoYep, I'm using Hugo to generate a site hosted on S3/CloudFront. 8k hits this month and my bill so far is $0.04