views:

29

answers:

1

This sounds kinda dumb, but I have a sharded DB that I no longer think I need to run on 2 machines, and would like to run on one single machine instead.

Any ideas on how that can potentially be done? There are lots of resources on how i can achieve the converse, but very little on how this can be done

+1  A: 

If you're moving two separate database processes (and their storage) to a single machine, you pretty much have two options

  1. Start the executable for the database twice, each from different config files (which specify different ports). The client will need to be able to connect to the two instances on their respective ports. Depending on your database and operating system, this might not be possible.
  2. Run two virtual images, on per db/shard. The client connects to each by whatever IP address you configure the VM to have.
Dave W. Smith
thanks dave! very much appreciate it. The first option looks more likely.
ming yeow