Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Add Autoscale options #54

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

davidvanchu
Copy link
Contributor

Currently the Orleans CosmosDB Provider only supports manual throughput options. This PR adds autoscale throughput options, while maintaining the prior default settings.

public string Collection { get; set; } = ORLEANS_STORAGE_COLLECTION;
/// <summary>
/// RU units for collection, can be set to 0 if throughput is specified on database level. See https://docs.microsoft.com/en-us/azure/cosmos-db/set-throughput
/// </summary>
public int CollectionThroughput { get; set; } = ORLEANS_STORAGE_COLLECTION_THROUGHPUT;
public bool UseDedicatedThroughput { get; set; } = ORLEANS_STORAGE_DEDICATED_THROUGHPUT_ENABLED;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the naming of these options here (UseAutoscale / UseDedicated), they look like they should be mutually exclusive; however, the code indicates otherwise, which is clearly the truth. Is this consistent with the CosmosDB documentation?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tl;dr: I wondering if there's a non-ambiguous way to name the options

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can have Dedicated Throughput without Autoscale Throughput, although if you want Autoscale Throughput enabled at the Collection level, Dedicated Throughput must be enabled as well. Dedicated just means the individual
collection is assigned a Throughput level, independent of the rest of the Database.

You can also have Shared Throughput enabled on the Database, and mix-and-match Dedicated/Shared throughput on the individual Collections.

I do think it would be better if I prefixed these variables with Collection, since they apply at the Collection level rather than Database as above, and with the naming the way it is, it is not clear.

…e level and Collection level throughput options
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants