The Mytilidae, generally known as marine mussels, are known to attach to most substrates including stone, wood, concrete and iron by using a network of byssus threads. Mussels are subjected to severe mechanical impacts caused by waves. However, how the network of byssus threads keeps the mussel attached in this challenging mechanical environment is puzzling, as the dynamical forces far exceed the measured strength of byssus threads and their attachment to the environment. Here we combine experiment and simulation, and show that the heterogeneous material distribution in byssus threads has a critical role in decreasing the effect of impact loading. We find that a combination of stiff and soft materials at an 80:20 ratio enables mussels to rapidly and effectively dissipate impact energy. Notably, this facilitates a significantly enhanced strength under dynamical loading over 900% that of the strength under static loading.