[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: MirrorMode VS load balancing



Hi, Oliver,

On Mon, 29 Jun 2009 15:04:24 +0700 (ICT)
Olivier Nicole <on@cs.ait.ac.th> wrote:

> > Actually, when I setup 2-nodes MirrorMode and add too much entries to both
> > nodes, at the same time, sometimes both databases weren't syncrhonized
> > correctly. (I made a script to add 10,000 entries, and run it on both nodes
> > at the same time.)
> 
> My understanding may be wrong, but in a mirror mode, you need to add
> the entries in one node only, and the mirror will take care of the
> updating of the other node.

yes, you're right. this is normal MirrorMode operation.
but if the writes don't happen frequently, can be added in both nodes I believe.
I want to make sure this.

> (or you add half the entries in one node and the other half on the
> other node).
> 
> If you add the same information on both node, the mirror will also try
> to add that information on the other node and it will fail.

yes, actually LB controls client access.
when clientA and clientB would add "cn=abc,ou=people,dc=example,c=com" at the same time,
ClientA access goes to ServerA, and ClientB to ServerB by round robin rule of LB.

and if ClientA could update LDAP firstly, ClientB would get error code 68(already exist)
even if it was almost at the same time access.

besides, sorry to forget to attach my slapd.conf of both nodes. here it is.
this works LIKE multi master.

### server A ###
serverID 1
syncrepl rid=001
  provider=ldap://10.0.0.62
  bindmethod=simple
  binddn="cn=Manager,dc=example,dc=com"
  credentials=secret
  searchbase="dc=example,dc=com"
  schemachecking=on
  type=refreshAndPersist
  retry="10 +"
syncrepl rid=002
  provider=ldap://10.0.0.63
  bindmethod=simple
  binddn="cn=Manager,dc=example,dc=com"
  credentials=secret
  searchbase="dc=example,dc=com"
  schemachecking=on
  type=refreshAndPersist
  retry="10 +"
mirrormode on

### server B ###
serverID 2
syncrepl rid=001
  provider=ldap://10.0.0.62
  bindmethod=simple
  binddn="cn=Manager,dc=example,dc=com"
  credentials=secret
  searchbase="dc=example,dc=com"
  schemachecking=on
  type=refreshAndPersist
  retry="10 +"
syncrepl rid=002
  provider=ldap://10.0.0.63
  bindmethod=simple
  binddn="cn=Manager,dc=example,dc=com"
  credentials=secret
  searchbase="dc=example,dc=com"
  schemachecking=on
  type=refreshAndPersist
  retry="10 +"
mirrormode on