This application discloses a multi-tenant task scheduling method and related apparatus, relating to the field of
cloud computing technology. It receives tasks to be scheduled and their
metadata, determines dynamic priority information, and sends the task to a target
priority queue if the tenant corresponding to the task has an effective quota. When a tenant has a concurrent consumption token in the target
priority queue, it acquires the token, executes the task, and then releases the token. This application sets different dynamic priorities for tasks to be scheduled, ensuring that tasks are distributed to resource-isolated independent queues, guaranteeing priority
processing of each task, and improving
resource utilization. Before task publication, sliding window
rate limiting is implemented, and tenant-level concurrent consumption tokens are distributed during task consumption, isolating tasks between tenants. In complex multi-tenant, high-
concurrency production scenarios, this enables intelligent task adjustment, significantly improving
resource utilization and scheduling efficiency.