Microsoft Azure 存储与 Azure SQL 数据库

发布于 2024-09-13 13:51:18 字数 634 浏览 14 评论 0原文

我看到几个月前有人问过类似的问题,但它确实没有很好地解决我的情况。事情就是这样...

我正在从头开始构建一个基于 Web 的 .NET 应用程序,该应用程序有可能成为一个大容量网站(开始时每月有数十万页面浏览量),并且我正在强烈考虑使用 Microsoft Azure 来托管它。我还没有建造任何东西,仍在研究我的不同选择。

应用程序本身的核心是一个标准的 CRUD 应用程序,它作用于许多不同类型的实体(例如用户、订单、项目等)。可能有一些正在运行的后台进程和一些数据排队(例如,对于非实时更新,例如获取 SO 徽章),但与用户的大多数交互将是典型的 CRUD 类型的操作。

关于 Azure,我已经阅读了许多有关使用 Microsoft Azure 存储来存储事务数据的文章,并且正在强烈考虑这样做,而不是使用 Azure SQL DB。然而,我还没有看到或读过许多真实的人和/或真实的公司这样做的成功故事。因此,我想我应该联系 SO 社区,看看是否有人有使用 Microsoft Azure 存储的经验,你们有什么运气,我应该注意的任何问题,以及你们有任何最佳实践想出。

我已经阅读了大量的 Microsoft Azure MSDN 部分以及 Microsoft 的编程 Microsoft Azure Table API 文档。我正在寻找实用的建议、经验教训、最佳实践等。提前致谢!

I saw that there was a similar question asked several months back, but it really didn't address my situation well. Here it goes...

I'm in the process of building from scratch a web-based, .NET application that has the potential to become a high-volume site (several hundred thousand page views a month to start) and am strongly considering using Microsoft Azure to host it. I have not built anything yet and am still researching my different options.

The application itself is, at its core, a standard CRUD application that acts upon a number of different types of entities (e.g. user, order, item, etc.). There are probably some background processes that may be running and some queuing of data (for non-realtime updates -- like getting a SO badge, for example), but most of the interactions with the user will be your typical CRUD type of actions.

Regarding Azure, I have read a number of articles about using Microsoft Azure Storage to store transactional data and am strongly considering doing that instead of using Azure SQL DB. However, I haven't seen or read a number of success stories of real people and/or real companies doing that. So I thought I'd reach out to the SO community to see if anyone has had any experience with using Microsoft Azure Storage, what kind of luck have you had, any gotchas I should look out for, and any best practices that you've come up with.

I've read through a lot of the Microsoft Azure MSDN section and the programming Microsoft Azure Table API document from Microsoft. I'm looking for practical advice, lessons learned, best practices, etc. Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

深海不蓝 2024-09-20 13:51:18

Windows Azure 存储就像任何 NoSQL 存储一样。它适用于我们的大规模场景(每个用户提取数百万条记录)。然而,经典的 CRUD 方法有点难以扩展或适应这一点。

我建议开始研究CQRS 风格的架构。以下是一些可能帮助您入门的参考资料:

Windows Azure storage is just like as any NoSQL storage. It works in high-scale scenarios for us (pumping millions of records per user). However, classical CRUD approach is a bit hard to scale or to adapt to this.

I would recommend to start looking along the CQRS style of architectures. Here are some references that might get you started:

爱冒险 2024-09-20 13:51:18

取决于您所讨论的数据类型 - 通常存在高估交易数据需求的倾向。 1 GB SQL Azure 确实可以容纳大量数据(我们是 SAAS 提供商,几乎 20 个客户端的事务数据可以容纳这么多空间)。另外,由于一些奇怪的原因,我发现 SQL Azure 空间消耗似乎比我在本地看到的数据库的大小要小一些(可能与它们处理日志的方式有关,不确定)。现在 50 GB 是极限,坦率地说,这是巨大的。

然而,为此,您还需要考虑什么会增加空间使用量 - 在数据库中存储图像、视频或其他大型对象可能会导致空间消耗量大幅增加。最好将此类对象保留在 Windows Azure 中。

答案很简短 - 将事务数据保存在 SQL Azure 中,将非关系数据保存在 Windows Azure 中。使用 SQL Azure 还可以提高开发人员的工作效率,因为它在编程方面非常熟悉。对待 Windows Azure 的方式与对待 Windows 本地文件存储的方式类似,但还有一些额外的好处(支持基本表结构)。

Depends on what kind of data you are talking about - generally there is a tendency to overestimate transactional data requirements. A lot of data can really be fit into a 1 GB SQL Azure (we are a SAAS provider and transactional data of almost 20 clients can fit into that much space). Also, for some strange reason, I have seen that SQL Azure space consumption seems to be somewhat lesser than the size of the database I see on-premises (might have to do with how they handle logs, not sure). And now 50 GB is the limit, which is quite frankly, HUGE.

However for this, you also need to consider what increases the space usage - storing images, videos or other large objects in the database can create considerable increase in space consumption. It is better to keep these kind of objects in Windows Azure.

So short answer - keep transactional data in SQL Azure and non-relational data in Windows Azure. Working with SQL Azure will also keep your developers more productive, since it is quite familiar in terms of programming. Treat Windows Azure similar to how you would treat windows local file storage with some added benefits (basic table structures supported).

帥小哥 2024-09-20 13:51:18

另一件需要考虑的事情是您将从商店发送/接收的交易数量。 SQL Azure 的优点在于它是每月固定成本,如果您在同一数据中心内执行查询(即,从与 SQL Azure 数据库位于同一数据中心的 Windows Azure Web 角色),则有没有额外费用。

尽管 Windows Azure 商店的交易成本相当低,但如果您进行足够多的交易,则有可能增加成本。

Another thing to consider is the number of transactions that you will be sending/receiving from the store. The nice part about SQL Azure is that it is a fixed cost / month and if you are doing the queries within the same data center (i.e. from a Windows Azure Web role located in the same data center as your SQL Azure database) then there are no extra charges.

Even though the cost of the transactions to the Windows Azure stores are pretty low, it is something that has the potential of adding up if you do enough of them.

疯到世界奔溃 2024-09-20 13:51:18

在决定使用 Azure 存储或 SQL 存储之前,还应该检查数据使用模式。
由于 Azure 存储提供 NoSQL 解决方案,因此它们更适合非报告基础要求。这里的reporting并不是指报告,而是意味着Azure存储的查询能力是有限的,无法针对各种查询场景进行优化。
通过 CQRS 架构,CRUD 和报告操作是解耦的,因此可以实现 Azure 存储和 Azure SQL 的混合匹配。

You should also check your data usage pattern before deciding to use Azure Storage or SQL storage.
Since Azure Storage is providing NoSQL solutions they are more geared towards non reporting base requirements. Here reporting does not mean reports but it implies that querying capabilities of the Azure storage is limited\ non optimize for various querying scenarios.
With CQRS architecture the CRUD and Reporting operations are decoupled and hence a mix n match of both Azure Storage and Azure SQL can be done.

溺孤伤于心 2024-09-20 13:51:18

另一个查找信息的地方是跳出 Windows Azure 选项并查看 AWS 的选项。 S3 & SimpleDB 选项已经过较长时间的审查,并且网络上有许多其他成功案例。然而,S3 & SimpleDB 在功能上与 Windows Azure 存储表和 Blob 存储非常相似。如果您正在考虑这些结构所针对的真正的大数据,那么一定要查看 AWS 选项。如果只是作为围绕大数据构建的现有解决方案的参考点。

至于 SQL Azure,它非常适合大量事务,保持较低的事务成本,并维护基于关系数据的关系和总体完整性。然而,如果您要拥有大量数据,那么就直接瞄准大数据结构,例如 Windows Azure Table 或 Amazon 的 SimpleDB。

Another place to find information is to step outside of the Windows Azure options and look at AWS's. The S3 & SimpleDB options have been vetted over a longer period of time and have many additional success stories out there on the web. However, S3 & SimpleDB are very similar in functionality to Windows Azure Storage Table and Blob Storage. If you're thinking about truly big data, which these structures are for, definitely check out the AWS options. If only for a reference point on existing solutions built around big data.

As for SQL Azure, it is great for lots of transactions, keeping transaction costs low, and maintaining relationships and general integrity based on relational data. However, if you are going to have massive volumes of data, just go ahead and aim for the big data structures, such as Windows Azure Table or Amazon's SimpleDB.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文