OK, but if I put a single connection string, how below setup suggested by quanah will work.

I have a single application which read as well as write to ldap.


****************************
You set up two pools in the load balancer

Pool 1 -> For apps that only do reads, and handles load distribution in
whatever method you feel best.  Example DNS: ldap.example.com

Pool 2 -> For apps that write directly.  Sticky session to a single
provider unless it goes offline. Example DNS: ldap-provider.example.com

If you look closely at my response, I noted that apps that do writes should
use the same pool for reads.  This is generally due to the fact most apps
I've run across do a read after write and may hit problems if the change is
not there (i.e., due to replication delays).


> Also, as per the configuration setup suggested by you, how the
> replication need to be setup, I mean mirror mode across write pool
> members and another mirroring for read pool members from one of write
> pool member.

I don't understand this question.  There's a single set of servers, say A,
B, C, D.  There are two pools configured in the load balancer.  The first
pool uses a sticky setting, and always points to a single server for write
ops (say A) unless its down, at which point it will fail over to the first
available server (say B).  The second pool is for reads, and does whatever
algorithm you think best (say round robin), and bounces between A, B, C, D.

What replication mechanism is in use has nothing to do with the load
balancer configuration.  I would generally advise using delta-syncrepl
between nodes A, B, C D, all of which connect directly to one another and
don't interact directly with the load balancer at all.


***********************************

Regards 
Chandan 


On Thu, Mar 11, 2021, 00:19 Michael Ströder <michael@stroeder.com> wrote:
On 3/10/21 6:08 PM, chandan jain wrote:
> but I have a single app which performs both read and
> write. App is using single connection string for binding with ldap.

Keep it like this and simply treat the application as a writing application.

> So shall I use two separate connection string, one for read and one
> for write in the application code ?
No! You will likely run into "interesting" read-after-write issues which
are hard to track down.

Ciao, Michael.