开发者

Config MongoDB Servers

Following the Oreily Scaling MongoDB book, I saw the following command:

Let’s say we have three data centers: one in New York, one in San Francisco, and one on the moon. We start up one config server in each center.

$ ssh ny-01
ny-01$ mongod
$ ssh sf-01
sf-01$ mongod
$ ssh moon-01
moon-01$ mongo开发者_运维技巧d

$ ssh ny-02

ny-01$ mongos --configdb ny-01,sf-01,moon-01 Press Enter, and now all the config servers know about each other. The mongos is like the host of the party that introduces them all to each other.

Question:

Does ny-01, sf-01, and moon-01 mean the machine name or machine IP address?


In the book example, hostname. I believe you can use either, but use IPs in order to avoid having to resolve them, and to be sure that any failure is not due to hostname resolution issues.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜