SnowMaker icon indicating copy to clipboard operation
SnowMaker copied to clipboard

Getting Duplicate Ids in Azure Functions

Open bdbvb opened this issue 1 year ago • 0 comments

I've got a .NET 6 Azure Function (runtime version 4, consumption plan) where I'm using SnowMaker to generate IDs. I've only got one generator per app domain (singleton dependency injection).

I get IDs as expected, until under heavy load (like requesting 10s or 100s at a time) Azure spins up new instances, in which case sometimes the IDs are unique, and sometimes they're not (IOW, it seems like a function instance sometimes gets the same batch as another instance).

Could I potentially be doing something wrong, or is there some way the Azure functions need to be set up?

bdbvb avatar Mar 21 '23 20:03 bdbvb