MailNews:LDAP and Large Searches

From MozillaWiki
Jump to: navigation, search

The Address Book LDAP client does not behave well for large searches. One proposed solution has been to use Virtual List Views (VLV) to allow the client to retrieve entries from the LDAP server a portion at a time. It's important to point out that it is not necessary to use VLV to solve this problem, and many servers don't support VLV.

The stated desire is to allow many clients to issue searches with large result sets without melting server or network infrastructure in the process. (E.g., 10,000 clients simultaneously issuing a search with 10,000 results each.) Of course, no LDAP feature (VLV or otherwise) can prevent the original 10,000 requests from being made, so they don't mitigate any problems at the outset. And ultimately VLV and paging just increases the server and network load because it requires more server side bookkeeping and network request/reply transactions to get all of the desired results.

The assumption is that you want to only request 10-20 (i.e. a screenful) results at a time and display them, then request another screenful of results when the user starts scrolling down in the result display.

The most straightforward behavior is to issue a single standard Search request, but have the client only read a screenful's worth of replies at a time. When the client stops reading from the LDAP session, TCP's inherent flow control will kick in and suspend data retrieval at the server. I.e., there is no need to use VLV or PagedResults extensions just to accomplish rate control. If the client isn't going to retrieve all the outstnading results it can just send an Abandon request to terminate any further processing.