2 web servers serving same pages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • plenty900@yahoo.com

    2 web servers serving same pages

    Hi folks,

    If 2 copies of Apache are serving the same pages and
    running the same PHP, what if anything could get
    messed up? I am specifically thinking session
    variables might, but I know I don't know... so anybody know?

    Thanks.
  • plenty900@yahoo.com

    #2
    Re: 2 web servers serving same pages

    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.

    Comment

    • Jerry Stuckle

      #3
      Re: 2 web servers serving same pages

      Michael Vilain wrote:
      In article
      <2da27430-370a-48ea-8a3d-f0ad51a098c0@x4 1g2000hsb.googl egroups.com>,
      plenty900@yahoo .com 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
      >>simultaneou s 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 OP didn't say they were using a database, so SQL isn't involved.
      >
      LOCK TABLES and UNLOCK TABLES are SQL statements...

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      Working...