tencent cloud

Tencent Kubernetes Engine

Release Notes and Announcements
Release Notes
Announcements
Release Notes
Product Introduction
Overview
Strengths
Architecture
Scenarios
Features
Concepts
Native Kubernetes Terms
Common High-Risk Operations
Regions and Availability Zones
Service Regions and Service Providers
Open Source Components
Purchase Guide
Purchase Instructions
Purchase a TKE General Cluster
Purchasing Native Nodes
Purchasing a Super Node
Getting Started
Beginner’s Guide
Quickly Creating a Standard Cluster
Examples
Container Application Deployment Check List
Cluster Configuration
General Cluster Overview
Cluster Management
Network Management
Storage Management
Node Management
GPU Resource Management
Remote Terminals
Application Configuration
Workload Management
Service and Configuration Management
Component and Application Management
Auto Scaling
Container Login Methods
Observability Configuration
Ops Observability
Cost Insights and Optimization
Scheduler Configuration
Scheduling Component Overview
Resource Utilization Optimization Scheduling
Business Priority Assurance Scheduling
QoS Awareness Scheduling
Security and Stability
TKE Security Group Settings
Identity Authentication and Authorization
Application Security
Multi-cluster Management
Planned Upgrade
Backup Center
Cloud Native Service Guide
Cloud Service for etcd
TMP
TKE Serverless Cluster Guide
TKE Registered Cluster Guide
Use Cases
Cluster
Serverless Cluster
Scheduling
Security
Service Deployment
Network
Release
Logs
Monitoring
OPS
Terraform
DevOps
Auto Scaling
Containerization
Microservice
Cost Management
Hybrid Cloud
AI
Troubleshooting
Disk Full
High Workload
Memory Fragmentation
Cluster DNS Troubleshooting
Cluster kube-proxy Troubleshooting
Cluster API Server Inaccessibility Troubleshooting
Service and Ingress Inaccessibility Troubleshooting
Common Service & Ingress Errors and Solutions
Engel Ingres appears in Connechtin Reverside
CLB Ingress Creation Error
Troubleshooting for Pod Network Inaccessibility
Pod Status Exception and Handling
Authorizing Tencent Cloud OPS Team for Troubleshooting
CLB Loopback
API Documentation
History
Introduction
API Category
Making API Requests
Elastic Cluster APIs
Resource Reserved Coupon APIs
Cluster APIs
Third-party Node APIs
Relevant APIs for Addon
Network APIs
Node APIs
Node Pool APIs
TKE Edge Cluster APIs
Cloud Native Monitoring APIs
Scaling group APIs
Super Node APIs
Other APIs
Data Types
Error Codes
TKE API 2022-05-01
FAQs
TKE General Cluster
TKE Serverless Cluster
About OPS
Hidden Danger Handling
About Services
Image Repositories
About Remote Terminals
Event FAQs
Resource Management
Service Agreement
TKE Service Level Agreement
TKE Serverless Service Level Agreement
Contact Us
Glossary
DocumentaçãoTencent Kubernetes EngineUse CasesAuto ScalingKEDAMulti-Level Service Synchronized Horizontal Scaling (Workload Triggers)

Multi-Level Service Synchronized Horizontal Scaling (Workload Triggers)

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2024-12-24 15:55:32

Workload Triggers

Kubernetes-based Event-Driven Autoscaler (KEDA) supports Kubernetes Workload triggers, enabling scaling based on the number of Pods in one or more workloads. This is very useful in multi-level service call scenarios. For details, please refer to KEDA Scalers: Kubernetes Workload.

Use Cases

Multi-level Service Simultaneous Scaling

The picture shows multi-level microservice call:

The services A, B, and C usually have a fixed proportional quantity.
If the pressure on A suddenly increases, forcing a scale-out, B and C can also scale out almost simultaneously with A by using KEDA's Kubernetes Workload triggers, without waiting for pressure to propagate slowly.
First, configure the scale-out for A, which can be based on CPU and memory pressure. For example:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: a
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: a
pollingInterval: 15
minReplicaCount: 10
maxReplicaCount: 1000
triggers:
- type: memory
metricType: Utilization
metadata:
value: "60"
- type: cpu
metricType: Utilization
metadata:
value: "60"
Then, configure the scale-out for B and C, assuming a fixed ratio of A:B:C = 3:3:2. For example:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: b
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: b
pollingInterval: 15
minReplicaCount: 10
maxReplicaCount: 1000
triggers:
- type: kubernetes-workload
metadata:
podSelector: 'app=a' # Select service A
value: '1' # A/B=3/3=1
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: c
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: c
pollingInterval: 15
minReplicaCount: 3
maxReplicaCount: 340
triggers:
- type: kubernetes-workload
metadata:
podSelector: 'app=a' # Select service A
value: '3' # A/C=3/2=1.5
With the above configuration, when the pressure on A increases, A, B, and C will scale out almost simultaneously without waiting for the pressure to propagate step by step. This allows for faster adaptation to pressure changes, improving system elasticity and performance.


Ajuda e Suporte

Esta página foi útil?

comentários