Resilience in competitive markets