Transfer session across server in PHP

后端 未结 6 1022
陌清茗
陌清茗 2021-01-12 03:38

I need to transfer the user session across servers. ie. If user logged in server1 and if the user exists in server2 , then I have to transfer the user session details to ser

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-12 04:04

    This problem can quickly get out hand when you start adding more and more severs to the problem. One of the best solutions that I have found is to store the session on a database and share that database with the servers. Redis typically works great for this. Here is a great guide to get started with redis

提交回复
热议问题