SlideShare a Scribd company logo
1
Exploring Magnum and Senlin integration
for autoscaling containers
Hongbin Lu (Huawei)
Jay Lau, Ton Ngo (IBM)
Qiming Teng, Julio Ruano (IBM)
Exploring Magnum and Senlin integration
Contributors
Exploring Magnum and Senlin integration2
Zilian Ji, Linjuan Xia, Shijia E, Peiyu Lin, Tianyuan Zhuang, Ji Jiang, Yongkui Wang
Talk Outline
1. Use cases
2. Magnum
3. Senlin
4. How it works
5. Demo
Exploring Magnum and Senlin integration3
Use cases
Exploring Magnum and Senlin integration4
Use case
• Shared COE cluster
– Autoscale on some policies (utilization, etc.)
– Scale number of nodes
• Multiple apps on cluster
– Autoscale on some policies (request rate, etc.)
– Scale number of containers
• Example:
– 2, 3-tiered web apps: handle requests
– SLA determines policy
Exploring Magnum and Senlin integration5
Scaling scenarios (1)
Exploring Magnum and Senlin integration6
node
c c c
node
c cc
node
c scale app
scale cluster
Single app on cluster
• scale out containers as needed
• scale cluster by utilization
• coordination = utilization
Scaling scenarios (2)
Exploring Magnum and Senlin integration7
node
c
node
c c
node
c c c c scale 2 apps
Two apps on cluster
• scale out containers as needed
• scale cluster by utilization
• coordination = utilization
scale cluster
unlimited
scale cluster
limited
Scaling scenarios (3)
Exploring Magnum and Senlin integration8
node
c c
node
scale 2 apps
scale cluster
limited
c
node
c c c c c c
Two apps on cluster, limited cluster size
• blue scales first, retains containers
• red scales later, fails
• maybe acceptable
• what if red is critical and blue is not
• inverted priority: blue < red
Scaling scenarios (4)
Exploring Magnum and Senlin integration9
node
c c scale 2 apps
Limit on apps
• Place max on blue
• blue scales, red does not scale
• cannot use full resources
scale cluster
limited
c
nodenode
c
limited
Scaling scenarios (5)
Exploring Magnum and Senlin integration10
node
c c
node
scale 2 apps
scale cluster
limited
c
node
c c c c c cc c c c
Priority on apps
• blue scales first, red scales later
• blue scales back to free up resource for red
• 2 ways linkage: container cluster host cluster
Magnum
Exploring Magnum and Senlin integration11
Instance
Magnum Overview
Exploring Magnum and Senlin integration12
• Provision
• Kubernetes
• Docker Swarm
• Mesos
• Scale
• Add instances
• Remove instances
• Manage
• Pod
• Service
• Replication Controller
• Container
Nova Instance
container
container
Magnum CLI
Magnum
Heat
Magnum Architecture
Exploring Magnum and Senlin integration13
Magnum: Autoscale Bay
1. Raw data: Magnum pulls raw
data from Bays.
2. Metrics: Metrics, like memory
utilization, are computed and sent
them to Ceilometer.
3. Alarm: Ceilometer triggers alarms
based on user-specified scenario
and metrics.
4. Scale: Heat scales the bays.
Exploring Magnum and Senlin integration14
Ceilometer
Magnum Heat
Bay
1) Raw data
2) Metrics 3) Alarm
4) Scale
Kubernetes: Autoscale Pod
1. Metrics: The autoscaler
periodically queries pods’ metrics.
2. Scale: Based on collected
metrics, the autoscaler uses a
built-in algorithm to trigger the
scaling.
3. Resize: Replication Controller
resize the pods.
Exploring Magnum and Senlin integration15
Horizontal
Pod
Autoscaler
Pods
1) Metrics
3) Resize
Replication
Controller
2) Scale
Future direction
• Magnum AutoScaler
– A new component in Magnum
• Scaling Bays
• Scaling Applications
– Interacts with AutoScaler from COEs
• Kubernetes AutoScaler as a driver for container-level scaling
• Magnum responsible for scaling RCs without Kubernetes autoscaler
– Customizability
• data sources
• metrics and thresholds
• standby bay nodes (i.e. resource pool)
Exploring Magnum and Senlin integration16
Two-Levels of AutoScaling
Exploring Magnum and Senlin integration17
Working
K8S Bay
NodeNode
K8S
Master
Heapster
Kublet
cAdvisor
Kublet
cAdvisor
Storage
Backend
RC AutoScaler
Pod
Magnum AutoScaler Service
K8S Driver
Collector
Analyzer
Operator
Swarm
Driver
Mesos
Driver
Senlin
Magnum
Conductor
Standby
Senlin
Exploring Magnum and Senlin integration18
Clustering - A Missing Service in OpenStack
Exploring Magnum and Senlin integration19
Scalable
Load-Balanced
Highly-Available
Manageable
......
of any (OpenStack) objects
Senlin Architecture
Exploring Magnum and Senlin integration20
REST RPC
Senlin
Database
Policies
Profiles
Clustering/AutoScaling/LoadBalancing
Exploring Magnum and Senlin integration21
Nova
Kubernetes
Heat
Ironic BareMetal
VMs
Stacks
Containers
Senlin
placement
deletion
scaling
health
load-balance
batching
Scaling A Cluster using Senlin
Exploring Magnum and Senlin integration22
type: os.nova.server
version: 1.0
properties:
image: fedora-21
flavor: 3
networks:
- network: private
userdata:
...
Profile
Cluster
type: senlin.policy.scaling
version: 1.0
properties:
event: CLUSTER_SCALE_IN
adjustment:
type: CHANGE_IN_CAPACITY
number: 1
min_step: 1
best_effort: True
attach
Policy
type: senlin.policy.scaling
version: 1.0
properties:
event: CLUSTER_SCALE_OUT
adjustment:
. . .
attach
Policy
webhook
RESIZE
Policies
Exploring Magnum and Senlin integration23
type: senlin.policy.scaling
version: 1.0
properties:
adjustment:
min_step: 1
best_effort: true
number: 1
type: CHANGE_IN_CAPACITY
event: CLUSTER_SCALE_OUT
• Declarative
• Can be mapped to from a standard
• Example: SUR_Cluster
(Add k8s Minion / Add Spark worker node)
Trigger
Exploring Magnum and Senlin integration24
type: CeilometerThresholdAlarm
version: 1.0
rule:
meter_name: memory_util
comparison_operator: gt
threshold: 70
period: 60
evaluation_periods: 1
statistic: avg
query:
- field: resource_metadata.cluster
op: eq
value: SUR_Cluster
• Generic abstraction
• alarms in OpenStack
monitoring services
• e.g. Ceilometer Alarm
How it works
Exploring Magnum and Senlin integration25
Design goals
1. Coordinate scaling at apps and cluster level
• Control flows in both direction
• Apps -> Cluster: utilization, other methods
• Cluster -> Apps: priority, other methods
2. Integrate scaling support from COE if available
• Kubernetes autoscaler
3. Policy driven
• Easy to express, manage complex cases
Exploring Magnum and Senlin integration26
template
Outer Stack
Autoscaling: OpenStack-Only Solution (Today)
27 Exploring Magnum and Senlin integration
AutoScalingGroup Stack
Heat
Ceilometer
AH
PUp PDn
AL
ASGS1 S2 S3
update
ASG
Senlin
profile
Autoscaling: OpenStack-Only Solution (New)
28 Exploring Magnum and Senlin integration
Cluster
Ceilometer
AH
PUp
PDn
AL
SCALE_IN
SCALE_OUT
Node1 Node2 Node3
webhookspolicies triggers
Demo
Exploring Magnum and Senlin integration29
Autoscaling with Kubernetes
30 Exploring Magnum and Senlin integration
VMs
K8S Bay
NodeNode
Heapster
Kublet
cAdvisor
Kublet
cAdvisor
Pod
Senlin
Magnum
profile
CeilometerWorkload
policy
Questions
Exploring Magnum and Senlin integration31
Thank You
Exploring Magnum and Senlin integration32

More Related Content

PPTX
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with Senlin
PDF
Senlin deep dive 2016
PPTX
Managing Container Clusters in OpenStack Native Way
PDF
Suning OpenStack Cloud and Heat
PDF
Senlin Clustering Service Deep Dive
PPTX
Senlin deep dive 2015 05-20
PPTX
Exploring Magnum and Senlin integration for autoscaling containers
PDF
VM HA and Cross-Region Scaling
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with Senlin
Senlin deep dive 2016
Managing Container Clusters in OpenStack Native Way
Suning OpenStack Cloud and Heat
Senlin Clustering Service Deep Dive
Senlin deep dive 2015 05-20
Exploring Magnum and Senlin integration for autoscaling containers
VM HA and Cross-Region Scaling

What's hot (20)

PDF
2016 08-30 Kubernetes talk for Waterloo DevOps
PDF
Spark day 2017 - Spark on Kubernetes
PPTX
IBM Platform Computing Products Connector for Apache Mesos
PDF
Containerizing Distributed Pipes
PDF
[Spark Summit 2017 NA] Apache Spark on Kubernetes
PDF
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
PDF
Orchestrating Redis & K8s Operators
PDF
K8s cluster autoscaler
PDF
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
PPTX
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
PPTX
PDF
Optimizing {Java} Application Performance on Kubernetes
PPTX
A fun cup of joe with open liberty
PDF
[GS네오텍] Google Kubernetes Engine
PPTX
Kubernetes #6 advanced scheduling
PPTX
Solr Lucene Conference 2014 - Nitin Presentation
PPTX
Serverless and Servicefull Applications - Where Microservices complements Ser...
PDF
Kubernetes deployment strategies - CNCF Webinar
PDF
The Kubernetes Operator Pattern - ContainerConf Nov 2017
PDF
Container Camp London (2016-09-09)
2016 08-30 Kubernetes talk for Waterloo DevOps
Spark day 2017 - Spark on Kubernetes
IBM Platform Computing Products Connector for Apache Mesos
Containerizing Distributed Pipes
[Spark Summit 2017 NA] Apache Spark on Kubernetes
Solr Compute Cloud – An Elastic Solr Infrastructure: Presented by Nitin Sharm...
Orchestrating Redis & K8s Operators
K8s cluster autoscaler
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
Optimizing {Java} Application Performance on Kubernetes
A fun cup of joe with open liberty
[GS네오텍] Google Kubernetes Engine
Kubernetes #6 advanced scheduling
Solr Lucene Conference 2014 - Nitin Presentation
Serverless and Servicefull Applications - Where Microservices complements Ser...
Kubernetes deployment strategies - CNCF Webinar
The Kubernetes Operator Pattern - ContainerConf Nov 2017
Container Camp London (2016-09-09)
Ad

Similar to Autoscaling with magnum and senlin (20)

PDF
Kubecon US 2019: Kubernetes Multitenancy WG Deep Dive
PDF
Cloud Native Camel Design Patterns
PDF
Automated Cluster Management and Recovery for Large Scale Multi-Tenant Sea...
PDF
Kubernetes and Terraform in the Cloud: How RightScale Does DevOps
PDF
Introducing github.com/open-cluster-management – How to deliver apps across c...
PDF
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
PDF
Open stack and k8s(v4)
PPTX
Solr Lucene Revolution 2014 - Solr Compute Cloud - Nitin
PDF
Operationalizing Amazon EKS
PDF
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
PDF
Kubernetes Monitoring & Best Practices
PPTX
Solr Compute Cloud - An Elastic SolrCloud Infrastructure
PDF
From Code to Kubernetes
PDF
[RightScale Webinar] Architecting Databases in the cloud: How RightScale Doe...
PDF
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
PDF
Unclouding Container Challenges
PDF
Kubernetes Administration from Zero to Hero.pdf
PDF
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
PDF
20200113 - IBM Cloud Côte d'Azur - DeepDive Kubernetes
PDF
kubernetesNotes_ggggggbggggggggggggggg.pdf
Kubecon US 2019: Kubernetes Multitenancy WG Deep Dive
Cloud Native Camel Design Patterns
Automated Cluster Management and Recovery for Large Scale Multi-Tenant Sea...
Kubernetes and Terraform in the Cloud: How RightScale Does DevOps
Introducing github.com/open-cluster-management – How to deliver apps across c...
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
Open stack and k8s(v4)
Solr Lucene Revolution 2014 - Solr Compute Cloud - Nitin
Operationalizing Amazon EKS
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Kubernetes Monitoring & Best Practices
Solr Compute Cloud - An Elastic SolrCloud Infrastructure
From Code to Kubernetes
[RightScale Webinar] Architecting Databases in the cloud: How RightScale Doe...
Stop Worrying and Keep Querying, Using Automated Multi-Region Disaster Recovery
Unclouding Container Challenges
Kubernetes Administration from Zero to Hero.pdf
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
20200113 - IBM Cloud Côte d'Azur - DeepDive Kubernetes
kubernetesNotes_ggggggbggggggggggggggg.pdf
Ad

Recently uploaded (20)

PDF
Understanding Forklifts - TECH EHS Solution
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
System and Network Administration Chapter 2
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Introduction to Artificial Intelligence
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
CHAPTER 2 - PM Management and IT Context
Understanding Forklifts - TECH EHS Solution
Which alternative to Crystal Reports is best for small or large businesses.pdf
System and Network Administration Chapter 2
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Operating system designcfffgfgggggggvggggggggg
Odoo Companies in India – Driving Business Transformation.pdf
Introduction to Artificial Intelligence
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
L1 - Introduction to python Backend.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
ai tools demonstartion for schools and inter college
Upgrade and Innovation Strategies for SAP ERP Customers
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Softaken Excel to vCard Converter Software.pdf
top salesforce developer skills in 2025.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
CHAPTER 2 - PM Management and IT Context

Autoscaling with magnum and senlin

  • 1. 1 Exploring Magnum and Senlin integration for autoscaling containers Hongbin Lu (Huawei) Jay Lau, Ton Ngo (IBM) Qiming Teng, Julio Ruano (IBM) Exploring Magnum and Senlin integration
  • 2. Contributors Exploring Magnum and Senlin integration2 Zilian Ji, Linjuan Xia, Shijia E, Peiyu Lin, Tianyuan Zhuang, Ji Jiang, Yongkui Wang
  • 3. Talk Outline 1. Use cases 2. Magnum 3. Senlin 4. How it works 5. Demo Exploring Magnum and Senlin integration3
  • 4. Use cases Exploring Magnum and Senlin integration4
  • 5. Use case • Shared COE cluster – Autoscale on some policies (utilization, etc.) – Scale number of nodes • Multiple apps on cluster – Autoscale on some policies (request rate, etc.) – Scale number of containers • Example: – 2, 3-tiered web apps: handle requests – SLA determines policy Exploring Magnum and Senlin integration5
  • 6. Scaling scenarios (1) Exploring Magnum and Senlin integration6 node c c c node c cc node c scale app scale cluster Single app on cluster • scale out containers as needed • scale cluster by utilization • coordination = utilization
  • 7. Scaling scenarios (2) Exploring Magnum and Senlin integration7 node c node c c node c c c c scale 2 apps Two apps on cluster • scale out containers as needed • scale cluster by utilization • coordination = utilization scale cluster unlimited scale cluster limited
  • 8. Scaling scenarios (3) Exploring Magnum and Senlin integration8 node c c node scale 2 apps scale cluster limited c node c c c c c c Two apps on cluster, limited cluster size • blue scales first, retains containers • red scales later, fails • maybe acceptable • what if red is critical and blue is not • inverted priority: blue < red
  • 9. Scaling scenarios (4) Exploring Magnum and Senlin integration9 node c c scale 2 apps Limit on apps • Place max on blue • blue scales, red does not scale • cannot use full resources scale cluster limited c nodenode c limited
  • 10. Scaling scenarios (5) Exploring Magnum and Senlin integration10 node c c node scale 2 apps scale cluster limited c node c c c c c cc c c c Priority on apps • blue scales first, red scales later • blue scales back to free up resource for red • 2 ways linkage: container cluster host cluster
  • 11. Magnum Exploring Magnum and Senlin integration11
  • 12. Instance Magnum Overview Exploring Magnum and Senlin integration12 • Provision • Kubernetes • Docker Swarm • Mesos • Scale • Add instances • Remove instances • Manage • Pod • Service • Replication Controller • Container Nova Instance container container Magnum CLI Magnum Heat
  • 13. Magnum Architecture Exploring Magnum and Senlin integration13
  • 14. Magnum: Autoscale Bay 1. Raw data: Magnum pulls raw data from Bays. 2. Metrics: Metrics, like memory utilization, are computed and sent them to Ceilometer. 3. Alarm: Ceilometer triggers alarms based on user-specified scenario and metrics. 4. Scale: Heat scales the bays. Exploring Magnum and Senlin integration14 Ceilometer Magnum Heat Bay 1) Raw data 2) Metrics 3) Alarm 4) Scale
  • 15. Kubernetes: Autoscale Pod 1. Metrics: The autoscaler periodically queries pods’ metrics. 2. Scale: Based on collected metrics, the autoscaler uses a built-in algorithm to trigger the scaling. 3. Resize: Replication Controller resize the pods. Exploring Magnum and Senlin integration15 Horizontal Pod Autoscaler Pods 1) Metrics 3) Resize Replication Controller 2) Scale
  • 16. Future direction • Magnum AutoScaler – A new component in Magnum • Scaling Bays • Scaling Applications – Interacts with AutoScaler from COEs • Kubernetes AutoScaler as a driver for container-level scaling • Magnum responsible for scaling RCs without Kubernetes autoscaler – Customizability • data sources • metrics and thresholds • standby bay nodes (i.e. resource pool) Exploring Magnum and Senlin integration16
  • 17. Two-Levels of AutoScaling Exploring Magnum and Senlin integration17 Working K8S Bay NodeNode K8S Master Heapster Kublet cAdvisor Kublet cAdvisor Storage Backend RC AutoScaler Pod Magnum AutoScaler Service K8S Driver Collector Analyzer Operator Swarm Driver Mesos Driver Senlin Magnum Conductor Standby
  • 18. Senlin Exploring Magnum and Senlin integration18
  • 19. Clustering - A Missing Service in OpenStack Exploring Magnum and Senlin integration19 Scalable Load-Balanced Highly-Available Manageable ...... of any (OpenStack) objects
  • 20. Senlin Architecture Exploring Magnum and Senlin integration20 REST RPC Senlin Database Policies Profiles
  • 21. Clustering/AutoScaling/LoadBalancing Exploring Magnum and Senlin integration21 Nova Kubernetes Heat Ironic BareMetal VMs Stacks Containers Senlin placement deletion scaling health load-balance batching
  • 22. Scaling A Cluster using Senlin Exploring Magnum and Senlin integration22 type: os.nova.server version: 1.0 properties: image: fedora-21 flavor: 3 networks: - network: private userdata: ... Profile Cluster type: senlin.policy.scaling version: 1.0 properties: event: CLUSTER_SCALE_IN adjustment: type: CHANGE_IN_CAPACITY number: 1 min_step: 1 best_effort: True attach Policy type: senlin.policy.scaling version: 1.0 properties: event: CLUSTER_SCALE_OUT adjustment: . . . attach Policy webhook RESIZE
  • 23. Policies Exploring Magnum and Senlin integration23 type: senlin.policy.scaling version: 1.0 properties: adjustment: min_step: 1 best_effort: true number: 1 type: CHANGE_IN_CAPACITY event: CLUSTER_SCALE_OUT • Declarative • Can be mapped to from a standard • Example: SUR_Cluster (Add k8s Minion / Add Spark worker node)
  • 24. Trigger Exploring Magnum and Senlin integration24 type: CeilometerThresholdAlarm version: 1.0 rule: meter_name: memory_util comparison_operator: gt threshold: 70 period: 60 evaluation_periods: 1 statistic: avg query: - field: resource_metadata.cluster op: eq value: SUR_Cluster • Generic abstraction • alarms in OpenStack monitoring services • e.g. Ceilometer Alarm
  • 25. How it works Exploring Magnum and Senlin integration25
  • 26. Design goals 1. Coordinate scaling at apps and cluster level • Control flows in both direction • Apps -> Cluster: utilization, other methods • Cluster -> Apps: priority, other methods 2. Integrate scaling support from COE if available • Kubernetes autoscaler 3. Policy driven • Easy to express, manage complex cases Exploring Magnum and Senlin integration26
  • 27. template Outer Stack Autoscaling: OpenStack-Only Solution (Today) 27 Exploring Magnum and Senlin integration AutoScalingGroup Stack Heat Ceilometer AH PUp PDn AL ASGS1 S2 S3 update ASG
  • 28. Senlin profile Autoscaling: OpenStack-Only Solution (New) 28 Exploring Magnum and Senlin integration Cluster Ceilometer AH PUp PDn AL SCALE_IN SCALE_OUT Node1 Node2 Node3 webhookspolicies triggers
  • 29. Demo Exploring Magnum and Senlin integration29
  • 30. Autoscaling with Kubernetes 30 Exploring Magnum and Senlin integration VMs K8S Bay NodeNode Heapster Kublet cAdvisor Kublet cAdvisor Pod Senlin Magnum profile CeilometerWorkload policy
  • 31. Questions Exploring Magnum and Senlin integration31
  • 32. Thank You Exploring Magnum and Senlin integration32