dimitarn
Hi
I need to do fail over mechanisam of LS servers.
I read the clustering.pdf doc, but i am not very sure that i want to run the ls servers in cluster, because the application will server about 500k users in the feature.
Firstly it will be shown for 25k users and we have setup 2 LS servers.
We intend to add for every new 25k users 2 additional servers, but they will not work with the other pairs i.e. every server will have 1 fail over
LS A1 LS A2 | LS B1 LS B2
master -> slave | master -> slave
slave <- master | slave <- master ..............
I want to ask if it is better to implement my own custom fail over as follows:
Initialize the ls client with main host and failover hosts, if the main is down( i.e. the client call create_session.js and it fails - how this can be detect?) and then fail over to the next host(may be until the main host is up, notify its fail over LS servers and i can send message to the client to reconnect to its main LS Server). This is without sharing any sessions on the cluster as far as i understand the doc?
Or the original approach to use clustering of LS servers?
Alessandro Alinone
Hi,
Both the scenarios are feasible. In the first scenario, you would have multiple clusters, each with two servers in master-slave configuration. This would be handled by a web load balancing appliance properly configured.
On the other hand, you can certainly setup your own fail-over mechanism. Your client will be notified of any disconnection via the proper callbacks (available in all the client SDKs). In that case, you will just set the new host name before trying the reconnection. Obviously, your client will not know the reason of the disconnection. Perhaps it's not a server fault, but just a network issue. So you will probably end up having both the servers serving requests, losing the initial master-slave configuration.
dimitarn
Thanks for the reply
Both servers will be serving requests and if one fails the other takes the load until the 1st get up.
I mean that if i use Option 1.A.2 then the sessions created on the LS 1 will not be replicated to LS 2 until LS 1 get down?
Alessandro Alinone
Option 1.A.2 implies using a Web Load Balancer. In that case, I confirm that the session migration from one server to another will typically happen only when the first server fails.