Posted by tobi — 07:00 AM Jul 18
Typo is now the official rubyonrails.com weblog software! To cope with the high traffic this page receives ( its a page rank 7 page ) i just checked some code into trunk which adds proper page caches to typo’s frontend. This means that the web server can serve 99% of all the traffic directly without asking typo for the pages.
In praxis this means that a webserver like lighttpd can easily cope with 1-2k pages per second.

Seth 18 Jul 11:16
Woohoo!
Dave 18 Jul 11:36
That’s unreal. Damn, what a good fit Lighttpd is for Rails.
Matthew Margolis 18 Jul 14:09
Super cool news.
1-2k pages/second YIKES
Jeevan 18 Jul 16:01
Nice. Been looking for some good page caching in Typo.
Solomon Folks 18 Jul 16:08
You’re the bomb dude and you know it!
Dominik Wagner 18 Jul 16:16
super! finally! I made the changes for typo to be static in my version, but I thought you’d like the dynamic delicious links and “wirtten x days ago” too much for it to fit in. IMHO being static is one of the most important things for a blog. Congrats!
Dominik Wagner 18 Jul 16:16
super! finally! I made the changes for typo to be static in my version, but I thought you’d like the dynamic delicious links and “wirtten x days ago” too much for it to fit in. IMHO being static is one of the most important things for a blog. Congrats!
tobi 18 Jul 17:07
What’s even better is that the “posted XX ago” stuff will stay. Some contributors ported the calculation routine from ruby to javascript so it happens on the client side now.
I love best of both worlds solutions
tobi 18 Jul 17:15
sorry for the permission problems… Playing around with the server.
marvin 21 Jul 02:41
Can you explain more about the decision to port code for “[name] said about [period] later” to client-side?
I understand that this can give the flexibility of displaying post time both ways and maybe offloading some calculation time to client-side. Are there other advantages that I missed? I’m curious since RoR already provides nice functions to do all this.
scoop 21 Jul 02:54
Because cached pages are static content which would have “said X minutes later” burnt into them forever until something changes that sweeps the cache.
Mike Burnham 21 Jul 05:16
I dig the static content. Took me 15 minutes to realize my changes to articles.rhtml wouldn’t show up until I deleted it…but thats neither here nor there.
Florian Groß 21 Jul 05:32
But note that even with static pages you can still substitute individual parts dynamically.
I’m in fact doing this for the E-Commerce system I’m working on—there is product listings that are mostly the same for everyone, except that admins get some special links.
I just mark those up as <!ADMIN_LINKS> and use capture() and .gsub() to push them into the cached pages after the fact.
This still includes some per-request overhead so it will not perform as well as computing the stuff on the client, but it might still be a better option in some cases.
tobi 21 Jul 05:58
Florian: Typo uses static caching. The request never enters the rails application so there is no way to gsub it.
Your strategy would work well for action caches however…
test 08 Aug 14:11
test
d 18 Aug 04:08
d
null 19 Aug 15:39
test
null 19 Aug 15:39
fvsdffvsdvsdvf
null 19 Aug 15:40
dcsadfsfsdsdf
null 19 Aug 15:41
sdssdfsa
aaa 19 Aug 15:41
aaaaa
aaa 19 Aug 16:41
hh