arXiv:2608.26573cs.DCAug 2026

Manuscript Offprint

arXiv:2608.26573

Optimizing API Gateway Placement in Multi-Cloud Kubernetes

Vinoth Punniyamoorthy, Murali Shankar Dulam, Aswathnarayan Muthukrishnan Kirubakaran, Akshay Deshpande, Nachiappan Chockalingam, Bikesh Kumar, Naga Surya Pasupuleti, Narender Reddy Bitla

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Vinoth Punniyamoorthy Murali Shankar Dulam Aswathnarayan Muthukrishnan Kirubakaran Akshay Deshpande

Texas, USA

Texas, USA

0009-0009-3719-4949

0009-0000-7231-834X

California, USA

0009-0006-6652-2663

California, USA

0009-0002-3007-3393

Nachiappan Chockalingam

Massachusetts, USA

0009-0007-4275-3771

Bikesh Kumar

Texas, USA

0009-0009-7190-1862

Naga Surya Pasupuleti

Texas, USA

0009-0001-0823-2186

Narender Reddy Bitla

Texas, USA

0009-0002-6862-3557

Abstract—The use of API gateways within geographically distributed multi-cloud Kubernetes clusters poses a tradeoff between infrastructure cost, computational resources, and network latencies. We present an optimization formulation that addresses API gateway placement as a capacitated facility location problem that jointly determines which candidate clusters to activate, how many gateway replicas to deploy, and how regional traffic should be distributed across the selected clusters. The formulation imposes an upper bound on estimated client-to-cluster network round-trip latency, excluding gateway processing, queuing, and backend-service latency, and incorporates a utilization headroom factor for gateway replica capacity. We present both a mixed-integer linear programming (MILP) formulation and a constructive greedy heuristic that ranks candidates according to incremental cost, comprising cluster-activation and marginal replica costs, per unit of assignable capacity while explicitly accounting for already-committed load. Both formulations are applied to deterministic, seed-controlled, geography-based synthetic instances. For each problem size, 30 instances are generated with random seeds to analyze their performance. The greedy algorithm achieves an optimality gap of 3.2% to 4.7% to the MILP optimal solution, with a maximum observed gap of 25.0% for one particular instance, and a speedup of approximately 660× to 3,490× for 3 to 12 candidate clusters. In a canonical 10-candidate, 10-demand region instance, MILP-optimal deployment saves 24.2% in terms of monthly cost compared to the full-replication baseline. On the other hand, selecting the single cheapest candidate yields savings of 24.8% compared to the MILP optimum but does not satisfy the latency requirement for 3 out of 10 demand regions. Cutting the latency budget in half leads to an increase in the modeled cost by 15.1%, and the optimal number of clusters is expanded to 5 from 3. The results above are generated using synthetic planning instances, and hence they represent a proof-of-concept rather than indicative production cost or latency improvements.

Index Terms—API gateway, cloud computing, cost optimization, Kubernetes, multi-cloud deployment

I. INTRODUCTION

API gateways provide a common entry point for authentication, authorization, rate limiting, routing, observability, and policy enforcement in cloud-native systems. As organizations deploy applications across multiple Kubernetes clusters, cloud providers, and geographic regions, gateway replicas may need to be placed near distributed client populations to satisfy network-latency requirements. Activating gateways in additional clusters, however, introduces fixed operational expense and per-replica compute cost. Platform teams must therefore balance geographic proximity, available capacity, and infrastructure cost when planning gateway deployments.

This paper investigates the following static planning problem: given a set of candidate clusters, regional request demand, deployment costs, replica capacity, and estimated client-to-cluster network latency, which clusters should host gateway replicas, how many replicas should each selected cluster run, and how should regional traffic be assigned? The objective is to minimize monthly deployment cost subject to capacity and per-region latency constraints.

In this paper, ℓij\ell_{ij} denotes an estimated client-to-cluster network round-trip time, not complete end-to-end application response time; gateway processing, queueing, load-balancer, TLS handshake, and backend-service latency are outside the model. The formulation is a static planning model, not a runtime routing or autoscaling mechanism: autoscaling adjusts replica counts within an already-selected cluster in response to live load, whereas this model decides which clusters should host capacity in the first place, on a planning cadence (e.g., quarterly). The MILP contains no redundancy, failure-domain, or cross-provider availability constraint, so no high-availability property should be inferred from a computed placement.

Existing studies have examined API gateway performance and cost trade-offs on fixed deployment platforms policy integration and enforcement in containerized environments [1], and SLO-aware or cost-sensitive autoscaling of containerized workloads within individual Kubernetes clusters [2], [3]. However, these approaches do not jointly determine gateway placement and replica allocation across heterogeneous multi-cloud Kubernetes clusters while explicitly considering both latency-SLA feasibility and deployment cost. None of these jointly optimize gateway location, replica count, and regional traffic assignment across candidate clusters. Capacitated facility location with distance- or latency-restricted assignment is a long-studied combinatorial problem [4] that underlies content-delivery replica placement [5], [6], geographic k-center placement [7], response-time-optimized distributed cloud resource allocation, geo-distributed data placement, virtual network function placement in multi-cloud service chains, and SLA- or QoS-aware service placement in edge-cloud continuum systems. We adapt this established problem structure to API gateway replica placement specifically; the contribution is this adaptation and its empirical evaluation, not a new class of optimization problem. Kubernetes-native scheduling surveys address a related but distinct problem: placing pods onto nodes within a cluster, rather than deciding which geographically distributed clusters should host a service at all.

This paper makes three significant contributions. First, we transform the multi-cloud API gateway placement into a capacitated facility location problem subject to a hard latency constraint per region and headroom ratio of replica utilization. This problem formulation is done through a mixed-integer linear programming (MILP) approach in which the units of the model are well specified and the feasibility verification process is just needed. Second, we design a simple greedy algorithm taking into account the assigned load and sorting the candidate clusters in descending order based on the increment of their cost. This cost is made up of the activation cost as well as the incremental cost due to replica installation per unit of available capacity along with the worst case of runtime. Third, we conduct extensive experiments, with 30 different seeds for each problem sizes, giving average, median, dispersion, and range of the optimality gap and runtime values.