今日已更新 215 条资讯 | 累计 21081 条内容
关于我们

How does YJS actually handle client ID reuse?

/u/EternityForest 2026年06月05日 05:44 4 次阅读 来源:Reddit r/webdev

From what I hear, the client IDs are randomly assigned, and people claim that the birthday paradox prevents endless piles of new client IDs piling up in the state vector, but I don't understand how this is possible. The design seems like it would either guarantee a collision eventually, for someone in the world, if the number of random bits is small, or it would indefinitely bloat the state vector up to billions of entries (If it's large). If you have 32 bits of state, and a billion entries, more than half of new random client IDs should be unused, right? Would they not then add another entry to the state vector? Is there some undocumented cleanup method that actually can remove old client IDs? Do they just rely on most applications recreating the whole thing periodically? submitted by /u/EternityForest [link] [留言]

本文内容来源于互联网,版权归原作者所有
查看原文