Many pulsars are observed to ‘glitch’, i.e. show sudden jumps in their rotational frequency ν, some of which can be as large as Δν/ν ≈ 10−6–10−5 in a subset of pulsars known as giant glitchers. Recently, Pizzochero has shown that an analytic model based on realistic values for the pinning forces in the crust and for the angular momentum transfer in the star can describe the average properties of giant glitches, such as the inter-glitch waiting time, the step in frequency and that in frequency derivative. In this paper, we extend the model (originally developed in Newtonian gravity and for a polytropic equation of state) to realistic backgrounds obtained by integrating the relativistic equations of stellar structure and using physically motivated equations of state to describe matter in the neutron star. We find that this more detailed treatment still reproduces the main features of giant glitches in the Vela pulsar and allows us to set constraints on the equation of state. In particular, we find that stiffer equations of state are favoured and that it is unlikely that the Vela pulsar has a high mass (larger than M ≈ 1.5 M⊙).