[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Virtual Hosting and the FHS



On Fri, Jul 13, 2001 at 01:25:50PM -0400, Jeff S Wheeler wrote:
> Do you find it difficult to manage your text file database when you
> have programs on different machines needing access to the data?  

nope, not at all.

most of the servers i build are fairly self-contained. i don't need to
query the configuration of server A from server B - and if i did, that's
what ssh is for.

i can see some benefits in storing vhost configuration in a postgres
database but, for me, the disadvantages of doing so greatly outweigh the
advantages. that may change in the future. or it may not.  YMMV.

> I use mysql extensively in our shop because it makes it easy to access
> from any of our servers, and it makes reporting easy.  I'd rather
> spend a few minutes crafting an SQL query than half an hour writing
> code to perform the same task over text files.

i'd rather spend 5 minutes crafting a perl or sed/sh/awk/grep script to
do what i need than mess about doing stuff manually with a database.

even a good SQL shell like postgres' psql is clumsy compared to bash and
text-file processing tools.

the format i chose for my config files (one line per vhost, colon
delimited fields) was chosen deliberately because it is trivial to parse
in perl and with standard shell tools.

admittedly, querying postgres from perl is trivial with DBD::Pg - but
editing that record with vi is not so trivial.

if i put some thought into it, i'm sure i could figure out a way to let
me easily edit records with vi (e.g. a wrapper script which fetched the
record, saved it to a text file, ran vi, and then parsed the edited
file to import it back into postgres). right now, it's not worth the
time that it would take me to write it or the time to test it before i
trusted it enough to deploy it on production servers.


> I would be interested in the motivations and arguments anyone on the
> list has to contradict my opinion.  I'm sure it looks like I'm trying
> to start a flame war, but I just cannot understand why anyone would
> wish to log to a database.  Perhaps someone can enlighten me.

no idea. i agree with you. web logs just aren't important enough to
warrant the overhead of a database.

storing a daily/weekly/monthly *summary* of a few hundred bytes to
enable easy charting of growth over time may be worthwhile...but that
can be done in the log-processing scripts.


> As far as file descriptor limits are concerned, my understanding of
> Apache 2.0's archeticture is that it will reduce the FD problem by
> using kernel threads to share file descriptors among threads.  I don't
> know how that fits

that's interesting. that may solve the problem for me if it happens soon
enough.

i'll have to do some research on apache 2.0 - i've been ignoring it
until it's the stable release.


> into the mod_perl / php / etc. picture, though, I really have not
> investigated Apache 2.0 extensively.  To be honest threading makes me
> afraid my good old tools won't work anymore, or they will work but
> I'll have to live without the benefit of the new thread model.

why should they break anything? threads are just fancy lightweight
processes.

unless your tools involve complicated hacks to the apache code itself,
i doubt it will make any difference. all (or at least most) of the
standard modules like mod_perl, php, etc will be ported to apache 2.0
within a few months.

> So perhaps Apache 2.0's threading benefits will only shine in areas of
> static content?  If that is the case, I'll be disappointed as products
> like Zeus and thttpd seem to be superior to Apache in that arena, and
> probably will continue to be.

i don't think anybody runs apache for performance reasons - as you point
out, there are several web servers that outperform it on any benchmark.

people run apache because it does the job, it's very reliable, and it's
the best general purpose web server around, with a huge range of modules
available for any conceivable task. it's also extremely flexible - if
you can think of it, you can probably hack apache to do it.

some other web servers may be better for particular tasks but apache's a
great workhorse.

craig

-- 
craig sanders <cas@taz.net.au>

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch



Reply to: