I was going through the document provided here: https://www.datastax.com/blog/2019/03/distributed-database-things-know-cassandra-datacenter-racks. It says that racks and data-centers are an abstraction rather than hard mapping to something physical. I also came across this:
A Cassandra rack is a logical grouping of Cassandra nodes within the ring. Cassandra uses racks so that it can ensure replicas are distributed among different logical groupings. As a result, operations are sent to not just one node, but multiple nodes, each on a separate rack, providing greater fault tolerance and availability.
My question is, if they are not replicated onto different physical nodes/racks then if one machine goes down then isn't it that all the logical "racks", "data-centers" will also become unavailable? I might be missing a lot of information around this but then again, I am not getting much clear picture after searching on this a lot.
You are absolutely correct. Cassandra allows you to specify logical data centers and racks, which should correspond to their physical counterparts.
But there's nothing forcing you to do this. You absolutely can opt to create multiple, logical data centers within a single physical data center. You can define each node with separate logical racks, which very well may be racked together. Further compounding that, all nodes could be instanced on the same hypervisor host.
In that case, if an entire DC, rack, or single host should go down, the cluster absolutely becomes unavailable.
I would advise against doing that, for obvious reasons. When I deploy in a cloud environment (internal or external), I make sure that I understand as much about the physical layer as possible. That way I am capable of architecting the logical data center abstractions to avoid physical, single points of failure.