Re: 2 web servers serving same pages



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
==================

.



Relevant Pages

  • Re: Security design questions
    ... I'm not using mySQL for the record, the database itself will be ... the UNIX user id that Apache or PHP runs as). ... web server won't serve it, and if it is NOT broken, PHP will interpret ... Keeping track of what user is logged in is best done with sessions ...
    (comp.lang.php)
  • ANN: SQL Monitor Version 2 has just been released
    ... SQL Monitor version 2.0 has just been released. ... sessions running on SQL Server databases. ... a DBA or database developer to see the impact individual sessions have ...
    (comp.databases.ms-sqlserver)
  • ANN: SQL Monitor Version 2 has just been released
    ... SQL Monitor version 2.0 has just been released. ... sessions running on SQL Server databases. ... a DBA or database developer to see the impact individual sessions ...
    (comp.software.shareware.announce)
  • Re: [Info-ingres] sessions with no owner
    ... sessions with no owner ... I,ve got 4 dbms servers running for connecting to one database ... when users start connecting to the server the datbase seems refusing connections when more then 64 datbae sessions ...
    (comp.databases.ingres)
  • Re: 2 web servers serving same pages
    ... you're libel to get weird and unpredictable results ... access goes to server B, ... session info for that user. ... What you do have to watch out for is changes to the file system other than through the SQL database. ...
    (comp.lang.php)