Re: 2 web servers serving same pages
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Wed, 09 Apr 2008 17:39:17 -0400
plenty900@xxxxxxxxx wrote:
This is not recommended unless the PHP does not modifications to the
pages or a database. Unless you put logic in the php code to check for
simultaneous access, you're libel to get weird and unpredictable results
of the two servers attempt to modify the same thing at the same time.
My impression is that every SQL access would have to be
surrounded by LOCK TABLES and UNLOCK TABLES commands.
But regarding sessions, it occurs to me that if a user
does one access and it goes to server A, and the next
access goes to server B, each server could have different
session info for that user.
The RDBMS will handle the updates just fine. It's absolutely no different than if you have two different people on the same website updating the database at the same time.
The same with sessions. Although it's theoretically possible for two sessions to get the same id, the odds are greatly against it. You'd have a better chance of winning the lottery.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- 2 web servers serving same pages
- From: plenty900
- Re: 2 web servers serving same pages
- From: plenty900
- 2 web servers serving same pages
- Prev by Date: Re: Problems with matching on last element in array
- Next by Date: Re: Problems with matching on last element in array
- Previous by thread: Re: 2 web servers serving same pages
- Next by thread: Re: 2 web servers serving same pages
- Index(es):
Relevant Pages
|