As was pointed out by werk, natural armor spikes have millions of years worth of design testing- they do keep predators large enough to eat you from eating you...
at least, easily.
Anklyosaurs, Puffer fish of various kinds, Urchins, and Porcupines all had their predators with specialized tactics for getting past their defenses...but MOST predators just don't mess with them unless absolutely, desperately hungry.
And yes, it is a size dependent defense. As the predator grows larger in comparison to the spikey prey, the less the spikes of the prey matter.
at least, easily.
Anklyosaurs, Puffer fish of various kinds, Urchins, and Porcupines all had their predators with specialized tactics for getting past their defenses...but MOST predators just don't mess with them unless absolutely, desperately hungry.
And yes, it is a size dependent defense. As the predator grows larger in comparison to the spikey prey, the less the spikes of the prey matter.