4 ms·
While rewriting things in different language is fun (and fun is a great reason to do stuff), the speed of delivering what is ostensibly static content is a solv
by onion2k 13y ago
While rewriting things in different language is fun (and fun is a great reason to do stuff), the speed of delivering what is ostensibly static content is a solved problem. This was completely unnecessary. Bake the blog post into static HTML and tune up Nginx to shove it down the wires as fast as possible. Stick it on an CDN somewhere if it's important. Then move on to a problem that doesn't already have an optimal solution, and share the solution if you're nice. That's how everything should be done.
- sanderjd 13y agoCounterpoint: if you're learning a new language (or a new anything, really), it is much easier to reinvent than to invent. Just depends on what your goals are; whether you care more about the project you're working on or learning the thing you're learning.
- vidarh 13y agoEven if you don't bake it into static HTML, this is a solved problem. I serve my homepage/blog off a small Sinatra (Ruby) app, and while that's not slow, mostly because it caches every single page in memory permanently (my written content grows much slower in size than available memory on dirty cheap servers) just because it's simple to do and makes my testing easy (it does stat to check for modifications), there's pretty much no excuse not to have a CDN or a fast server like Nginx with caching turned on in front of app servers these days, which makes the backend performance pretty much irrelevant for cases where you don't have content that needs to be dynamically generated for a huge percentage of requests.
- patrickdavey 13y agoI don't suppose you've put that repo anywhere we can have a look at? :)
- psadauskas 13y agoIts his personal blog, what do you care what he writes it in? Maybe if it was 10 years ago and getting slashdotted was still a concern you could point out a better way, but if a free Heroku instance can keep up with HN traffic, then perhaps "doing it right" no longer matters. It seems the OP wanted to learn something and see if it could be done, so I'd say he achieved his goals. Getting all butthurt that he didn't achieve yours instead just seems silly.