That’s because the check doesn’t actually occur until the stub is fetched the first time
That’s because the check doesn’t actually occur until the stub is fetched the first time
idFromName('new-name') and a worker in EU calls idFromName('new-name') at the same time, they'll both have different ids. When they call fetch(req) will they both get a different DO instance, or will the system ensure they are routed to the same DO? I'm looking at using the DO mechanism so that multiple players of an AI text game who are hitting the same un-generated branch of that game will be able to request it and have a unique DO for that branch ensure the request to generate the AI response only happens once and is returned to both players and caches the response in R2 for future players who go down that particular branch. I'm not sure if the guarantee for 1 DO in the world for a given name extended to this case when 2 clients could be asking for the same new name at the same moment.idFromName calls will meet up somewhere in the ether and one will win so that there will only ever be one DO that matches that "name". This cross coordination occurs before a fetch can be called, so they will be "routed to the same DO". That said, I don't know if anyone on this channel has seen the actual code and sequence diagrams that confirm it achieves this intention, but if it doesn't work this way, it's a bug, not expected.locationHint could work. Just need to route connections to a nearby pool.request.cf.locationHint I could manage pools easily that way.idFromName('new-name')idFromName('new-name')fetch(req)locationHintrequest.cf.locationHint