gpt4 book ai didi

amazon-web-services - 亚马逊 s3 重命名 Key Name 误解

转载 作者:行者123 更新时间:2023-12-04 08:19:45 25 4
gpt4 key购买 nike

来自他们的 docs
他们给出了一个很好的实现的例子:

examplebucket/animations/232a-2013-26-05-15-00-00/cust1234234/animation1.obj examplebucket/animations/7b54-2013-26-05-15-00-00/cust3857422/animation2.obj examplebucket/animations/921c-2013-26-05-15-00-00/cust1248473/animation3.obj examplebucket/videos/ba65-2013-26-05-15-00-00/cust8474937/video2.mpg examplebucket/videos/8761-2013-26-05-15-00-00/cust1248473/video3.mpg examplebucket/videos/2e4f-2013-26-05-15-00-01/cust1248473/video4.mpg examplebucket/videos/9810-2013-26-05-15-00-01/cust1248473/video5.mpg examplebucket/videos/7e34-2013-26-05-15-00-01/cust1248473/video6.mpg examplebucket/videos/c34a-2013-26-05-15-00-01/cust1248473/video7.mpg



我只是不明白这是一个高性能文件命名的好例子

如果亚马逊选择前 4 个字符作为 key ,那么我们这里只有 2 个 key ,这很糟糕
  • 动漫
  • 视频

  • 所以我错过了什么?

    最佳答案

    我相信解释就在这里,来自同一页面:

    This example illustrate how Amazon S3 can use the first character of the key name for partitioning, but for very large workloads (more than 2000 requests per seconds or for bucket that contain billions of objects), Amazon S3 can use more characters for the partitioning scheme. Amazon S3 can automatically split these partitions further as the key count and request rate increase over time.



    这意味着(这是我们真正可以继续下去的全部内容,因为 S3 的内部结构不是公开信息)是,在必要时,S3 会根据工作负载自动拆分索引分区,以减少热点......但是,如果您不提供明显的逻辑“分割点”——例如在键空间中的给定点引入一些伪随机性,则算法将没有任何基于这种分割的依据。

    任何时候值有点单调递增,算法无法将一个分区分成两个分区,这样当对象以键顺序或接近键顺序创建时,每个分区都会看到大致相等的写入工作负载。

    固定点的随机性为算法提供了一个更清晰的分割目标,显然该点可以在关键的任何地方,而不仅仅是在开始时。

    相反,在这个例子中,你在动画和视频之间提供了一个简单而明显的分割点……第一个分割点可能就在第一个角色上,这可能就足够了……但如果不是,那么很明显在动画/或视频/...或两者的末尾再次分割点。然后,如果需要,可以随后再次拆分这些分区中的任何一个,以适应您提供的流量。

    我进一步建议这主要是学术讨论,除非您计划持续每秒数百个请求的工作负载。使用有用且有意义的约定创建的键来存储您的对象,适本地——但不过分——考虑这些准则。

    关于amazon-web-services - 亚马逊 s3 重命名 Key Name 误解,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34323667/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com