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.
Madhu Chellapilla (Thu,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: