The rise of edge computing poses resource management issues, especially in decentralized systems where scalability and responsiveness are crucial. This paper introduces a cost-driven framework for collaborative resource management using the marginal computing cost per user. It applies the economic principle of marginal cost to assess edge data centers’ (EDCs) ability to support more users, enabling efficient resource allocation. Simulations with PureEdgeSim and real-world data such as Alibaba Trace demonstrate substantial enhancements in resource use, latency, and active instance reduction, maintaining scalability and adaptability with high user demands.