orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Make Azure Storage table name (OrleansSiloInstances, OrleansReminders) configurable

Open Vhab opened this issue 8 years ago • 6 comments

We're looking into deploying concurrent and disposable instances of our application. To reduce the amount of orchestration we intend to re-use a single Azure Storage Accounts for multiple deployments of our application concurrently.

State storage can already sufficiently configure to not collide using AzureBlobStorageOptions.ContainerName. However, the 'OrleansSiloInstances' and 'OrleansReminders' table is not configurable.

Could AzureStorageClusteringOptions and AzureTableReminderStorageOptions be extended to take a table name?

This would allow us to clean up after we pull down an instance of the application by just deleting the named tables and container.

Meanwhile, as a workaround, would using a different ClusterId allow multiple independent Orleans clusters to run side by side on the same tables?

Vhab avatar Sep 12 '18 12:09 Vhab

Meanwhile, as a workaround, would using a different ClusterId allow multiple independent Orleans clusters to run side by side on the same tables?

For clustering, I think it is fine, even silo membership entry stored in the same table, the entry are well separeted by deploymentId, which is the table entry's partition key

For reminders, I'm not so sure, since the partition key for reminder entry is serviceId + grainRef.GetUniformHashCode(), row key is grainRef + reminder name, I think if the grains in the two cluster happen to share the same uniform hash code, and use the same reminder name... then...

xiazen avatar Sep 12 '18 23:09 xiazen

@sergeybykov for the reminder behavior, is it by design, or is it a bug? it seems to me that, if a team is doing vip swap for deployment, the staging and prod would be use the same reminder entry.

xiazen avatar Sep 12 '18 23:09 xiazen

or @jason-bragg whoever remembers

xiazen avatar Sep 12 '18 23:09 xiazen

make the table name configurable for clustering and reminders seems good in general.

xiazen avatar Sep 12 '18 23:09 xiazen

We've got some time to spare on our schedule, I'll take a stab at implementing this.

Vhab avatar Sep 13 '18 07:09 Vhab

@sergeybykov for the reminder behavior, is it by design, or is it a bug? it seems to me that, if a team is doing vip swap for deployment, the staging and prod would be use the same reminder entry.

Yes, this is by design. Staging and prod are for the same service (they must have same ServiceId), so the service level data, such as reminders, grain state, and streams, is the same for both clusters.

I don't think there's anything technically wrong in the current approach because data in the fixed name tables is partitioned based on ClusterId or ServiceId, and so should scale out properly. But I do see the administrative convenience of being able to assign distinct table names in certain scenarios with shared storage keys or databases.

sergeybykov avatar Sep 13 '18 15:09 sergeybykov