在Azure BLOB或CosmosDB上以varbinaryblob形式存储超过500 k +图像? [英] Storing over 500 k + images as varbinaryblob on Azure BLOB or CosmosDB?

查看:54
本文介绍了在Azure BLOB或CosmosDB上以varbinaryblob形式存储超过500 k +图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在UWP应用程序上工作,该应用程序从Azure下载图像.虽然图像的尺寸小于<2 MB,其数量超过500 k.目前,映像以varbinary的形式存储在Azure SQL中,这在数据库实例上消耗250 GB.我们需要将其移至延迟少,占用空间少的非关系数据存储中.这里的哪个选项(Azure BLOB或Cosmos DB)更合适.我们现在使用唯一的密钥从连接到Azure SQL的REST API下载图像,并且也想对新的数据存储采用类似的方法.听到使用这些存储库处理大量图像的人的消息,这将非常高兴?

I work on UWP app that downloads images from Azure . Although the size of image in < 2 MB , their number is over 500 k. Currently the images are stored in Azure SQL as varbinary .This is consuming 250 GB on the database instance.We need to move it to non relational data storage that has less latency , consumes less space in storage. Which option here (Azure BLOB or Cosmos DB) fits better.? We download the images from REST API connecting to Azure SQL right now using a unique key and want to follow a similar approach with the new data storage too .It will be great to hear from someone who have used these repositories to handle large number of Images?

推荐答案

更好"是一个见解.但是请考虑图像不是元数据-它们只是二进制文件,它往往是Azure存储(blob)的领域.SQL数据库和Cosmos DB都有特定的限制,您可能会发现尝试存储如此数量的二进制数据超出了这些限制.

"Better" is a matter of opinion. But consider that images aren't metadata - they're just binary, which tends to be the domain of Azure Storage (blobs). Both SQL Database and Cosmos DB have specific limits, and you may find yourself going beyond those limits trying to store such quantities of binary data.

进一步:将二进制数据(例如图像)存储在SQL DB或Cosmos DB中后,您别无选择,只能以编程方式检索所述内容(并受到在数据库/集合中设置的性能约束的约束).相比之下,Azure存储具有自己独立的扩展目标,可以直接访问对象(无论是公共的还是私有的+ SAS),并可以通过CDN进行缓存.

Further: Once you store binary data (such as images) in SQL DB or Cosmos DB, you have no choice but to programmatically retrieve said content (and be bound by the performance constraints you've set within the database / collection). In contrast, Azure Storage has its own independent scale targets, and objects may be accessed directly (whether public, or private + SAS), and cached via CDN.

最终,这将取决于您为应用选择的存储体系结构,但希望此信息对您有所帮助.

Ultimately this will come down to the storage architecture you choose for your app, but hopefully this info helps.

这篇关于在Azure BLOB或CosmosDB上以varbinaryblob形式存储超过500 k +图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆