[CLUE-Tech] apache and samba

Keith Christian keithchristian at yahoo.com
Thu Oct 23 14:15:24 MDT 2003


Geek:  Use a scripting language (PHP, Perl) with database access such as PHP,
and uploading the document into a MySQL, PostgreSQL, or other database, and
serving all requests from there?

Geekier: If that's too involved, then I agree with the other guys suggesting a
CRON job, or a shell script that is triggered automatically at the conclusion
of any new upload, such that this new upload is copied to all the
servers...since NFS appears out of the question for the Win32 server.

Geekier still: If you can tolerate a small amount of document unavailability,
write a script that parses the Apache logs for 404 errors, query the other
servers for the presence of this missing document, and if it exists on any of
the other servers, rsync or copy it.

(I hunt rabbits with cannons in my spare time.)  ;-)

=====Keith


--- Mike Staver <staver at fimble.com> wrote:
> Yeah, the problem with a cron job is this stuff has to be instant. 
> People upload a document, it has to immediately be accessible to 
> everyone on all 3 machines.  So, NFS might work - except for the fact 
> that the 4th box is my companies file server, which is a windows 2k box. 
>    I have not tried Samba 3.0 yet, so maybe that is more compatible?
> 
> Chris Tubutis wrote:
> 
> > I've used the same concept in the past - a single source used by
> > multiple boxes & httpd daemons. Having those three httpd boxes out of
> > sync doesn't give one warm, fuzzy feelings. :) I've done a few things in
> > the past, none of 'em involved Samba (much). You might have your CF
> > stuff upload stuff to a 4th box, just like you're doing now. But instead
> > of having the Web servers access that via Samba, how about if they
> > access it via NFS automount? Another possibility... upload to the 4th
> > box, then have a periodic cron job that uses rdist or rsync or some such
> > to update the httpd boxes.
> > 
> > ct
> > 
> > On 23 Oct, Mike Staver wrote:
> > 
> >>I have 3 webservers set up that I have some code on that allows me to 
> >>upload documents through cold fusion for various reasons.  These 3 
> >>webservers are all mirrors of each other, and round robin dns is what 
> >>spits users to the different servers.  So, when a document is uploaded, 
> >>it only gets uploaded to one of the webservers... and the mirror is no 
> >>longer a mirror :)  So, my solution to this was to add a fourth
> >>machine and mount a share on it via samba and have all the webservers
> >>use that for the file repository.  I'm not sure this is the best way
> >>to do this - using samba and all.  Sometimes on the webservers when I
> >>run dmesg, I see stuff like this:
> >>
> >>smb_trans2_request: result=-104, setting invalid
> >>smb_retry: successful, new pid=5679, generation=25
> >>smb_trans2_request: result=-104, setting invalid
> >>smb_retry: successful, new pid=5679, generation=26
> >>smb_trans2_request: result=-104, setting invalid
> >>smb_retry: successful, new pid=5679, generation=27
> >>smb_trans2_request: result=-104, setting invalid
> >>smb_retry: successful, new pid=5679, generation=28
> >>smb_trans2_request: result=-104, setting invalid
> >>smb_retry: successful, new pid=5679, generation=29
> >>smb_trans2_request: result=-104, setting invalid
> >>smb_retry: successful, new pid=5679, generation=30
> >>
> >>And then ofcourse, there is sometimes a lag while it "remounts" the 
> >>drive after these errors, so the website is slowed down a bit by this. 
> >>But after it remounts, it's great - until it loses it's connection 
> >>again.  Is there something I can do about this, or is there a better
> >>way to have mulitiple webservers share documents?
> > 
> > 
> > _______________________________________________
> > CLUE-Tech mailing list
> > Post messages to: CLUE-Tech at clue.denver.co.us
> > Unsubscribe or manage your options:
> http://clue.denver.co.us/mailman/listinfo/clue-tech
> 
> -- 
> 
>                                  -Mike Staver
>                                   staver at fimble.com
>                                   mstaver at globaltaxnetwork.com
> 
> _______________________________________________
> CLUE-Tech mailing list
> Post messages to: CLUE-Tech at clue.denver.co.us
> Unsubscribe or manage your options:
http://clue.denver.co.us/mailman/listinfo/clue-tech


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com



More information about the clue-tech mailing list