Self-Optimizing API Fabrics: Agentic AI-Driven Dynamic Orchestration of REST and gRPC
Abstract
REST and gRPC dominate modern service-to-service communication in cloud-native systems. REST offers debuggability and compatibility, while gRPC provides superior latency and throughput. However, production systems operate across heterogeneous networks, fluctuating loads, partial failures, and evolving proxies and service meshes, where the best protocol can change minute-to-minute. This paper introduces Self-Optimizing API Fabrics (SOAF), a novel architecture in which an agentic AI controller autonomously selects REST or gRPC per request, per service, and per time window using live telemetry. We formalize protocol selection as a constrained optimization problem over latency, error rate, and cost, implement a multi-agent control loop, and evaluate the approach on a microservice testbed with injected network impairments. Our results show that SOAF significantly reduces tail latency and error rates compared to static REST-only and gRPC-only policies, demonstrating that API transport selection should be treated as a runtime control problem rather than a design-time choice.
Fields of Study & Subjects
Software System Performance and Reliability
Service-Oriented Architecture and Web Services
Cloud Computing and Resource Management
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 15 January 2026
- Language
- EN
- Document type
- Preprint