问题原文
原帖链接 · Markus Pauli · CC BY-SA 4.0
I'm not very educated when it comes to distributed systems. I have a website hosted currently on a windows server and I want to load balance to 2-3 servers. But I have some problems in mind, and I want to know what I need to do about them.
1- Session persistence. I thought about using nginx open source but found out that the only way to do sticky sessions is ip_hash which causes uneven distribution among the servers. I don't want this, are there any free alternatives for windows that allow sticky sessions without IP Hashing?
2- Updating and downloading files. When I need to update/copy/create files, do I need to do it on all servers? Is there any easier way?
已采纳解答
原帖链接 · BarsMonster · CC BY-SA 4.0
- When you have many users, IP hashing will statistically give you almost uniform distribution across servers. I would suggest to stay with sticky sessions with ip_hash. That is the simplest and most robust way.
Alternatively, you can store sessions in something like memcached or any other no-SQL database, this way you won't need to care about session sticking.
- There are no easier ways, but there are more automated ways which will require less manual work. You can automate this using repository and doing remote execution of commands like PSExec or WMI.
Files uploaded by users will have to be ether synchronized to all servers, or uploaded and served from network location accessible to all servers.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
