HGT-Autoscaler: Dependency-Aware Proactive Scaling of Microservices Using Heterogeneous Graph Transformers
Autoscaling of microservice applications in containerized cloud environments remains a challenging problem due to complex inter-service dependencies, hierarchical deployment structures, and highly dynamic workloads. Existing autoscaling approaches are predominantly reactive or rely on homogeneous representations of system interactions, which limits their ability to anticipate load propagation across heterogeneous components such as services, message queues, and infrastructure layers. In this paper, we propose HGT-Autoscaler, a dependency-aware proactive autoscaling framework based on Heterogeneous Graph Transformers. The system is modeled as a multi-relational hierarchical graph that explicitly captures both service-level interactions and deployment structure across containers, virtual machines, and physical nodes. The proposed model leverages relation-aware attention mechanisms to learn expressive system representations and forecast resource requirements in a proactive manner. The autoscaling problem is formulated as a constrained optimization task that minimizes average response time under a given cost budget. Experimental evaluation on realistic microservice workloads demonstrates that the proposed approach significantly reduces latency and improves scaling stability compared to reactive and learning-based baselines, while maintaining cost efficiency.