为网络守护程序选择哪个 noSQL 数据库?

发布于 2024-10-23 23:27:06 字数 344 浏览 8 评论 0原文

我正在编写一个自定义服务器,它应该非常高性能。 它有 100.000-600.000 个连接的客户端,并且存储了大约 1000 万条记录。 数据库将在单个服务器上运行。

服务器代码是通过twisted框架(Python)实现的。 现在我让它使用 MySQL,但我认为 NoSQL 数据库会更高效(没有复杂的查询,许多简单的写入/时间戳更改和许多简单的读取)。

我应该选择哪种 NoSQL 数据库?简单的索引将是一个优点,我希望能够选择从管理系统搜索数据库,从包含特定关键字和类似内容的日志创建组。

我查看了 Cassandra 和 MongoDB,MongoDB 对我来说似乎更容易进入/使用。

感谢您的帮助!

I am writing a custom server, which should be very performant.
It has 100.000-600.000 clients connected, and like 10 million records stored.
Database will run on a single server.

The server code is realized via twisted framework (in python).
Now I had it use MySQL, but I think a NoSQL database would be much more efficient (no complex queries, many simple writes / timestamp changes and many simple reads).

Which NoSQL database should I go for? Easy indexing would be a plus, I want the option to search the database from an administration system, create groups from logs containing a specific keyword and stuff like that.

I had a look at Cassandra and MongoDB, MongoDB seemed easier to get in / use for me.

Thanks for the help!

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

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

发布评论

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

评论(3

夏至、离别 2024-10-30 23:27:06

就纯粹的学习曲线而言,MongoDB 将自己定位为 MySQL 的一个非常友好的替代品。 Cassandra 是一个非常不同的野兽,并且具有更高的学习曲线。也就是说,根据您的描述,两者都有可能解决您的问题。

As far as pure learning curve goes, MongoDB has positioned itself to be a very friendly alternative to MySQL. Cassandra is a very different beast and will have a higher learning curve. That said, both have the potential to solve your problem based upon what you describe.

落叶缤纷 2024-10-30 23:27:06

您的需求非常简单:轻松索引、任意搜索、按关键字分组等——几乎每个 NoSQL 系统都可以工作。这实际上取决于您熟悉的技术。喜欢 C# 吗?然后使用 RavenDB——它甚至可以在您执行查询时自动添加索引。像二郎那样?那你就是个怪胎,但你应该选择 CouchDB。喜欢 JavaScript 和 JSON?使用 MongoDB。

就我个人而言,我真的很喜欢 Mongo,因为它感觉像是 SQL 和 NoSQL 数据库的可爱混合体。您可以对其进行索引(并获得惊人的性能!),这使得它几乎像一个 RDBMS。你还可以像键/值存储一样使用它,像“天空中的巨型哈希表”一样使用它。尽管如此,YMMV。和他们一起玩,看看什么对你有用。

You have pretty simple requirements: easy indexing, arbitrary searches, grouping on keyword, etc -- pretty much every NoSQL system would work. It really comes down to the technologies with which you're comfortable. Like C#? Then go with RavenDB -- it can even automatically add indices as you execute queries. Like Erlang? Then you're a freak, but you should go with CouchDB. Like Javascript and JSON? Go with MongoDB.

Personally I really like Mongo, as it feels like a lovely hybrid of SQL and NoSQL databases. You can index the hell out of it (and get amazing performance!), which makes it almost like a RDBMS. You can also use it like a key/value store, and use it like a "giant hashtable in the sky". Still, YMMV. Play with them and see what works for you.

谎言月老 2024-10-30 23:27:06

Cassandra 确实是为多个服务器节点设计的,提供透明的复制。因此,您无法通过单个服务器主机获得最大价值。 Cassandra 也主要是为大规模而设计的(因此牺牲了索引和灵活的查询)。 1000 万条记录实际上并不是很大,因此您可以尝试更灵活但可扩展性较差的方法。

Cassandra is really designed for multiple server nodes, providing transparent replication. So you won't get the best value out of it with a single server host. Cassandra is also designed primarily for large-scale (and sacrifices indexing and flexible queries as a result). 10 million records isn't really very big, so you can afford to try something more flexible but less scalable.

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