SlideShare a Scribd company logo
1 of 10
David Papp
pappdav.com - @pappdav
Co-founder -
Kubernetes Node and Application scaling
(Auto)Scaling
Node Scaling
Units count * CPU resources
Units count * Memory resources
Application scaling
Question?
Kubernetes Node and Application scaling

More Related Content

What's hot

Arunraja Cloudera Hadoop
Arunraja Cloudera HadoopArunraja Cloudera Hadoop
Arunraja Cloudera Hadoop
Arunraja GVK
 

What's hot (10)

Accelerate Machine Learning on Google Cloud
Accelerate Machine Learning on Google CloudAccelerate Machine Learning on Google Cloud
Accelerate Machine Learning on Google Cloud
 
(CMP202) Engineering Simulation and Analysis in the Cloud
(CMP202) Engineering Simulation and Analysis in the Cloud(CMP202) Engineering Simulation and Analysis in the Cloud
(CMP202) Engineering Simulation and Analysis in the Cloud
 
Build, train, and deploy Machine Learning models at scale (May 2018)
Build, train, and deploy Machine Learning models at scale (May 2018)Build, train, and deploy Machine Learning models at scale (May 2018)
Build, train, and deploy Machine Learning models at scale (May 2018)
 
(BDT202) HPC Now Means 'High Personal Computing' | AWS re:Invent 2014
(BDT202) HPC Now Means 'High Personal Computing' | AWS re:Invent 2014(BDT202) HPC Now Means 'High Personal Computing' | AWS re:Invent 2014
(BDT202) HPC Now Means 'High Personal Computing' | AWS re:Invent 2014
 
Arunraja Cloudera Hadoop
Arunraja Cloudera HadoopArunraja Cloudera Hadoop
Arunraja Cloudera Hadoop
 
UberCloud Webinar ansys azure
UberCloud Webinar ansys azure UberCloud Webinar ansys azure
UberCloud Webinar ansys azure
 
HPC on AWS
HPC on AWSHPC on AWS
HPC on AWS
 
AI 클라우드로 완전 정복하기 - 데이터 분석부터 딥러닝까지 (윤석찬, AWS테크에반젤리스트)
AI 클라우드로 완전 정복하기 - 데이터 분석부터 딥러닝까지 (윤석찬, AWS테크에반젤리스트)AI 클라우드로 완전 정복하기 - 데이터 분석부터 딥러닝까지 (윤석찬, AWS테크에반젤리스트)
AI 클라우드로 완전 정복하기 - 데이터 분석부터 딥러닝까지 (윤석찬, AWS테크에반젤리스트)
 
Which Is Deeper - Comparison Of Deep Learning Frameworks On Spark
 Which Is Deeper - Comparison Of Deep Learning Frameworks On Spark Which Is Deeper - Comparison Of Deep Learning Frameworks On Spark
Which Is Deeper - Comparison Of Deep Learning Frameworks On Spark
 
20180309 DLIもくもく会 Deep Learning on AWS
20180309 DLIもくもく会 Deep Learning on AWS20180309 DLIもくもく会 Deep Learning on AWS
20180309 DLIもくもく会 Deep Learning on AWS
 

More from David Papp (6)

May Microservices Meetup for Budapest
May Microservices Meetup for BudapestMay Microservices Meetup for Budapest
May Microservices Meetup for Budapest
 
Microservices from operations aspect
Microservices from operations aspectMicroservices from operations aspect
Microservices from operations aspect
 
Microservices environment in production
Microservices environment in productionMicroservices environment in production
Microservices environment in production
 
Continuous Deployment with Containers
Continuous Deployment with ContainersContinuous Deployment with Containers
Continuous Deployment with Containers
 
Webkonf 2013
Webkonf 2013Webkonf 2013
Webkonf 2013
 
Continuous Deployment with Containers
Continuous Deployment with ContainersContinuous Deployment with Containers
Continuous Deployment with Containers
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Kubernetes Node and Application scaling

Editor's Notes

  1. Sziasztok! Papp David vagyok a Recart dolgozom.A kovetkeyo honapba lesz 2 eve. A regi nevunk GhostMonitor volt egy nagyobb brand valtason estunk at. Ha valaki esetleg nem hallot volna meg rolunk akkor azzal foglalkozunk ,hogy a webshopok konverziojat emeleljuk ami jelenti ,hogy minel tobb vasaroljuk legyen. Egy rovid cegtortent ,hogy mi mikent juttotunk el ide. Ugy-e aki nem ismer minket az felteszi a kerdest minek is van nekunk szuksegunk kontenerek vagy-e egyaltalan barmilyen microservices architecktura. Egyreszt gondoljatok bele milyen nehez dolgunk. Nah nem kell sajnalni mineket csak erdemes megerteni a problemankat. . Mi egy SaaS vagyunk amit az ugyfelek igenybe vehetnek. Nah mar most ha egy ugyfel beregisztral akkor mi nemtudunk rola semmit mennyi latogatja van mekkora forgalmat bonyolit le…stb. A mi kis tracking rendszerunk beepul a shopjaba automatan es hasznalja boldogan. Ez ahhoz hasonlo mint a google analytics amint barki betelepithet az oldalaba a legkisebbetol a legnagyobbig es ez meg se omlik ossze . Nah erre a problemara minekunk is fel kell keszulni mert mi sem ismerjuk a masik oldalt. Nagyabbol naponta 20-30 uj regisztracionk van es kb. 2500 aktiv e-commerce shopunk van ami b2b szektorba egy eleg szep szam.
  2. A rendszerhez persze adhatunk kezzel hozza nodeokat es a podokat is szabalyozhatjuk kezzel. De ez valjuk be nem tul hatekony modszer arra, hogy egy eles rendszert uzemeltesssunk.  Jo lenne valami automatikus rendszert hasznalni erre mert ha ejjel 3 kor fel kell azert kelni mert a rendszer eroforras hianyba szenved azt valszeg senki nem szeretne a terembe ulok kozul.  A kubernetesbe van megoldas az application es a node scalingre is.
  3. Miert van szuksegunk erre? Amennyiben a rendszert nem csak egy szemelyes felhasznalasra akkor szuksegunk lesz valami scaling megoldasra. Persze ott van a vertikalis skalazas de draga es nem lesz tul hosszu tavu sem es eleg sok problemaval jar egyutt.
  4. Node scaling A nodeok skalazasara 2 fajta modszer van jelen a kubernetesbe a tetris es a headroom. Mind kettonek van elonye es hatranya.  Ha uzleti oldalrol kozelitem meg a kerdest akkor koltseg szempontbol a tetris a jobb megoldas. Ha technologiai oldalrol kozelitem meg akkor pedig a headroom. De azert nem ennyire fekete-feher a dolog. Kezdjuk eloszor a tetris logikaval. Tetris Remelem mindenki ismeri a tetris nevu jatekot 😄. En anno eleg sokat jatszodtam vele. A kubernetesben levo tetris logika egyeszeru. Pont annyi eroforrast tart a rendszerben mint amennyire szuksege van.  Ennek pozitivuma nincs felhasznaltlan eroforras a rendszerben es igenyel a rendszer uj eroforrast ha szuksege van ra. A hatranya az, hogy amennyiben kapunk nagyobb terhelest vagy a rendszeren belul egy nagyobb eroforras igenyu feladat jelentkezik varni kell amig az uj nodeok bejonnek.  Viszont ez egy koltseg hatekonyabb megoldas mint a headroom. Nalunk egy node 2-4 percig tart amig bejon a clusterbe. Pl. a deploy process megall es var peding allapotba kerulnek a podok ez nem tul hatekony lassukbe. De van a problemara megoldas. A legtobb kubernetes autoscaler megoldast ezt a modot tamogatja.
  5. Headroom Nevezhetjuk egyszeruen buffernek is. Az elmelet lenyege ,hogy mindig hagyunk szabad kapacitast a rendszerben. Hogy mennyit az szerintem rendszerre valogatja. Mivel nalunk gyakran fordulnak elo peakek a rendszerben ezert mi normal mukodes soran ha nincs varhato nagy kampany idoszak akkor nagyabbol 30%-os buffert hagyjunk meg. De, hogy ne legyen tul draga a rendszert fentartani csak spotinstekkel dolgozzunk az alkalmazasok alatt. A rendszer korulbelul 95% spotinstekre epul. Van egy keplet a headroom-ra. 15 Units count + 1024 CPU Headroom + 512 MiB Memory headroom 15360 CPU unit jelent  Az elmeletben ez ket magos instancebol ez kb 8-t jelent vagy 4 magosbol 4-t.  A gyakorlatban vannak evicion policyk es a rendszernek tartunk fent eroforrast igy kb 9.5 es 5.5 fel instance van pluszba a rendszerbe.
  6. Application scaling Most mar ,hogy tudjuk skalazni a nodeokat nezzuk meg mi tudunk az alkalmazasinkkal csinalni. 79 darab servicebol all a jelenlegi rendszerunk. A rendszerben nem egyenloen oszlik el a terheles ha egy nagyobb kampany kikuldes van akkor van kell fel scalelni 1-2 servicet majd le kell scalelni. Ez egy orok szelhalom harc. Regen nem volt tul szeles a paletta amibol valasztani lehetett pod scaleingbe. HPA A fo komponen a Horizental Pod Autoscaling nevu resource ezzel tudjuk skalazni az alkalmazasinkat kubernetesen belul. v1 A v1-s verzio  csak CPU alapjan tud skalazni. Tehat ha egy pod az eloremeghatarozott CPU mennyiseg x % szazaleket elfogyasztotta akkor a rendszer inditott belole megegyet. Van egy minimum es egy maximum ertek amit meg belehet neki allitani. custom metrics A jovo egyertelmuen ez a megoldas-e. Mivel nem biztos ,hogy csak CPU alapjan szeretnenk skalazni az alkalamzasinkat.  Vegyunk egy egyszeru peldat pl. nginx.