> I was wondering how well turbogears scales? Obviously interesting
> caching tricks can be done on the web face, and other strange voodoo
> can be done in the database, but is turbogears itself designed to
> scale?
TurboGears itself is definitely designed to scale exactly the same
way you scale most "LAMP" type systems. You scale it the same way
that you would scale Rails applications, incidentally. There is
certainly some additional work that could be done with caching, etc.,
but overall it is definitely designed to scale if you do it right.
The real question is: is your TurboGears application designed to
scale. I will get to this below.
> Can I host the controller, for instance, on multiple servers for
> better
> response time? If not, would it even be a good idea to implement that
> kind of functionality?
If you properly design your application to be as stateless as
possible, load balancing TurboGears is actually quite easy. Here is
the short list of how to make this happen:
1. Don't use sessions, use cookies. If you absolutely *have* to
use sessions, don't use in-memory sessions. Use database
sessions if you have to.
2. Don't store any state inside your controllers, or in memory.
If you do those things, then you can fire up as many processes as you
like, on as many servers as you like, and use lighttpd's built-in
load-balancing to point at your application processes. I have done
this myself with SCGI and lighttpd, and its crazy fast.
A lot of people tend to focus on caching and minimizing trips to the
database when it comes to scaling, but I think the above is much more
important at an architectural level. This is how you should
structure your application, and you can get to optimizing with
caching and minimizing database hits later. Both caching and
database optimization take considerably more time and effort than
throwing a few extra processes at the problem.
> If you had to design a truly big system, or a lot of little
> interconnected remote sites, and wanted TG to do it what are the
> options?
Too many options to speak of, but the WSGI future of TurboGears will
make this much easier than it is today (not that the situation is all
that bad today!).
Best of luck scaling! I don't suspect you will have too many
problems if you follow some of the simple rules mentioned in this
thread already.
--
Jonathan LaCour
http://cleverdevil.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---