[Seaside] Starting a site

Conrad Taylor conradwt at gmail.com
Fri Aug 24 01:03:21 UTC 2007


Hi Boris, this is a very good question.  I have used Ruby and Rails and
there's an application called mongrel_rails:
sudo mongrel_rails cluster::configure -e production -p 8000 -N 3 \
-c /var/www/apps/testapp

Note:  The above line configure 3 mongrel instances (i.e. web servers)
in production mode starting at port 8000.  Thus, ports 8000 - 8002
would have an instance of the rails webserver running on it.  This
would create a file called mongrel_cluster.yml.  This looks like the
following:

---

port: "8000"

environment: production

address: localhost

pid_file: log/mongrel.pid

servers: 3

Now, that I have generated the cluster file.  I can perform the
following actions:

sudo mongrel_rails cluster::start

sudo mongrel_rails cluster::stop

sudo mongrel_rails cluster::restart

Next, I would configure Apache's mod_proxy_balancer by inserting the
following lines in my

conf file:


<Proxy balancer://mongrel_cluster>
    BalancerMember http://127.0.0.1:8000
    BalancerMember http://127.0.0.1:8001
    BalancerMember http://127.0.0.1:8002
</Proxy>

Note:  I skipped a few steps but you can get the gist of what's going
on in the above.


Finally, it would be great if Swazoo or another application (i.e.
Swazoo-Cluster) allowed one to

configure the relevant pieces of a Swazoo webserver.  Then you can use
this Swazoo-Cluster

application to start, stop, and restart the Swazoo webservers for a
given application.


-Conrad


On 8/23/07, Boris Popov <boris at deepcovelabs.com> wrote:
>
> Janko,
>
> I do remember having this discussion as well, but in many situations you
> are deploying behind a web server of some sorts by proxying the
> Seaside/Swazoo combo, so IP configuration takes place there and does not
> belong in the application, at least as far as I'm concerned. So I want to
> bind to all addresses and let other people (or load balancers) decide which
> ones they will route traffic to (this becomes even more important in managed
> environments, which is where we are currently moving to).
>
> In a nutshell given the following two choices, which would you prefer if
> you wanted to listen on all interfaces?
>
> A) Query the host for its interfaces and bind to all of them individually
> B) Bind to 0.0.0.0
>
> Thanks!
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
> boris at deepcovelabs.com
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the message
> header. Unless otherwise indicated, it contains information that is
> private and confidential. If you have received it in error, please
> notify the sender and delete the entire message including any
> attachments.
>
> Thank you.
>
> > -----Original Message-----
> > From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-
> > bounces at lists.squeakfoundation.org] On Behalf Of Janko Mivšek
> > Sent: Thursday, August 23, 2007 2:49 PM
> > To: Seaside - general discussion
> > Subject: Re: [Seaside] Starting a site
> >
> > Boris,
> >
> > Boris Popov wrote:
> >
> > > Mostly because I just don't want to query the host to see which IPs
> > > are available when 0.0.0.0 is out there and waiting for me to use it
> :)
> > > Single site restriction is just fine for ~100% of Seaside users
> anyway.
> >
> > We already had a debate on that. I think that most users are just happy
> >   with default 'localhost' configuration when they start with Swazoo.
> >
> > Because immediately when you want to go public, you need to register
> > your hostname and ip anyway! Not to mention when you are going to host
> > on some server with many ip's, etc etc. What is missing of course is
> > better documentation how to do that in Swazoo.
> >
> > I think that your case is a special one and I don't understand why
> > should Swazoo be complicated to deal with just your special case?
> >
> > That doesn't mean that we won't introduce that feature in future Swazoo
> > of course.
> >
> > Best regards
> > Janko
> >
> >
> > --
> > Janko Mivšek
> > AIDA/Web
> > Smalltalk Web Application Server
> > http://www.aidaweb.si
> > _______________________________________________
> > Seaside mailing list
> > Seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070823/8275337a/attachment.htm


More information about the seaside mailing list