gpt4 book ai didi

azure - 我应该使用一个还是多个 CloudBlobContainer 来存储图像?

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

我的应用程序中有一些图像类型,我想使用 CloudBlobContainer 来存储这些图像:

  • 相同类型的图像具有相同的图像尺寸。
  • 将有 +/- 10 种图像。
  • 每种类型的图片不超过 1000 张。
  • 通过图像的位置了解图像的类型对我来说非常重要。
  • 不同类别的图像可能会显示在一页上。

我想为每种图像类型创建单独的 blob 容器。这是正确的做法吗?

最佳答案

It is important for me to know the type of the image by it's location.

Images from different categories might be presented on one page.

据我所知,您可以使用名称中的路径信息来命名您的 blob(图像)。这将创建一个虚拟目录结构,您可以像传统文件系统一样管理和遍历它们。

https://<account>.blob.core.windows.net/<container>/photo01.jpg

https://<account>.blob.core.windows.net/<container>/2017/photo02.jpg

https://<account>.blob.core.windows.net/<container>/2017/02/photo03.jpg

你可以利用List Blobs可选prefix参数,可以过滤指定容器下名称以指定前缀开头的blob。

另外,正如这位官方document提到了 Azure 存储的可扩展性和性能目标:

Partitions affect load balancing and scalability for each of the storage services in the following ways:

Blobs: The partition key for a blob is account name + container name + blob name. This means that each blob can have its own partition if load on the blob demands it. Blobs can be distributed across many servers in order to scale out access to them, but a single blob can only be served by a single server. While blobs can be logically grouped in blob containers, there are no partitioning implications from this grouping.

在我看来,这两种选择都可以满足您的要求。关于Blob存储的更多详细信息,可以引用这个tutorial并选择您的开发语言以开始使用。

关于azure - 我应该使用一个还是多个 CloudBlobContainer 来存储图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42020362/

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