- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用 UUID 来唯一标识某些内容(我将其用于上传到服务器的文件)有多安全?据我了解,它是基于随机数的。然而,在我看来,只要有足够的时间,它最终会重演,纯粹是偶然。是否有更好的系统或某种类型的模式来缓解这个问题?
最佳答案
非常安全:
the annual risk of a given person being hit by a meteorite is estimated to be one chance in 17 billion, which means the probability is about 0.00000000006 (6 × 10−11), equivalent to the odds of creating a few tens of trillions of UUIDs in a year and having one duplicate. In other words, only after generating 1 billion UUIDs every second for the next 100 years, the probability of creating just one duplicate would be about 50%.
警告:
However, these probabilities only hold when the UUIDs are generated using sufficient entropy. Otherwise, the probability of duplicates could be significantly higher, since the statistical dispersion might be lower. Where unique identifiers are required for distributed applications, so that UUIDs do not clash even when data from many devices is merged, the randomness of the seeds and generators used on every device must be reliable for the life of the application. Where this is not feasible, RFC4122 recommends using a namespace variant instead.
来源:Random UUID probability of duplicates section维基百科关于通用唯一标识符的文章(链接指向 2016 年 12 月的修订版,然后编辑重新设计了该部分)。
另请参阅同一篇通用唯一标识 rune 章 Collisions 上有关同一主题的当前部分。 .
关于guid - UUID 有多独特?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1155008/
对于 Prometheus 指标集合,如标题,我真的找不到只能通过 type Summary 完成的用例。 ,似乎它们都可以通过 type Histogram 以某种方式完成还。 让我们以请求并发度量
这个问题在这里已经有了答案: Ignore case while using duplicated (1 个回答) 关闭 9 个月前。 使用不区分大小写的 unique(tolower(x)) 删除
应用程序监控服务的一个有用功能是每次发生新的、独特的错误/问题/异常时发送警报(例如电子邮件)(即不是每次发生)。要么只是第一次,要么最多每次 X 次(一天或一周等)。例如,这可以通过 Visual
应用程序监控服务的一个有用功能是每次发生新的、独特的错误/问题/异常时发送警报(例如电子邮件)(即不是每次发生)。要么只是第一次,要么最多每次 X 次(一天或一周等)。例如,这可以通过 Visual
我想要相当于 DB2 中 MySql 的 GROUP_CONCAT 功能。 我尝试过 DB2 的 XML Aggrigate 函数来合并 murows。 SELECT a.ID, sub
我正在运行 python 数据库迁移脚本 (Flask-Migrate) 并添加了 alembic.ddl.imp import DefaultImpl 来解决第一组错误,但现在我收到以下错误。我正在
我有一个逗号分隔的文件“myfile.csv”,其中第 5 列是日期/时间戳。 (mm/dd/yyyy hh:mm)。 我需要列出所有包含重复日期的行(有很多) 我正在通过 cygwin 为 WinX
我使用的是 MySQL 5.7。 我有一个表格如下: -------------------------------------------------- | id | currentcy_id |
所以我有一个像这样的 ng-repeat: Join Ride /md-switch> 但是,每个 md-switch 都有相同的模型,因此当我在 Control
据我了解, Mongoose 预保存 Hook 在将文档插入集合之前但在验证发生之后触发。因此,如果一次验证失败,则不会调用预保存 Hook 。 就我而言,无论如何都会调用它们: 下面的简单代码的作用
如果我对我的目标文件执行此 grep,我会得到例如 275 作为结果。 但是我想学习 awk,所以在 awk 中尝试了这个: awk 'BEGIN { count=0 } /my pattern/
我是一名优秀的程序员,十分优秀!