Summary
- Early LDAP made
MessageIDunique only among requests still in flight on one session. Every entry, reference and final result belonging to an operation echoed that number, so asynchronous replies could cross on the wire without becoming indistinguishable. - Abandon exposed the identifier's ceiling: its envelope carried one ID while its payload named another, and neither the request nor a successfully abandoned search ever returned a completion. RFC 3909 later added a response-bearing Cancel for applications that needed an answer.
- Paged search handed each page a fresh message ID and a continuation cookie. The ID named local work. It did not authenticate a peer, name a durable query, or prove that a write had been undone.
A search was never one reply
"Lightweight" described the plumbing, not the conversation. LDAP was built as a cheaper way to reach X.500-style directories, and a single subtree request could come back as hundreds of entries, a reference pointing at some other naming context, and only then a terminal result. One question. A small avalanche of answers.
RFC 1487, published in July 1993, wrapped every operation in a common LDAPMessage envelope. Its one shared field was messageID — an integer that had to differ from the IDs of other requests still outstanding in the same session. The server copied that value onto every response envelope the request produced.
That single sentence gave the number a job far more interesting than counting packets. A search returned zero or more entries and exactly one final result, and all of them belonged to the same operation. Had the number changed with each response, the client would have needed some other way to know which entries and which terminal status formed a single stream.
The number never described the directory object — a distinguished name did that — and it never described the operation's meaning, which the protocol-operation tag carried. It supplied the one thing neither could: the join between a request in progress and the messages produced on its behalf.
Interleaving made the scope visible
RFC 1777, the 1995 LDAP specification, refused to promise synchronous behaviour: requests and responses for several operations could be exchanged in any order. A client could fire a quick comparison while a broad search was still dribbling out entries, and the server could answer the comparison first.
The wire sequence read like a conversation with a very good chair: search 41, compare 42, entry 41, compare result 42, another entry 41, final search result 41. TCP delivered reliable ordered bytes and said nothing about which application operation each encoded message served. MessageID did the demultiplexing.
That is why the contract was session-local. The ID only had to differ from other outstanding requests in that session. Another client was free to use 41. The same client could use 41 again once the earlier operation had unmistakably ended. No collision, because the comparison domain was the session plus the operation's lifetime.
RFC 2251 carried the mechanism into LDAPv3 in 1997, bounded the integer at 2^31−1, noted that clients typically just increment a counter, and forbade reuse before the final response. It also gave search replies distinct shapes: SearchResultEntry and SearchResultReference could arrive in either order, followed by a single SearchResultDone carrying success or error.
So the terminal response did double duty. Its result code said how the search ended. Its arrival was also the client's ordinary evidence that the server no longer needed that operation's ID.
Zero was set aside for speech without a question
The 2006 revision reorganized LDAPv3. RFC 4510 records how the new specification set replaced RFC 2251; RFC 4511 holds the revised protocol rules.
RFC 4511 made request IDs explicitly nonzero. Zero was reserved for an unsolicited notification — a server-originated extraordinary message that answered no client request. A Notice of Disconnection could therefore arrive as message ID zero without being mistaken for the response stream of operation zero.
This was not a global namespace allocation but a locally enforceable partition. Positive IDs belonged to client-initiated work in progress; zero signalled a defined class of server speech outside that correlation. Meaning still came from the protocol operation and the notification's object identifier.
Reuse stayed tied to service lifetime rather than elapsed time. A client could recycle an ID only when it could determine that the server was no longer servicing the earlier request — after the final response, say, or after a subsequent Bind completed. A timeout might justify closing the session or reconciling application state, but silence alone did not rewrite the server's state table.
Abandon needed two numbers and still could not report an outcome
LDAP's original escape hatch is a compact lesson in authority. An Abandon operation is itself an LDAP request, so its envelope carries a new MessageID. Its payload is also a MessageID: the earlier operation the client wants stopped. One number correlates the abandon as an operation; the other selects its target.
There is no Abandon response. Under RFC 4511 the server may abandon the target; if the target is a search already emitting results, the server must stop sending further entries and must not send SearchResultDone. The client must still tolerate results already in transit, and some operations cannot be abandoned at all.
The silence is deliberate and ambiguous in equal measure. It avoids adding another exchange to a request usually issued when the client has stopped caring about the answer. It also means the client cannot tell a successful abandon from work still quietly running. The shared ID identifies exactly which work was addressed without proving what the server did about it.
RFC 2251 folded that uncertainty into its reuse rule: do not recycle either the Abandon request's ID or the target ID until a response arrives for some later request. That later response is not an acknowledgement of abandon. It is merely evidence that the server has moved far enough along the connection to reduce one kind of collision risk.
Cancel added a result rather than pretending the old signal was stronger
RFC 3909, published in 2004, defined an LDAP Cancel extended operation for applications that actually need an indication of outcome. It did not retrofit meaning onto Abandon. It added a second mechanism and let each do its own job.
A Cancel request has its own envelope MessageID and carries a cancelID naming the outstanding operation. If cancellation succeeds, the server returns a successful Cancel response and the target operation ends with result code canceled. Other results distinguish a target the server does not know, an operation that cannot be cancelled, and a request that arrived too late.
The tooLate case is the honest one. RFC 3909 uses an update already committed to the underlying data store as its example. Perfect correlation does not create rollback authority. The cancel ID may point at precisely the intended update while the only truthful result is that its irreversible effect has already crossed the boundary.
Cancel also restricts what may be targeted. Bind, StartTLS, Unbind, Abandon and Cancel itself are not cancellable. Those operations create, change or tear down the association and security context in which ordinary operation IDs make sense; letting one outstanding operation casually erase that context would turn a correlation key into a control it was never designed to hold.
A new page required a new ID
Search pagination is the clearest negative proof. RFC 2696 lets a server return a page of results plus an opaque cookie in SearchResultDone. To ask for the next page, the client repeats the search values but changes the messageID, supplies the latest cookie, and may change the page size.
The next page is a new LDAP operation. The cookie carries the server's continuation state across those operations. An older cookie may be unusable; an empty cookie means the sequence is finished. Abandon can stop one page request in progress but may invalidate the cookie, while ending a paged sequence cleanly takes a fresh search request with size zero and the latest cookie.
That division stops one convenient integer from acquiring mythical durability. The message ID answers, "Which in-progress operation on this session produced this message?" The cookie answers, "What server-held result position may this later operation resume?" A distinguished name answers something else again.
The sources establish the rule, not present behaviour
The chain closes with RFC 1487, RFC 1777, RFC 2251, RFC 2696, RFC 3909, RFC 4510 and RFC 4511. They establish formats, normative boundaries and revision history. They do not measure deployment, certify an implementation, or prove the outcome of a captured operation.
LDAP's small integer endured because its authority was narrow. It joined messages to state a receiver could actually inspect — and every time an application wanted more, whether completion, cancellation, continuation, authentication or authorization, the protocol demanded different evidence. A correlation key is a wonderful thing. It was never meant to be a verdict.
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






