scieee Science in your language
[en] (orig)

On the stability of the Kubernetes Horizontal Autoscaler control loop

Author: Serracanta Pujol, Berta,Lukács, Andor,Rodríguez Natal, Alberto,Cabellos Aparicio, Alberto,Rétvári, Gábor
Publisher: Institute of Electrical and Electronics Engineers (IEEE)
Year: 2025
DOI: 10.1109/ACCESS.2025.3526751
Source: https://upcommons.upc.edu/bitstream/2117/426782/1/On_the_Stability_of_the_Kubernetes_Horizontal_Autoscaler_Control_Loop.pdf
Recei ed 22 No embe 2024, accep ed 27 Decembe 2024, da e o publica ion 7 Janua y 2025, da e o cu en e sion 13 Janua y 2025.
Digi al Objec Iden i ie 10.1109/ACCESS.2025.3526751
On he S abili y o he Kube ne es Ho izon al
Au oscale Con ol Loop
BERTA SERRACANTA 1, ANDOR LUKÁCS 2, ALBERTO RODRIGUEZ-NATAL 3,
ALBERT CABELLOS1, AND GÁBOR RÉTVÁRI 4, (Membe , IEEE)
1Depa men o Compu e A chi ec u e, Uni e si a Poli ècnica de Ca alunya, 08034 Ba celona, Spain
2Facul y o Ma hema ics and Compu e Science, Babeş-Bolyai Uni e si y, 400084 Cluj-Napoca, Romania
3Cisco, 28108 Mad id, Spain
4Depa men o Telecommunica ions and A i icial In elligence, Budapes Uni e si y o Technology and Economics, 1111 Budapes , Hunga y
Co esponding au ho : Be a Se acan a ([email p o ec ed])
This wo k was suppo ed in pa by he Spanish I+D+i P ojec TowaRds ully AI-empowe ed Ne woRks, subp ojec A (TRAINER-A),
unded by Minis e io de Ciencia e Inno ación (MCIN)/Agencia Es a al de In es igación (AEI)/10.13039/501100011033 unde G an
PID2020-118011GB-C21; in pa by he Ca alan Ins i u ion o Resea ch and Ad anced S udies (ICREA) h ough he Sec e a ia o
Uni e si ies and Resea ch o he Minis y o Business and Knowledge o he Go e nmen o Ca alonia; in pa by he Eu opean Social
Fund; and in pa by he Na ional Resea ch, De elopmen and Inno a ion Fund o Hunga y unde G an OTKA/ANN-135606, G an
OTKA/FK-135074, and G an OTKA/FK-134604.
ABSTRACT Kube ne es is a widely used pla o m o deploying and managing con aine ized applica ions
due o i s e icien elas ic capabili ies. The Ho izon al Pod Au oscale (HPA) in Kube ne es independen ly
adjus s he numbe o pods o each se ice, ye hese se ices o en ope a e in an in e connec ed manne .
This s udy aims o unde s and he e ec s o au oscaling e en s on a g aph o in e connec ed se ices.
To achie e his, we apply con ol heo y o model he HPA’s beha io . We analyze he s abili y o his
model, pe o m nume ical simula ions, and deploy a eal es bed o e alua e he pe o mance. Ou indings
demons a e ha he con ol heo y-based model accu a ely p edic s he HPA’s beha io , ensu ing sys em
s abili y wi h CPU u iliza ion mee ing desi ed h esholds and no a ic loss a e a ansi ional pe iod.
The model p o ides insigh s in o op imizing esou ce scheduling and imp o ing applica ion pe o mance
in Kube ne es en i onmen s. Addi ionally, we ex end ou model o he whole se ice g aph o unde s and
how indi idual scaling decisions in luence he complex g aphs o cloud applica ions.
INDEX TERMS Cloud au oscaling, con ol heo y, Ho izon al Pod Au oscale , Kube ne es, mic ose ices
a chi ec u e, nume ical simula ions, sys em s abili y.
I. INTRODUCTION
Kube ne es1has eme ged as a p e e ed pla o m o
deploying and managing con aine ized applica ions, c edi ed
la gely o i s e icien elas ic capabili ies. This has allowed
he pla o m’s widesp ead adop ion ac oss di e se indus ies,
wi h many leading o ganiza ions depending on i s obus
ea u es, which is a es amen o i s e ec i eness. I was
epo ed in 2023 ha 66% o cloud se ice consume s we e
using Kube ne es in p oduc ion [1], highligh ing i s pe asi e
adop ion and signi ican impac on he indus ial landscape.
The associa e edi o coo dina ing he e iew o his manusc ip and
app o ing i o publica ion was Libo Huang .
1Kube ne es: h p://kube ne es.io/
Kube ne es uns dis ibu ed applica ions ha a e ypically
implemen ed using he mic ose ice a chi ec u e [2]. Each
mic ose ice is designed o pe o m a speci ic business
unc ion and can be de eloped, deployed, and scaled
independen ly. Wi h his, one can desc ibe he a chi ec u e
in e ms o a se ice g aph, a collec ion o loosely-
coupled mic ose ices. In he se ice g aph each node is
a mic ose ice and edges exis when wo nodes exchange
in o ma ion. In his con ex Kube ne es’ elas ic esou ce
alloca ion sys em alloca es/dealloca es esou ces (e.g, CPU)
o each node using he Ho izon al Pod Au oscaling (HPA)
algo i hm [3].
Speci ically, HPA au oma ically adjus s he numbe
o pods, eplicas o he same se ice, by con inuously
7160
2025 The Au ho s. This wo k is licensed unde a C ea i e Commons A ibu ion 4.0 License.
Fo mo e in o ma ion, see h ps://c ea i ecommons.o g/licenses/by/4.0/ VOLUME 13, 2025
B. Se acan a e al.: On he S abili y o he Kube ne es Ho izon al Au oscale Con ol Loop
moni o ing speci ic me ics and scaling he se ice up o
down. This allows dynamic scaling o ma ch he demand,
p o iding be e applica ion pe o mance and esou ce u i-
liza ion o each o he indi idual se ices in a se ice g aph.
Each se ice in he g aph has i s own independen HPA
con ol loop, ensu ing ha scaling decisions a e ailo ed o
i s own speci ic me ics.
Despi e he bene i s o HPA in dynamically managing
esou ces, esea ch on scaling complex applica ions ol-
lowing se ice-based a chi ec u es has highligh ed se e al
challenges. One signi ican issue is he lack o accu a e
esou ce es ima ion models, which causes cu en app oaches
o equen ly in ol e cau ious and i e a i e adjus men s o
esou ce alloca ions [4]. In his pape we p esen a model o
Kube ne es se ices and use i o analyze he s abili y o he
applica ion se ice g aph when ope a ed by HPA’s Kube -
ne es algo i hm. We aim o unde s and i he au onomous
scaling decisions made o indi idual se ices can collec i ely
lead o a s able scaling e ec o he en i e applica ion,
o some unwan ed e ec s such as la ge-scale oscilla ions
eme ge. E en i a la ge chunk o cloud applica ions ely on
Kube ne es, and a lo o ocus has been pu on imp o ing
he esou ce alloca ion and pe o mance op imiza ion when
pe o ming au oscaling e en s [4],[5], li le esea ch e o
has been de o ed o o mally model Kube ne es’ HPA
beha io . Ou model speci ically ocuses on CPU-in ensi e
applica ions, demons a ing ha p ope ly managing CPU
bo lenecks is key o main aining pe o mance and ensu ing
sys em s abili y.
Fo his we employ con ol heo y p inciples. This model
ea s each se ice as a plan and he HPA algo i hm as he
con olle , wi h he con ol signal being he adjus men o
he numbe o pods based on he CPU u iliza ion eedback.
The main con ibu ions o his pape a e (1) he o mal
e i ica ion o he s abili y o he Kube ne es HPA con ol
loop o he single-se ice scena io and (2) an expe imen al
analysis o he s abili y and e iciency o HPA in he mul i-
se ice scena io.
The emainde o his pape is s uc u ed as ollows:
Sec ion II di es in o ela ed wo k, Sec ion III p esen s he
se ice model, Sec ion IV discusses he con ol heo y ame-
wo k and s abili y analysis, Sec ion Vp o ides expe imen al
esul s, and Sec ion VI p esen s he conclusions.
II. RELATED WORK
In his pape , we model he unc ionali y o he Kube ne es
Ho izon al Pod Au oscale (HPA). We examine how he
addi ion o emo al o pods impac s he pe o mance and
s abili y o he a ge ed se ice. Once we unde s and how
hese a ec s a pa icula se ice, we ex apola e he indings
o he en i e se ice g aph o s udy how an au oscaling e en
p opaga es h oughou i .
The e is ex ensi e li e a u e on models o he en i e se ice
g aph. These models can be classi ied in o wo main ypes:
whi e-box and black-box models, which espec i ely show o
hide he complexi ies o he uni s being modeled. To cap u e
all he laye s in ol ed in a mic ose ice applica ion, whi e-
box models o en use compu a ionally complex solu ions
such as laye ed queuing ne wo ks [6]. Ano he in e es ing
app oach is o model he se ice mesh sideca a ached o
each mic ose ice in he g aph [7] as an abs ac ion o he
whole mic ose ice. Black-box models, on he o he hand,
ypically apply ein o cemen lea ning (RL) echniques, such
as GNNs o SVMs, combined wi h online me ics acing [8],
[9],[10]. In bo h cases, hese models ocus on applying
op imiza ion echniques di ec ly o he modeled applica ion,
ei he o achie e be e esou ce alloca ion gua an eeing
s onge Se ice Le el Objec i es (SLO) o o un simula ions
in a digi al win. Howe e , we do no in end o model all he
complexi ies and laye s o a se ice g aph applica ion, om
he ke nel o use space. Ins ead, we ocus on modeling he
beha io o he HPA in each indi idual mic ose ice and hei
in e connec ions.
Ra he han modeling, many s udies ocus on enhanc-
ing he HPA h ough modi ica ions and op imiza ions o
o e come he adi ional app oach o o e p o isioning o
a oid SLO iola ions. These can be classi ied in o ou
di e en ca ego ies [4],[5] (and he e e ences he ein):
(i) ule-based au oscaling, common among cloud p o ide s;
(ii) ime se ies da a analysis; (iii) queuing ne wo k models;
and (i ) RL-based op imiza ions o a combina ion o se e al
o he echniques abo e [11]. As poin ed ou in [8], many
exis ing au oscale s manage esou ces o each mic ose ice
indi idually, which means he e is a possibili y o cascading
e ec s p opaga ed along he g aph and, in u n, pe o mance
deg ada ions. This is because hese au oscale s a e agnos ic
o changes in he wo kload o he g aph un il i eaches hem
di ec ly, becoming mo e se e e he deepe he mic ose ice
is loca ed.
We do no aim o modi y he exis ing au oscale bu
a he seek o unde s and he pa icula i ies and obus ness
o he de ac o Kube ne es HPA. This esea ch models CPU
luc ua ions d i ing HPA au oscaling e en s, no only on
indi idual mic ose ices bu ac oss he en i e g aph. Long
Sho -Te m Memo y (LSTM) and Ga ed Recu en Uni s
(GRUs) could be used o p edic hese changes by o ecas ing
incoming a ic load. Howe e , hei e ec i eness is limi ed
when clea co ela ions, like seasonal pa e ns, do no exis .
To he bes o ou knowledge, no p io wo k has ocused on
his speci ic objec i e.
III. SERVICE MODEL
We i s p esen he basic en i ies o he Kube nes au oscaling
sys em: he pod, he se ice and he Ho izon al Pod
Au oscale . These a e he en i ies ha we model using con ol
heo y, i s ly o a single se ice, and hen gene alized o a
whole se ice g aph.
A. THE KUBERNETES HORIZONTAL AUTOSCALER
A pod is he smalles deployable uni in Kube ne es and can
be hough o as a w appe a ound a single con aine . I is
deployed based on i s speci ied esou ce equi emen s and
VOLUME 13, 2025 7161
B. Se acan a e al.: On he S abili y o he Kube ne es Ho izon al Au oscale Con ol Loop
FIGURE 1. Mic ose ice model.
TABLE 1. Va iables and signals used in ou model.
limi s. A mic ose ice, also e e ed o as se ice, g oups
mul iple pods ha pe o m he same unc ions, p esen ing
hem as a single en i y.
The Kube ne es Ho izon al Pod Au oscale (HPA) dynam-
ically adjus s he numbe o pods alloca ed o a se ice.
Each se ice has one dedica ed HPA con ol loop, which
manages he numbe o pod eplicas unning based on
esou ce con igu a ion and eal- ime esou ce consump ion
me ics. By de aul , HPA can scale pods using CPU o
memo y u iliza ion me ics, wi h CPU usage being he mos
commonly used. HPA con inuously moni o s he se ice’s
CPU usage: i i exceeds a h eshold i adds new pods,
whe eas i he CPU usage d ops below he h eshold i e HPA
dec eases he numbe o unning pods o op imize esou ce
use. Managing he numbe o pods unning in a se ice can
be iewed as a con ol sys em, whe e he se ice ep esen s
he plan and HPA unc ions as he con olle , as illus a ed in
Figu e 1.
Table 1summa izes he no a ion used in he pape .
Va iables ela ed o a single mic ose ice sys em a e deno ed
wi hou a subsc ip (e.g., x[k]). Va iables wi h he same
meaning bu pe aining o a speci ic mic ose ice wi hin he
se ice g aph G(V,E) a e deno ed wi h a subsc ip i,i∈V
(e.g., xi[k]). Whe e V ep esen s he se o mic ose ices and
E he se o di ec ed edges indica ing in e ac ions be ween
hem.
B. MICROSERVICE MODEL
Below, we p o ide a o mal model o desc ibe each o he
componen s in he HPA con ol loop. Fi s we in oduce a
model o desc ibing he se ice’s esponse o he inpu load
in e ms o CPU consump ion.
When conside ing di e en app oaches o modeling, i is
impo an o accoun o he ade-o be ween he ease
o analysis and he modeling capabili ies and powe . Fo
example, a simple memo yless model desc ibing how he
a e age CPU u iliza ion o an se ice x[k] [pe cen age] a ies
wi h espec o he sys em’s incoming load q[k] [ eq/sec] and
he o al amoun o CPU (numbe o pod eplicas imes CPU
pe pod) assigned by he HPA con ol loop o he se ice u[k]
[mco e], would be he ollowing:
x[k+1] =γ(q[k])
u[k](1)
He e, γ(.) [mco e/ eq/sec] is a gene ic unc ion ha
desc ibes he ideal CPU equi emen he se ice needs o
p ocess a gi en load. In gene al, γmay be linea (see below),
i may desc ibe a diminishing e u ns cha ac e is ics o en
ound in p ac ice [12], o i may be any mono onically
inc easing unc ion. The essence o he mic ose ice model is
hen ha he a e age CPU u iliza ion x[k] in he k- h imes ep
equals he o al amoun o CPU γ(q[k]) equi ed o se e he
cu en load q[k] di ided by he o al CPU u[k] assigned by
he HPA con olle .
Un o una ely, his model, while o mally analyzable,
is memo yless (i.e., he ou pu depends only on he s a e
a he cu en imes ep k). Thus, i does no accoun
o c i ical pa ame e s shaping sys em dynamics, like he
impac o queue bu e ing (which is dependen on he s a e
in ea lie imes eps). The e o e, below we use a sligh ly
mo e complex non-linea ecu si e model inspi ed by Fini e
Impulse Response (FIR) sys ems in con ol heo y [13].
Equa ion 2gi es he gene al o m o he mic ose ice
model used h oughou his pape . He e, Ndeno es he o de
o he sys em and αna e he coe icien s ha weigh he
con ibu ion o CPU u iliza ion in he p e ious imes ep k−n
o he cu en s a e. Fo b e i y, we assume ha γ(.) is linea
hence o h.
x[k+1] =γ
N
X
n=0αnq[k−n]
u[k−n](2)
In he ollowing we assume a minimum h eshold o he
numbe o CPU uni s o 1 assigned pe each se ice. This
means ha each se ice e ains a leas one pod, e en in
he absence o incoming a ic. This assump ion is based
on he p ac ical need o ensu e se ice a ailabili y and
esponsi eness.
C. CONTROLLER MODEL
Nex , we o mally model he Kube ne es Ho izon al Pod
Au oscale (HPA) con ol loop. The HPA con ol loop aims
o main ain he CPU u iliza ion a ound a a ge le el by
con inuously adjus ing he numbe o pods based on he
CPU u iliza ion measu ed om he se ice. I he CPU
u iliza ion exceeds a gi en uppe h eshold hen HPA assigns
mo e pods o he se ice. Con e sely, i he CPU u iliza ion
7162 VOLUME 13, 2025
B. Se acan a e al.: On he S abili y o he Kube ne es Ho izon al Au oscale Con ol Loop
FIGURE 2. Se ice g aph model as a 2-se ice chain.
is below a lowe h eshold, HPA educes he numbe o
pods o op imize esou ce usage. This closed-loop sys em
ensu es ha he mic ose ice adap s o a ying loads while
main aining pe o mance and esou ce e iciency.
In ou model we ep esen he uppe and he lowe
h esholds wi h a single e e ence h eshold R(a use -
con igu able pa ame e ). Ou HPA model is hen a di ec
o mal ep esen a ion o he HPA con ol law speci ied in he
o icial Kube ne es documen a ion [14]:
u[k+1] =u[k]x[k+1]
R(3)
He e, u[k] [mco e] deno es he con ol inpu , which de e -
mines he o al CPU uni s assigned o he mic ose ice.
We quan i y he amoun o a ic y[k] a he se ice ou pu
in esponse o a gi en inpu load and he a ailable compu e
esou ces as ollows:
y[k+1] =min(q[k],q[k]
x[k]) (4)
D. SERVICE GRAPH MODEL
Nex we ex end he model o a concep ual applica ion
cons i u ed by mul iple linked mic ose ices, as illus a ed in
Figu e 2. This composi e model supposes a dis inc plan and
an HPA con ol loop o each mic ose ice. These elemen s
o m a mic ose ice g aph G(V,E), whe e G ep esen s a
oo ed Di ec ed Acyclic G aph (DAG) wi h he oo deno ed
by ∈V.
In his model, he ins an aneous p opaga ion o a ic
ac oss mic ose ices can be exp essed as in Equa ion 5,
which akes in o accoun ha he sys em can no p ocess mo e
a ic han he inpu load.
qj[k]=λijyi[k] (i,j)∈V(5)
He e, λij :(i,j)∈Vde ines he in ensi y o eques s
ansmi ed om mic ose ice i o j.
E. TRAFFIC LOSS
The s abili y o s abili y o he p oposed model will be
e alua ed based on a a ic loss me ic, which desc ibes he
esou ce de ici o he cu en CPU alloca ion. The a ic loss
me ic di[k] quan i ies he amoun o eques s he applica ion
is unable o p ocess due o he lack o a ailable CPU
esou ces:
di[k]=qi[k]−yi[k] (6)
In gene al, di[k]=0 means a pe ec CPU alloca ion,
while di[k]>0 indica es se ice deg ada ion and/o
in e up ion, a ec ing he o e all applica ion pe o mance.
The a ge o he HPA con ol loop is o d i e he sys em o a
s a e whe e he loss is ze o.
Simila ly, he agg ega ed a ic loss me ic o he se ice
g aph model, ep esen ed by he se V, is compu ed as he
sum o each o he loss a each se ice a a gi en ime s ep k:
d[k]=Pi∈Vdi[k]. He e, di[k] is he single se ice quali y
me ic as p e iously de ined.
IV. STABILITY ANALYSIS
In his sec ion, we p esen he main con ibu ion o he pape :
a o mal s abili y analysis o he single-se ice HPA con ol
loop in e ms o he a ic loss me ic. In he subsequen
sec ion we ex end he analysis o he mul i-se ice model
using nume ical e alua ions.
Fi s , we in oduce a simpli ica ion. In pa icula , since
ou app oach is highly non-linea we educe he gene al
mic ose ice model o a second-o de model. This means
ha he CPU dynamics is ully desc ibed by he coe icien s
α0and α1, plus he inpu q[.] and u[.] This simpli ica ion
allows us o inco po a e bo h he cu en CPU alue and he
alue om he p e ious ime s ep in o he model, p o iding a
balance be ween model accu acy and ease o analysis. The
p oposed con ol model has a ime complexi y o O(N2),
whe e N ep esen s he e alua ed ime s eps.
Theo em 1: Conside he sys em desc ibed by he
second-o de applica ion dynamics (2), he HPA con ol
law (3), and le he inpu be a s ep unc ion:
q[k]=(1 i k≥0
0 o he wise.
Assume x[k]∈(0,+∞) and u[k]∈(0,+∞),u[0] =1.
Then, he con ol sys em is globally asymp o ically s able,
i.e.:
1) The s eady s a e e o is ze o: limk→∞ x[k]−R=0.
2) The s eady s a e a ic loss is ze o: limk→∞ d[k]=0.
These condi ions de ine s abili y as a sys em ha allo-
ca es he exac amoun o esou ces equi ed o mee he
co esponding load by aligning he CPU consump ion wi h
he desi ed h eshold R. When he e is a misma ch be ween
he incoming load and he alloca ed esou ces, he sys em
compensa es by ei he adding o emo ing pods ensu ing ha
in s eady s a e he e a e he necessa y esou ces.
In o de o demons a e he p e ious s abili y de ini ions
we s a by analyzing he sys em bounda ies and con e gence
o he con ol signal u[k] and la e ex apola e he esul s o
ind he s eady-s a e e o and a ic loss.
P oo : Using B=γq[k]
R o de ine b0=Bα0and
b1=Bα1. Le b0,b1,u[0],u[1] ∈(0,+∞) and de ine he
VOLUME 13, 2025 7163
B. Se acan a e al.: On he S abili y o he Kube ne es Ho izon al Au oscale Con ol Loop
sequence (u[k])k∈Nby he ecu sion:
u[k+2] =b0+b1
u[k+1]
u[k],∀k∈N(7)
Then (u[k])k∈Ncon e ges o b0+b1.
Using he ans o ma ion u[k]=b0(1+z[k]), he ecu sion
becomes:
b0(1 +z[k+2]) =b0+b1
1+z[k+1]
1+z[k],
1+z[k+2] =1+b1
b0
1+z[k+1]
1+z[k],
z[k+2] =b1
b0
1+z[k+1]
1+z[k],∀k∈N.(8)
Nex , we in oduce a Lemma om p io wo k ha we use
o es ablish he main esul :
Lemma 1 (Theo em 6.3.3 o [15]): Le us conside he
a iables p,q,z0,z1∈(0,+∞) and de ine he sequence:
z[k+2] =p+qz[k+1]
1+z[k],∀k∈N.(9)
The unique posi i e equilib ium o his ecu sion is globally
asymp o ically s able i one o he ollowing wo condi ions
holds:
1) q<1;
2) q≥1 and ei he p≤qo q<p≤2(q+1).
Using he no a ions o Lemma 1, we ha e p=q=b1
b0.
The case b0>b1 ansla es o q<1, and he case b0≤
b1 ansla es o q≥1 and p=q. Thus, he sequence (z[k])k∈N
con e ges o e e y b0,b1,z0,z1∈(0,+∞) o he unique
posi i e equilib ium o he ecu sion which is b1
b0. This means
ha he sequence (u[k])k∈Ncon e ges o b0+b1.
Finally, by undoing he subs i u ions we ob ain ha
(u[k])k∈Ncon e ges o γq
R(α0+α1). In u n, he con ol
signal makes he plan (x[k])k∈Ncon e ge a he desi ed
s eady-s a e:
x[k]=γα0Rq[k]
γq[k](α0+α1)+α1Rq[k−1]
γq[k−1](α0+α1)=R
(10)
And consequen ly, we can demons a e ha in s eady
s a e we achie e null a ic loss wi h he ollowing simple
compu a ion:
lim
k→∞ d[k]=lim
k→∞ (q[k]−y[k])
=Q−lim
k→∞ min(q[k],q[k]
x[k])=0 (11)
Co olla y 1: Conside an applica ion g aph G(V,E) com-
posed o au onomous se ices ope a ing independen ly.
I e e y se ice in he g aph ul ills he equi emen s in The-
o em 1, hen he se ice g aph Gis globally asymp o ically
s able.
This co olla y ollows di ec ly om Theo em 1. I e e y
au onomous se ice in he g aph Gsa is ies he condi ions,
hen each se ice is s able, exhibi s no de ia ion e o , and
has no a ic loss in s eady s a e. Since hese se ices ope a e
FIGURE 3. Mic ose ice model pe o mance.
independen ly, hei s abili y ensu es he o e all s abili y o
he g aph G.
V. RESULTS
To u he illus a e he s abili y demons a ed h ough he
analy ical solu ions, his sec ion p esen s he esul s ob ained
om bo h nume ical simula ions and eal deploymen
expe imen s. These esul s p o ide g aphical insigh s ha
alida e he heo e ical indings on HPA s abili y.
A. NUMERICAL SIMULATIONS
We ha e conduc ed nume ical simula ions using Ma lab
Simulink [16] o bo h he mic ose ice model, wi h ime
complexi y O(N!), and he se ice g aph model. These
simula ions aim o isualize he s abili y beha io and
dynamic esponse o he Kube ne es HPA unde a ious
condi ions, p o iding a con olled en i onmen o e i y ou
heo e ical analysis.
Figu e 3shows he main signals o he mic ose ice model,
he incoming load q[k] (blue line), he CPU u iliza ion x[k]
( ed) and he con ol signal u[k] (g een line) discussed in
he p e ious sec ions o a use -de ined HPA h eshold o
R=0,8, meaning ha in s eady s a e we desi e an a e age
CPU u iliza ion o x[k]=0,8. I can be seen ha gi en
an inpu load he sys em eac s and s a s au oscaling by
alloca ing mo e CPU esou ces and educing hem un il he
desi ed s eady s a e is achie ed a k=14.
I is impo an o no e ha ypical alues o he
CPU- a ge ed HPA h eshold a e a ound 30%, as applica ions
in p oduc ion canno a o d o lose a ic and ypically
o e p o ision o p e en his. Howe e , o e i ica ion
pu poses, we use a h eshold o R=0.8 (80%) CPU
consump ion o obse e he model’s beha io unde mo e
s ess ul condi ions.
When we ex end hese esul s o he se ice g aph,
as depic ed in Fig. 4, we obse e ha he s abili y achie ed
by each independen and s able se ice is e lec ed in he
o e all sys em beha io . As shown, o each o he h ee
independen se ices deployed in a chain-like con igu a ion
he CPU u iliza ion ollows a simila pa e n o he esul s
achie ed in he mic ose ice model simula ions, meaning
ha all h ee o hem a e able o independen ly adjus hei
esou ces o each a s eady s a e wi hou being impac ed by
he au oscaling decisions o o he nodes in he g aph.
7164 VOLUME 13, 2025

B. Se acan a e al.: On he S abili y o he Kube ne es Ho izon al Au oscale Con ol Loop
FIGURE 4. Se ice g aph model pe o mance.
In summa y, hese esul s demons a e ha he en i e
sys em can each he desi ed s eady s a e a e a ansi ional
pe iod, whe e CPU u iliza ion aligns wi h he a ge h eshold
and a ic loss is elimina ed.
B. EXPERIMENTAL RESULTS
To e i y ou heo e ical analysis in a eal-wo ld scena io,
we deployed a Kube ne es es bed ocusing on he gene al
case o he se ice g aph model o a CPU-in ensi e
applica ion. This eal deploymen aims o obse e he HPA’s
pe o mance and s abili y in a p ac ical se ing, ensu ing
ha he analy ical and simula ion esul s hold ue in li e
en i onmen s.
The expe imen al se up comp ises h ee in e connec ed
mic ose ices con igu ed in a cascading opology, as de ailed
in [17]. Each se ice is CPU load gene a o ha , upon
ecei ing a eques , execu es a i hme ic ope a ions o 8ms.
The eques is hen o wa ded o he subsequen se ice in
he sequence.
We deployed Kube ne es’ HPA ( 2) on each mic ose ice.
HPA is con igu ed o au o-scale based on CPU consump ion
and con igu ed o igge an au oscaling e en o deploy
ano he eplica when CPU u iliza ion eaches 80% o he
eques ed 100mco e pe se ice. This mimics he p e ious
analysis o di ec compa ison.
To gene a e he eques s we use K6 [18], a well-es ablished
syn he ic load gene a o . Speci ically we de ine an ini ial
i ual spike o 20 use s ha pla eaus a 22 i ual use s.
In o al each expe imen s las s 20 minu es.
Figu e 5illus a es he CPU usage o each mic ose ice
in ol ed in ou sys em. The i s mic ose ice ini ially
ecei es he incoming load, leading o an ea ly ise in i s CPU
consump ion. As his se ice p ocesses he a ic, he load is
hen ans e ed o he second mic ose ice, which exhibi s a
simila inc ease in CPU usage. E en ually, he load eaches
he hi d and inal mic ose ice. The e ical lines ep esen
he ac i e pods o each se ice, highligh ing he poin s a
which CPU usage a each se ice mee s he Ho izon al Pod
Au oscale (HPA) h eshold, p omp ing an au oscaling e en
o deploy a new eplica.
I demons a es he impac o CPU sa u a ion on se ice
pe o mance. Un il a new eplica is success ully deployed, he
FIGURE 5. Kube ne es 3-Se ice chain deploymen pe o mance.
a ec ed se ice’s CPU emains sa u a ed, making i unable
o p ocessing addi ional incoming eques s. This esul s in
he loss o a ic. No ably, he eques ailu es s a when
au oscaling e en s a e igge ed. These losses emain un il
he deploymen o addi ional eplicas su icien ly inc eases
esou ce a ailabili y, allowing he sys em o manage he
incoming load e ec i ely.
These expe imen al esul s alida e he heo e ical model
and es bed con igu a ion. They demons a e ha he sys em
e ec i ely eaches he desi ed s eady s a e whe e CPU
u iliza ion mee s he h eshold and a ic loss is minimized
a e he ini ial ansi o y pe iod. This con i ms he p ac ical
applicabili y and eliabili y o he HPA unde eal-wo ld
condi ions.
VI. CONCLUSION
Kube ne es, wi h i s ex ensi e deploymen o e he pas
se e al yea s, has p o en o be a c ucial pla o m o man-
aging con aine ized applica ions in la ge-scale p oduc ion
en i onmen s [1]. Many o ganiza ions depend on Kube ne es
o i s obus and dynamic scaling capabili ies, unde sco ing
i s impo ance and e ec i eness.
This wo k no only models and alida es he s abili y o
HPA in bo h single and mul i-se ice scena ios bu also lays
he g oundwo k o u u e ad ancemen s in cloud applica ion
scaling and esou ce managemen . This can u he enhance
applica ion pe o mance in Kube ne es en i onmen s, i.e.,
by op imizing esou ce alloca ion and scheduling, which is
c i ical gi en he pla o m’s widesp ead indus ial adop ion.
In conclusion, ou esea ch builds on he ex ensi e use
and p o en success o Kube ne es and HPA in p oduc ion
en i onmen s. By add essing he analy ical gaps, we p o ide
ini ial s eps owa ds a mo e in-dep h s udy and open up
esea ch possibili ies in op imizing Kube ne es’ scaling
mechanisms.
ACKNOWLEDGMENT
The au ho s would like o exp ess hei g a i ude o he
edi o and he e iewe s o hei aluable commen s and
cons uc i e eedback. Thei insigh ul sugges ions ha e
g ea ly con ibu ed o he imp o emen o his manusc ip .
They deeply app ecia e hei ime and e o in e iewing hei
wo k.
VOLUME 13, 2025 7165
B. Se acan a e al.: On he S abili y o he Kube ne es Ho izon al Au oscale Con ol Loop
REFERENCES
[1] Cloud Na i e Compu ing Founda ion. (2023). 2023 Annual Su ey.
Accessed: May 29, 2024. [Online]. A ailable: h ps://www.cnc .io/ epo s/
cnc -annual-su ey-2023/
[2] T. Salah, M. J. Zeme ly, C. Y. Yeun, M. Al-Qu ay i, and Y. Al-Hammadi,
‘‘The e olu ion o dis ibu ed sys ems owa ds mic ose ices a chi ec u e,’’
in P oc. 11 h In . Con . In e ne Technol. Secu ed T ans. (ICITST),
Dec. 2016, pp. 318–325.
[3] B. Bu ns, J. Beda, K. High owe , and L. E enson, Kube ne es: Up and
Running, 3 d ed., New Yo k, NY, USA: O’Reilly Media, 2022.
[4] C. Qu, R. N. Calhei os, and R. Buyya, ‘‘Au o-scaling web applica-
ions in clouds: A axonomy and su ey,’’ ACM Compu . Su eys,
ol. 51, no. 4, pp. 1–33, Jul. 2018. [Online]. A ailable: h ps://doi-
o g. ecu sos.biblio eca.upc.edu/10.1145/3148149
[5] T. Lo ido-Bo an, J. Miguel-Alonso, and J. A. Lozano, ‘‘A e iew o
au o-scaling echniques o elas ic applica ions in cloud en i onmen s,’’
J. G id Compu ., ol. 12, no. 4, pp. 559–592, Dec. 2014.
C. Qu, R. N. Calhei os, and R. Buyya, ‘‘Au o-scaling web applica-
ions in clouds: A axonomy and su ey,’’ ACM Compu . Su eys,
ol. 51, no. 4, pp. 1–33, Jul. 2018. [Online]. A ailable: h ps://doi-
o g. ecu sos.biblio eca.upc.edu/10.1145/3148149
[6] E. Ince o, R. Pizziol, and M. T ibas one, ‘‘µOp : An e icien op imal
au oscale o mic ose ice applica ions,’’ in P oc. IEEE In . Con .
Au onomic Compu . Sel -O ganizing Sys . (ACSOS), Sep. 2023, pp. 67–76.
[7] X. Zhu, G. She, B. Xue, Y. Zhang, Y. Zhang, X. K. Zou, X. Duan,
P. He, A. K ishnamu hy, M. Len z, D. Zhuo, and R. Mahajan,
‘‘Dissec ing o e heads o se ice mesh sideca s,’’ in P oc. ACM Symp.
Cloud Compu ., New Yo k, NY, USA, Oc . 2023, pp. 142–157, doi:
10.1145/3620678.3624652.
[8] J. Pa k, B. Choi, C. Lee, and D. Han, ‘‘GRAF: A g aph neu al
ne wo k based p oac i e esou ce alloca ion amewo k o SLO-o ien ed
mic ose ices,’’ in P oc. 17 h In . Con . Eme g. Ne w. Exp. Technol., 2021,
pp. 154–167, doi: 10.1145/3485983.3494866.
[9] H. Qiu, S. S. Bane jee, S. Jha, Z. Kalba czyk, and R. K. Iye , ‘‘FIRM:
An in elligen ine-g ained esou ce managemen amewo k o SLO-
o ien ed mic ose ices,’’ in P oc. 14 h USENIX Symp. Ope a ing Sys .
Design Implemen . (OSDI), Aug. 2020, pp. 805–825. [Online]. A ailable:
h ps://www.usenix.o g/con e ence/osdi20/p esen a ion/qiu
[10] D. Bo sa i, W. Ce oni, L. Foschini, G. Ya G aba nik, L. Manca,
F. Pol onie i, D. Sco ece, L. Shwa z, C. S e anelli, M. To onesi, and
M. Zacca ini, ‘‘KubeTwin: A digi al win amewo k o Kube ne es
deploymen s a scale,’’ IEEE T ans. Ne w. Se ice Manage., ol. 21, no. 4,
pp. 3889–3903, Aug. 2024.
[11] A. U. Gias, G. Casale, and M. Woodside, ‘‘ATOM: Model-d i en
au oscaling o mic ose ices,’’ in P oc. IEEE 39 h In . Con . Dis ib.
Compu . Sys . (ICDCS), Jul. 2019, pp. 1994–2004.
[12] M. D. Hill and M. R. Ma y, ‘‘Amdahl’s law in he mul ico e e a,’’
Compu e , ol. 41, no. 7, pp. 33–38, Jul. 2008.
[13] A. Oppenheim, A. Willsky, and I. Young, Signals and Sys ems
(P en ice-Hall Signal P ocessing Se ies). Uppe Saddle Ri e , NJ,
USA: P en ice-Hall, 1983. [Online]. A ailable: h ps://books.google.es/
books?id=UQJRAAAAMAAJ
[14] Ho izon al Pod Au oscaling: Algo i hm De ails. Accessed: Jun. 28, 2024.
[Online]. A ailable: h ps://kube ne es.io/docs/ asks/ un-applica ion/
ho izon al-pod-au oscale/
[15] M. Kuleno ic and G. Ladas, Dynamics o Second O de Ra ional
Di e ence Equa ions: Wi h Open P oblems and Conjec u es, 1s ed., Boca
Ra on, FL, USA: CRC P ess, 2001, doi: 10.1201/9781420035384.
[16] Ma hWo ks, Inc., Na ick, MA, USA. (2022). Ma lab Ve sion: 9.13.0
( 2023a). [Online]. A ailable: h ps://www.ma hwo ks.com
[17] Kube ne es Ho izon al Au oscaling Benchma k. Accessed: May 2, 2024.
[Online]. A ailable: h ps://gi hub.com/ g0now/k8s-hpa-benchma k/ ee/
main? ab= eadme-o - ile
[18] K6. Accessed: May 2, 2024. [Online]. A ailable: h ps://k6.io/docs/
BERTA SERRACANTA is cu en ly pu suing he Ph.D. deg ee wi h
UPC Ba celonaTech. He esea ch ocuses on ne wo k-enabled applica ion
accele a ion, explo ing he in eg a ion o ne wo k and applica ion laye s, and
he op imiza ion o dis ibu ed sys ems o enhanced ope a ional e iciency.
ANDOR LUKÁCS ecei ed he Ph.D. deg ee in ma hema ics om U ech
Uni e si y. He is cu en ly a Lec u e wi h Babeş-Bolyai Uni e si y. His
esea ch in e es s include abs ac homo opy heo y, ope ads, dend oidal se s,
and me ic ixed poin heo y.
ALBERTO RODRIGUEZ-NATAL ecei ed he Ph.D. deg ee om
Ba celonaTech, wi h a hesis on so wa e-de ined ne wo king. He is a Senio
Technology Lead wi h he En e p ise Ne wo king CTO Team, Cisco, whe e
he wo ks in he in e sec ion o ne wo k and applica ions.
ALBERT CABELLOS ecei ed he Ph.D. deg ee in 2008. He has been
a Full P o esso wi h he Compu e A chi ec u e Depa men , Uni e si a
Poli ècnica de Ca alunya, since 2020. He is he co- ounde o Ba celona
Neu al Ne wo king (h ps://bnn.upc.edu/) and he NaNoNe wo king Cen e
in Ca alunya (h ps://www.n3ca .upc.edu/).
GÁBOR RÉTVÁRI (Membe , IEEE) ecei ed he M.Sc. and Ph.D. deg ees
in elec ical enginee ing om Budapes Uni e si y o Technology and
Economics (BME), and he D.Sc. deg ee om he Hunga ian Academy
o Sciences. He is cu en ly an Associa e Sys ems P o esso wi h he
Depa men o Telecommunica ions and A i icial In elligence, BME. He is
in e es ed in all heo e ical and p ac ical aspec s o dis ibu ed sys ems and
da a ne wo king.
7166 VOLUME 13, 2025