william_rao Posted November 18, 2003 Share Posted November 18, 2003 We plan to install multiple Apache servers instead of single Apache server since it is overloaded. My concern is: in one user session, the user may send 2 or more requests. How do multiple Apache servers to communicate each other for the same session? For example, we have Apache Server A and Apache Server B. A and B process user shopping cart requests in turn, but connect to the same database. User William wants to buy a PC and a notebook (just like in Dell.com). He login to the PHP shopping cart. First he puts a PC into his shopping cart, this request is processed by Apache Server A. Then, in same session, he puts a notebook into his shopping cart, this request is processed by Apache Server B. How can Apache Server B knows user William has a PC in shopping cart so B can calculate the total price for a PC plus a notebook? Thanks a lot. Quote Link to comment https://forums.phpfreaks.com/topic/1385-how-to-keep-session-data-in-multiple-apache-servers/ Share on other sites More sharing options...
sirmanson Posted November 19, 2003 Share Posted November 19, 2003 The easiest way to make this work is just to use a common database between the two servers. Have all of your user session data stored here. Then either server can access the data at any time. Quote Link to comment https://forums.phpfreaks.com/topic/1385-how-to-keep-session-data-in-multiple-apache-servers/#findComment-4624 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.