azure-cosmos-dotnet-repository icon indicating copy to clipboard operation
azure-cosmos-dotnet-repository copied to clipboard

Allow for read/write client separation

Open dnitsch opened this issue 1 year ago • 6 comments

Is your feature request related to a problem? Please describe.

Related to this discussion

Describe the solution you'd like

The caller should be allowed to pass in a read and/or write endpoints. If omitted the default account endpoint to be used for operations of both types.

If writeEndpoint is supplied the underlying write operations i.e. all methods in the IWriteRepository and IBatchRepository should use it, similarly for the reads.

This might require storing 2 versions of the client on the struct as a private properties... 🤷‍♂️

Describe alternatives you've considered Implementation still needs ironing out

Additional context

Currently scenarios requiring multi region setup with strong consistency cannot be properly satisfied, where writes should only occur into a single region.

dnitsch avatar Mar 20 '23 19:03 dnitsch

@all-contributors please add @dnitsch for idea

IEvangelist avatar Apr 06 '23 13:04 IEvangelist

@IEvangelist

I've put up a pull request to add @dnitsch! :tada:

allcontributors[bot] avatar Apr 06 '23 13:04 allcontributors[bot]

@dnitsch I know we had a chat about this and you had found that this wasn't required due to the SDK knowing which endpoints to hit in which scenarios under the hood. Are you able to provide the detail you gave to me on this issue?

mumby0168 avatar Apr 28 '23 06:04 mumby0168

Hey @mumby0168 - sorry about the delay. I'll update the discussion issue today.

dnitsch avatar Apr 28 '23 13:04 dnitsch

Hi @dnitsch were you okay to update this issue with your findings?

Thanks.

mumby0168 avatar Sep 12 '23 07:09 mumby0168

@mumby0168 - ended up updating the discussion issue instead.

Now, need to find the time to submit the idea/suggestion.

dnitsch avatar Sep 20 '23 18:09 dnitsch