[Enhancement] (ldap) provide a connection pool for ldap client
- Dominant language
- Java
- Stars
- 15.9k
- Forks
- 3.9k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 520
Description
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Description
when using ldap, people apply search actions more frequently (like 2 times) than that of login.
at the client side, we can provide a connection pool to serve the search requests.
### Solution
The LDAP requests are divided into two distinct types based on their characteristics:
**Search operations**: These are read-only and connection-reusable. We leverage Apache Commons Pool2 (v2.11) to implement a connection pool, significantly reducing connection establishment overhead for high-frequency search traffic.
**Auth operations**: These are less frequent and inherently non-reusable (each authentication binds with a different user credential). We therefore retain the current implementation as-is, since the overhead of pooling would not yield meaningful benefits for this workload.
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
Contributor guide
Research direction
Start by locating the Java LDAP client and its existing search and authentication paths. Read how search connections are created and review the Apache Commons Pool2 v2.11 usage requirements. Done means search requests reuse pooled connections while authentication retains its current behavior, with tests covering both operation types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100