4 ms·
I wonder how a personal website can’t be made to handle HN traffic? Is there are some kind of excessive back end that cause stuff like this?
by Aperocky 7y ago
I wonder how a personal website can’t be made to handle HN traffic? Is there are some kind of excessive back end that cause stuff like this?
- macNchz 7y agoI think the most prototypical "hugged to death" personal website is a stock wordpress setup on shared hosting or a low spec vm, without any caching plugins, and perhaps with some popular plugins that happen to be database heavy. It's easy to click a few buttons, install some plugins and themes, and wind up running 100+ sql queries on every page load. The various caching plugins work very well, but it's not necessarily something everyone thinks of turning on in advance of getting a lot of traffic all at once. Can't say if that's what happened here, but it's super common when personal sites linked here go down.
- Aperocky 7y agoAh thanks. This make sense now. I had mine entirely frontend and even had a decent sized js game on it but never had any trouble posting. Likely because I never needed to deal with sql, (or low traffic)
- tomschlick 7y agoPeople don't take advantage of caching headers. Put cloudflare in front of your blog with 10 minute caching headers and that isnt going down for almost anything.
- tyingq 7y agoThey don't even need Cloudflare. Just a typical cache plugin would allow a WordPress/Django/Rails/whatever site to survive HN. Every page request being 90 database calls to satisfy "related posts", "wordclouds", "previous", "next", "related" and whatnot just doesn't scale :) Yey abstraction.
- istjohn 7y agoYou can read about his tech stack here[1]. Curiously, his "About" page loads fine. He is using a Django REST API with DynamoDB and the "whole site is hosted serverlessly on AWS Lambda." 1. lucassimpson.com/about/
- tyingq 7y agoInteresting. Probably missed a Cache-Control header opportunity in the Lambda function.
- a012 7y agoSomething is wrong with the stack where Dynamodb and Lambda are advertised for autoscaling automatically for your needs.
- ldoughty 7y agoDynamo DB can be expected to adjust capacity every 5 minutes when set up with an auto scaling configuration or on pay-per-request model. Lambda will scale up in seconds. Dynamo, however, can be set not to (if you wish to stay within free tier limits). Dynamo DB free tier allows 5 4KB/key reads/second, with a buffer for about 5 minutes worth of "tokens" at this rate. If poorly designed (e.g. using Dynamo like a relational database) you chew through this with app-side joins very quickly. Even if well designed, looking up related articles, or re-loading records on page transition will eat up DB time As someone else mentioned, caching is critical for this setup to survive this load, especially if you want to stay in free tier... And CloudFront costs pennies compared to Dynamo and Lambda... Though both can easily be cheaper than $5/month
- tambre 7y ago> And CloudFront costs pennies compared to Dynamo and Lambda... The website actually is fronted by CloudFront.
- siscia 7y ago5 €/month VPS and free cloudflare in front of it works for me.
- jonplackett 7y agoJust our Cloudflare in front. It’s free.
- StreamBright 7y agoOne simple and very cheap option: AWS S3, Cloudfront and a site generator, I use Jekyll.
- matwood 7y agoOr github pages...
- StreamBright 7y agoYes, that works too.
- pmlnr 7y agoWordPress without cache.
- orf 7y agoA static site, for static content.
- grecy 7y agoVarnish in front of wordpress in apache has handled being on the front page of reddit just fine.