dongwei4444 2015-03-10 00:42
浏览 46

新的Lamp linux服务器上的PHP会话

Short introduction : i have one server that is running a LAMP stack with a login form and 2 different servers with other IP's hosted in the same data center so i can setup Private networking between the servers .

To Accomplish :

Network Diagram

User 1 logs in on webserver 1 that starts a php session on Webserver 2 without giving access to Webserver 3

User 2 logs in on webserver 1 that starts a php session on Webserver 3 without giving access to Webserver 2

i have been looking into the situation so i think it can be done with memcache ? But i'm not sure on that any help on how this setup could be configured would be greatly appreciated .

  • 写回答

2条回答 默认 最新

  • dsgd5756 2015-03-10 00:51
    关注

    When you start using multiple application servers they should be stateless. Eg. No database, no sessions, no caches. All of these resources should be moved to their own servers that can be accessed by any part of the system that needs them.

    Your choice of session management store very much depends on your needs. If you have very low traffic you can get away with storing sessions in the database, otherwise look into something like Redis for high performance storage.

    评论

报告相同问题?