Posted by boris mann on February 28, 2008 at 7:28pm
Hi Ken --
I know you've deployed MySite on some large sites, and was wondering if you have any specific comments on the scalability aspects of MySite. Caching of data that gets pulled per user necessary? Fine out of the box because each user has a custom page (assume private)?
Feedback and techniques appreciated.

Comments
Hm
I actually don't have any large scale implementations. Others might.
I know killes is running it, and he has some large sites. Here are some architectural points:
Including all JS libraries and MySite include files
MySite has an internal cache that can be enabled. It provides per-user-page caching. The MySite cache applies to any user looking at the page, even the owner. This is stored in {cache}.
The overhead (if any) would be caused by all the node_load() calls necessary to generate a page with 500 nodes on it.
You can throttle this by restricting
a) The number of elements allowed on a user page (default is 10)
b) The number of items allowed per element (default is 5)
-So, worst case out of the box, /mysite/* loads some extra PHP and JS files and calls node_load 50 times.
User pages default to public, but that can be changed per installation with a setting.
My biggest concern, actually, is the mysite_cron() function. That function is designed to sweep through MySite accounts and look for content that no longer exists. If so, it deletes it from the user's colection and leaves a note. That could turn out to be a very intensive operation. Currently the mysite_cron() can only run once per day.
--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3
--
http://ken.therickards.com/
Thanks
OK, thanks for the tips. I think I can boil the best practices down to:
Cron is an icky icky thing. I need to revisit Earnest's multi-threaded cron patch...
Private
I don't think that making pages private is a big deal. How likely are you to look at my page? And with caching on, it makes no difference.
--
http://ken.therickards.com/
http://savannahnow.com/user/2
http://blufftontoday.com/user/3
--
http://ken.therickards.com/