Collective phenomena in pp and ep scattering