On May 21, 4:09 am, "Mike Orr" <[EMAIL PROTECTED]> wrote:
> On Tue, May 20, 2008 at 11:54 PM, Jonathan Vanasco
> Well, for a Pylons site with Postgres that wants to be scalable up
> front, a three-server setup makes sense.  One for the Pylons app, one
> for the static content, and one for the database.

I'd disagree.  You generally shouldn't need to do a dedicated box for
static content - just use a lightweight static server like nginx or
lighttpd.  You should be able to just do nginx + app on server 1 , and
database on server 2 -- the DB will almost always create a
'bottleneck' of sorts in web-development that needs to be addressed
first.  As your app needs to grow, the HTTP box becomes more of a load-
balancer/gateway, and you network webservers and db servers behind
it.  I've done that a dozen of times with ease.

> A second Pylons server means you have to write the app carefully; e.g., store 
>state
> data in cookies, cookie-based sessions, or the database, not on the
> local filesystem.
That's less careful programming and more smart planning and
forethought.

> A second database server is usually the hardest part; you'd need a
> database engine that propagates changes from any server to all the
> others
I always spec apps to be replication-ready: separate handles for read
& write, and maintaining strict documentation and code reviews as to
which handles are used where.  Usually a 'write' should only be used
in account management situations.  I even go so far as to make sure
all logging functionality is on a different handle (sometimes even to
a different DB).  Approaches like this at the start make clustering
and replication simple.

Most file-access isssues can be handled with an 'authticket' style
approach across servers.  If you're dealing with a specific per-file
per-access approach, then yeah - you're likely better to have your
pylons appserver handle that ( though you might be able speed things
up with some custom plugins or hooks in nginx/lighttpd)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to