Hello All,
We have a heavy traffic app and we are creating rooms dynamically. I understand that SFS assigns a new room id to each new dynamic room. My question is when do these ids start to loop? Does it happen on SFS restart ? Theoritically if i never restart SFS, will these SFS room ids always be unique ?
Is there any difference in SFS 1.x & SFS 2.x with respect to this uniqueness of Room ids ?
Query about SFS Dynamic Rooms
Re: Query about SFS Dynamic Rooms
User and Room ids are 32bit integers.
There are over 4 billion unique IDs before they reach zero again
2^32 = 4294967296
cheers
There are over 4 billion unique IDs before they reach zero again
2^32 = 4294967296
cheers
Re: Query about SFS Dynamic Rooms
Hi Lapo,
Thanks again for answer. I understand that the Room and User ids are 32 bit Ints. But does SFS really generate them randomly ? I think SFS starts from 1 and goes on. Now if SFS starts from 1, my question was when does SFS starts going back to 1 ? Only after restart ?
I was confused because i was thinking, that may be in case of dynamic rooms that keep getting generated and destroyed, May be SFS gives their Room IDs to new rooms as it creates new ones ?
I hope i could convey my doubt well.
Thanks again for answer. I understand that the Room and User ids are 32 bit Ints. But does SFS really generate them randomly ? I think SFS starts from 1 and goes on. Now if SFS starts from 1, my question was when does SFS starts going back to 1 ? Only after restart ?
I was confused because i was thinking, that may be in case of dynamic rooms that keep getting generated and destroyed, May be SFS gives their Room IDs to new rooms as it creates new ones ?
I hope i could convey my doubt well.
Re: Query about SFS Dynamic Rooms
No randome generation. It is an auto-increment value.Thanks again for answer. I understand that the Room and User ids are 32 bit Ints. But does SFS really generate them randomly ? I think SFS starts from 1 and goes on. Now if SFS starts from 1, my question was when does SFS starts going back to 1 ? Only after restart ?
Yes, if you restart the server it will of course restart from zero.
No and id is never reused until the whole 4+ billions integers have been consumed.I was confused because i was thinking, that may be in case of dynamic rooms that keep getting generated and destroyed, May be SFS gives their Room IDs to new rooms as it creates new ones ?