Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1832

Internal / External ips for replica set deployed in AWS

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Hi, I have a question.

      We deploy replica sets in AWS and want to be able to connect to them from outside.

      Right now we give them internal domain names that point to internal AWS ip addresses, like:

      internal-a.xxx.yy => 10.10.10.0
      internal-b.xxx.yy => 10.10.10.1
      internal-c.xxx.yy => 10.10.10.2
      

      And we configure replica set with these domain names.

      We also give them external domain names that point to external AWS ip addresses, like this:

      external-a.xxx.yy => 111.111.111.0
      external-b.xxx.yy => 111.111.111.1
      external-c.xxx.yy => 111.111.111.2
      

      So, when we try to connect to the replica set from outside of AWS (from dev machines) from python or node driver using connection string like mongodb://external-a.xxx.yy,external-b.xxx.yy,external-c.xxx.yy?replicaSet=name it still takes member's domain names from replset configuration. And we can't use internal names in connection string cause they point to internal ips.

      So we need to use a workarounds / hack, like patching hosts files, etc... Is there supposed to be a better way of doing this?

            Assignee:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Reporter:
            sunrize531@gmail.com Ivan Filimonov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: