Wednesday 15 July 2015

marklogic - What is the minimum number of nodes in a cluster? -



marklogic - What is the minimum number of nodes in a cluster? -

the documentation says cluster needs @ to the lowest degree 3 nodes. able run on 2 hosts, , testing failover appeared work.

we set 2 hosts (a, b) in cluster, each 1 forest. forest on master forest. forest on b replica forest. attached forest a database. @ point status of forest "a" "open" , "b" "sync replicating".

then shut downwards host a. status of forest b became "open".

it seem failover worked though had 2 hosts in cluster. expected behavior?

to understand issue better, seek this. have host b replicate databases including security db. (put forest on b replica of matching forest on a). description matches whats called "local disk failover"

https://docs.marklogic.com/guide/cluster/failover#id_65543

( term misleading, disks dont need "local" can on san or physically remote - term means each host sees own disk, not shared disk).

test can login , preform operations on or b reliably , results seen both.

ideally simulate real world utilize case either making simple app, 1 updates document every time click button. or utilize rest services , test can same thing on both hosts.

now disconnect network between , b. ( pull wire out or disable network alter router setting, whatever easiest.)

now seek application on both hosts. go each host individually admin console , see thinks status of , other host. expect status show ? both , b no longer can communicate each believe other host has failed. without 3rd host arbitrate ... expect or want result ? should both hosts stop working ? or should both hosts maintain working ? or should 1 work ? 1 ? how decide ? should "failover" host take on master because sees master failed ? or should master decide failover host has failed ? both choices right - in context nil else known, want cluster maintain going.

now seek utilize app add together or modify documents on both systems. work ? create different changes same document on each host. expect each app maintain functioning ? should, thats failover for. each thinks other dead dont effort replicate, instead both deed masters (or both fail - cant tell difference there no way pick better)

now reconnect network after , b both have different changes. expect occur ? changes , b replicated ? b give beingness master , hand on changes ? or realize b has recovered , send changes on b? documents both changed ?

another (more complex illuminating) experiment set load balancer between , cluster. send requests both hosts on time.

now disconnect network between hosts not between load balencer , each host. run app ... still belive talking "one host" before. changes sent , b depending on load balencer. expect user experience ? if request 1 updates request 2 fetches document b ... user (and app) inconsistent results - if @ all. not good.

failover happened ... scheme whole inconsistent , not aware of it. work in experiment tried because know talk a. thats not purpose of failover. can accomplish raid or distributed filesystems or simple continous backups ...

failover beingness able handle either scheme going offline or disconnected each other , cluster whole still function , remain consistent regardless of host send requests to.

with 3 hosts can 3 hosts working 3 offline or disconnected, not operate in inconsistant way. requests host either succeed , consistent rest, or fail (because host offline or has determined not part of cluster anymore).

with 2 hosts (or number) cannot accomplish "failover" both consistency , replication reliably.

you can "replication" (see database replication , flexible replication) between clusters, clusters of 1 node .. not same "failover" replication 1 way .. master sends info replica. if either fails can decide send traffic other ... @ point need manual intervention later seek bring info sync.

you can see differences in https://docs.marklogic.com/guide/database-replication

marklogic

No comments:

Post a Comment