flamencist / ldap4net

OpenLdap port for DotNet Core (Linux\OSX\Windows)
MIT License
212 stars 38 forks source link

Connection pooling #51

Open gregbair opened 4 years ago

gregbair commented 4 years ago

Is your feature request related to a problem? Please describe. Opening new ldap connections is very expensive. It is better to reuse them, but this requires passing connections around your codebase. This is not an ideal solution.

Describe the solution you'd like Many data access libraries contain a connection pooling mechanism, like Microsoft.Data.SqlClient for C#, and ldaptive for Java. I'd like a connection pooling mechanism for ldap4net.

Describe alternatives you've considered Passing connections around.

flamencist commented 4 years ago

I agree connection pool is great feature. I will appreciate if you help to implement the feature. We could use simple strategy. Store and check connections by hostname and port.

gregbair commented 4 years ago

We've done some work around this at my job. I'll see if we can clean it up and contribute it.

flamencist commented 4 years ago

Will be good.

nhontran commented 4 years ago

Hi @gregbair , could you share how you implemented the connection pool?

FinHorsley commented 1 year ago

Jumping on this late, but is LdapConnection thread safe? I can't see any documentation that explicitly states that it is

Update: just read https://github.com/flamencist/ldap4net/issues/138, and yes it is 🙂