Hi,
Firstly - these courses are excellent - thank you. I’m a MySQL guy attempting to bend my brain around document format db’s so apologies if my question is formatted incorrectly.
I’ve completed this course and although I hit a few issues on the way through, managed to find/undo/correct the process - primarily down to accidentally skipping a few chapters. However I’m trying to understand the following:
I have a 2 shard setup (as per the example) with a config server replication set and a single mongos looking at the config server. I can create a new db and have it sharded without a problem, but what if I don’t want to have the db sharded. Where does the data get stored?
I connect to mongos, use myNewDB, myNewDB.createCollection(“hello”) etc… I then add docs to this collection, but for the life of me can’t figure out where the data should get stored. Which one of the shards / replica sets? Or does it reside on the mongos? Before the sharding happens, where is the data?
I suspect if I knowingly want a non-sharded db, I should connect directly to one of the shard replication sets with a mongod but I’d like the definitive answer.
Thanks