SnowMaker
SnowMaker copied to clipboard
Getting Duplicate Ids in Azure Functions
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?