-
Notifications
You must be signed in to change notification settings - Fork 30
Add Autoscale options #54
base: master
Are you sure you want to change the base?
Add Autoscale options #54
Conversation
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Currently the Orleans CosmosDB Provider only supports manual throughput options. This PR adds autoscale throughput options, while maintaining the prior default settings.