我可以启动简单、小型、单个 mongodb 实例,然后轻松切换到复制集,还是应该使其“可复制”?从第一天开始?

发布于 2024-12-26 04:19:33 字数 143 浏览 3 评论 0原文

我需要尽快把事情做好,现在就完成。

稍后,比如说一个月或更短的时间,或者更长的时间,我将希望将我的数据库复制到更多的机器上。

我想知道,我是否可以简单地开始处理我的单个实例,然后开始担心复制,或者我现在需要考虑一些事情,以便以后更容易复制。

I need to get things done, quick and fast and now.

Later on, down the road, say in a month or less, or more, I will want to have my database replicated in few more machines.

I wonder, if I can simply start working on my single instance, and start worrying about replication later on, or there are things I need to take into account now to make it easier to replicate later on.

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

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

发布评论

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

评论(2

半世蒼涼 2025-01-02 04:19:33

您通常可以稍后再担心。如果您切换到副本集,您将必须重新启动 mongod 进程并在那时设置副本集。如果您想避免这种情况,您还可以考虑在一台计算机上简单地运行 3 成员复制集,以避免以后出现任何麻烦。

这应该可以让您很好地了解优点/缺点: http:// www.mongodb.org/display/DOCS/Upgrading+to+Replica+Sets

You mostly can worry about it later on. If you switch to replica sets you will have to restart your mongod process and set up a replica set at that time though. If you want to avoid that you can also consider simply running a 3 member replication set on a single machine to save yourself any headaches later on.

This should give you a good overview of the pros/cons : http://www.mongodb.org/display/DOCS/Upgrading+to+Replica+Sets

沦落红尘 2025-01-02 04:19:33

要添加@Remon的答案,您甚至可以将系统从单个节点(或单个副本集)转换为集群,甚至无需重新启动 mongod 实例(不过,您必须重新启动应用程序)。

To add to @Remon's answer, you can even convert your system from a single node (or a single replica set) to a cluster, without even restarting your mongod instances (you'll have to restart your app, though).

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