Why run two web-servers on the same host?

0 views
Skip to first unread message

walterbyrd

unread,
Dec 2, 2008, 11:46:48 AM12/2/08
to Django users
All the python frameworks seem to do this: one web-server for
development, another for production. There may be a good reason for
this, but I don't see it.

If you are doing internet development, then you certainly have a
network. So why not develop on one box, and then move the files to
another?

For example, this is what I do with php: I mirror my web-site on my
development box. When the files on my development box work the way I
want, I just ftp those files to the web-site. I find this method much
more simple, fast, and robust, than trying to juggle two web-servers
on the same box.

Also, why is it that with Django I have to restart the web-server, or
touch all files, any time I make any change?

bruno desthuilliers

unread,
Dec 2, 2008, 12:25:34 PM12/2/08
to Django users
On 2 déc, 17:46, walterbyrd <walterb...@iname.com> wrote:
> All the python frameworks seem to do this: one web-server for
> development, another for production. There may be a good reason for
> this, but I don't see it.

Err... Not breaking whatever on the production server, perhaps ? FWIW,
this is nothing specific to Django nor Python - no one in his own mind
would work directly on a production server.

> For example, this is what I do with php: I mirror my web-site on my
> development box. When the files on my development box work the way I
> want, I just ftp those files to the web-site.

So you have your development server on your own box ? Fine. That's
what most of us do, FWIW. Having an intermediate 'pre-production'
server is still usefull, for integration tests (team work), and to
give the customer access to work-in-progress.

> I find this method much
> more simple, fast, and robust, than trying to juggle two web-servers
> on the same box.

??? two web servers on the same box ???

> Also, why is it that with Django I have to restart the web-server, or
> touch all files, any time I make any change?

Because django runs as a long-running process, and does not rebuild
the whole world on each and any request (which is what PHP do).

As a side note : Django also comes with a builtin dev server that
doesn't even require setting up apache or anything else, and that
knows how to auto-restart when necessary.

HTH

Daniel Roseman

unread,
Dec 2, 2008, 12:47:28 PM12/2/08
to Django users
Where do you think it says you have to run two webservers on the same
box for development and production? There's certainly no reason to do
this unless you want to. Really, your development machine should be
completely separate from your production machine.
--
DR.

Kenneth Gonsalves

unread,
Dec 2, 2008, 10:19:31 PM12/2/08
to django...@googlegroups.com
On Tuesday 02 Dec 2008 10:16:48 pm walterbyrd wrote:
> All the python frameworks seem to do this: one web-server for
> development, another for production. There may be a good reason for
> this, but I don't see it.

it is not compulsory to use it - I develop and deploy using apache and
mod_python. btw, even RoR has a development server - so the 'disease' is not
confined to python frameworks alone.

--
regards
KG
http://lawgon.livejournal.com

Kenneth Gonsalves

unread,
Dec 2, 2008, 10:30:26 PM12/2/08
to django...@googlegroups.com
On Wednesday 03 Dec 2008 8:49:31 am Kenneth Gonsalves wrote:
> > All the python frameworks seem to do this: one web-server for
> > development, another for production. There may be a good reason for
> > this, but I don't see it.
>
> it is not compulsory to use it - I develop and deploy using apache and
> mod_python. btw, even RoR has a development server - so the 'disease' is
> not confined to python frameworks alone.

oops, I misunderstood your question - I do not think anyone develops on a
production box. Most people develop using a working copy of a repository on
their own box and commit changes to the repository. Periodically a release is
made usually freezing the repository as a 'tag'. This is then tested using
live data on a pre-production box and then the production box is updated from
the repository. And this is done by all programmers in all languages AFAIK.
There are no doubt a species that updates a production box directly or
through ftp - but I would hesitate to call them programmers.

walterbyrd

unread,
Dec 4, 2008, 12:57:34 PM12/4/08
to Django users


On Dec 2, 10:25 am, bruno desthuilliers
<bruno.desthuilli...@gmail.com> wrote:

> Because django runs as a long-running process, and does not rebuild
> the whole world on each and any request (which is what PHP do).

Seems to me that would make Python run faster. I suppose that must
take more system resources. Which, I further suppose, is why so many
low-cost web-hosters don't do Python? I am using a VPS, so it's not a
problem for me.

Kenneth Gonsalves

unread,
Dec 4, 2008, 10:26:34 PM12/4/08
to django...@googlegroups.com
On Thursday 04 Dec 2008 11:27:34 pm walterbyrd wrote:
> > Because django runs as a long-running process, and does not rebuild
> > the whole world on each and any request (which is what PHP do).
>
> Seems to me that would make Python run faster. I suppose that must
> take more system resources. Which, I further suppose, is why so many
> low-cost web-hosters don't do Python?

low cost == shoddy service, it requires a wee bit of effort to host python
unlike php where it runs out of the box.

Reply all
Reply to author
Forward
0 new messages