Thats a great question Tanuj Mittal
and thanks for usijng QandA platform
i beleoive Yes, the CosmosClient
instance is thread-safe. and its good to use a single instance foir the lifetime.
The DatabaseProxy
object is also thread-safe as it is derived from the CosmosClient
.
So, you can definitely create a singleton for the container
if all your threads are reading from the same container.
If this helps kindly accpt the response thanks much.