I am working on configuring MongoDB replica on EC2. I would like to adjust the automatic shape so that my nodes can easily rise and fall.
Can I use my own PHP driver to start sharding and add / remove nodes? If so, how?
Assuming you connected correctly mongos, you can use the MongoDB :: command () method :
mongos
$mongo->selectDB('admin')->command(array('addshard'=>'hostname:port'));