Handling scarce resources with limits and quotas