Ldap connection load

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

i need to ask that, while making an ldap connection ... which approach
is better?
1. Open connection, do one operation, close the connection ... and
repeat this process for all operations.
2. Open conncetion, do all operations, close connection.

considering that my page like is not mopre than 2 sec.
Thanks in advance!


Re: Ldap connection load

Afnan Zari wrote:
Quoted text here. Click to load it

Imagine that you would have to post 10 letters. Approach 1 means that you
take one letter, go to the post office and return to get the next letter.

The second approach would mean that you take all the letters and bring them
to the post office at once. Which approach would take the most effort do you
think? ;-)


Re: Ldap connection load

Quoted text here. Click to load it

A more correct analogy would be to mail all letters in 1 envelope (since
all have the same destination anyway). So in the latter situation if
that 1 envelope would get lost you lose all letters.

The last time I worked with LDAP (not from PHP but Java), the admins of
the LDAP servers preferred me using a seperate connection for each
transaction (about 100/s), I also preferred that since then I wouldn't
have to check if the connection was still valid (connections were setup
with a loadbalancer, existing connections to a slave would stay open if
slave crashed).

So it all depends on the exact setup which solution might be best.

Re: Ldap connection load

Daniel Tryba wrote:
Quoted text here. Click to load it

Indeed, as I have worked with ldap systems where a single connection for all
operations worked fine and was preferred.

Although it seems cumbersome to me to setup a new connection for each


Re: Ldap connection load

Thanks ...

Site Timeline