How did the Diplodocus defend itself against predators?

The Diplodocus defended itself primarily through its sheer size and powerful, whip-like tail. He could swing his tail at great speed to fend off attackers or inflict serious injury. Herding also offered protection.