Ordering in async upsert requests

In a situation where you have bulk upsert requests, and some contain the same key, to avoid older document overwriting the new one ?

I know that we have CAS, but that would require us to obtain cas value before each upsert, and decide whether to publish the document, which would lower performance.

Is there any better way with SDK or without to retain the high performance bulk upsert requests of large documents, and retain consistency of the updates?

I’m looking at getting at least 10.000 requests/second of documents about 2k-5k each.