Resilience and the Behaviour of Large-scale Ecosystems