Understood quanah, but I have a single app which performs both read and write. App is using single connection string for binding with ldap. So shall I use two separate connection string, one for read and one for write in the application code ?
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.
Regards Chandan
On Wed, Mar 10, 2021, 21:41 Quanah Gibson-Mount quanah@symas.com wrote:
--On Wednesday, March 10, 2021 6:43 PM +0530 chandan jain chandandevops@gmail.com wrote:
A load-balancer that is not doing round-robin (but some other policy, like response time or throughput) probably would be OK
OK agreed with you, but above loadbalancer config doesn't solve problem of horizontal scaling and load balancing.
In other words, is it possible to achieve a horizontally scalable, highly available and load balanced setup.
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
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
--On Wednesday, March 10, 2021 10:38 PM +0530 chandan jain chandandevops@gmail.com wrote:
Understood quanah, but I have a single app which performs both read and write. App is using single connection string for binding with ldap. So shall I use two separate connection string, one for read and one for write in the application code ?
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, Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
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.
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.
--On Thursday, March 11, 2021 10:56 AM +0530 chandan jain chandandevops@gmail.com wrote:
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.
If you have only a single application using LDAP, just set up two nodes with sticky failover and a single pool, since nothing else is using LDAP. As has been said repeatedly, in general, an application that does writes should use the same connection for reads.
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
openldap-technical@openldap.org