[英]MongoDB on Azure worker role
I m developing an application using SignalR to manage websockets and allow my clients to dialog between each other. 我正在使用SignalR开发一个应用程序来管理网络套接字,并允许我的客户端彼此对话。
I m planning to host this back-office on an Azure worker role. 我打算将此后台托管在Azure工作者角色上。 As my SignalR requests carry data that is most of the time saved in the database, I m wondering if NoSQL's MongoDB instead of the classic SQL Server/Entity Framework couple should be a good approach.
由于我的SignalR请求所携带的数据大部分时间都保存在数据库中,所以我想知道NoSQL的MongoDB而不是经典的SQL Server / Entity Framework对应该是一个好方法。
Assuming that my application's data types will be strings for most of them, I think MongoDB will be a reliable and a performant solution, and it will allow me to get rid of Azure's SQL's database costs. 假设我的应用程序的数据类型将是其中大多数的字符串,我认为MongoDB将是可靠且高性能的解决方案,它将使我摆脱Azure的SQL的数据库成本。
For information, the Azure worker role will be running on a machine with the following hardware: 1 core CPU, 3.5GB RAM and 50GB SSD storage. 有关信息,Azure worker角色将在具有以下硬件的计算机上运行:1个核心CPU,3.5GB RAM和50GB SSD存储。
Do you think I m on a good start with this architecture ? 您认为我在这种体系结构方面有良好的开端吗?
Thanks 谢谢
Do you think I m on a good start with this architecture?
您认为我从这个架构开始吗?
In a word, no. 一言以蔽之。
A user asked a similar question regarding running Redis on Worker Roles - Setting up Redis on Azure cloud service worker role - all of the content on that Q/A is relevant in the MongoDb context. 用户询问有关在角色上运行Redis的类似问题- 在Azure云服务工作者角色上设置 Redis-该Q / A上的所有内容都与MongoDb上下文相关。
I'd suggest that you read my answer as it goes into more detail, but as an overview of why this is a bad architectural approach: 我建议您仔细阅读我的答案,但要概述为什么这是一种不良的架构方法:
If you are really fixed on using Mongo, I would suggest that you use a hosted solution such as MongoLabs (as suggested in earlier answers), or consider hosting it on Azure IaaS VM's. 如果您真的确定要使用Mongo,建议您使用托管解决方案,例如MongoLabs(如先前答案中所建议),或考虑将其托管在Azure IaaS VM上。
If you are not fixed on using Mongo, I would sincerely suggest that you look at Azure DocumentDb (also suggested above), Microsoft's Azure NoSQL offering - I have used it in several production systems already and it is certainly a capable NoSQL solution; 如果您对使用Mongo不满意,我会真诚地建议您查看Microsoft的Azure NoSQL产品Azure DocumentDb(也在上面建议)-我已经在多个生产系统中使用过它,并且它肯定是一个功能强大的NoSQL解决方案; granted, it may not have all of the features available with MongoDb.
当然,它可能不具有MongoDb的所有可用功能。
If you are looking at a NoSQL solution for caching of data (ie not long term storage), I would suggest you take a look at Azure Redis Cache, which is a very capable Redis offering. 如果您正在寻找一种用于数据缓存(即非长期存储)的NoSQL解决方案,我建议您看一下Azure Redis Cache,它是功能非常强大的Redis产品。
Azure has its own native NoSQL Document database called DocumentDB , have you had a look at it? Azure有自己的本地NoSQL Document数据库,称为DocumentDB ,您是否看过它? If I were you I would use DocumentDB unless there are some special requirements that you have that you have not mentioned, but from what little requirement info that you have posted DocumentDB would do just fine.
如果您是我,我将使用DocumentDB,除非您有一些未提到的特殊要求,但是从您发布DocumentDB的一点要求信息中就可以了。 I don't think that it is quite similar to MongoDB in terms of the basic functionality, see this article for a comparison between Azure DocumentDB and MongoDB .
在基本功能方面,我认为它与MongoDB不太相似,请参阅本文以了解Azure DocumentDB和MongoDB之间的比较 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.