Introduction
This is a page about Microservice and monitoring
Prometheus
A tool for monitoring,install monitor application,it will send out the log metrics,
and in the UI it can search anything based on rate / frequence and so on
take node for example
- it monitor the machine side
- it using job config in yml file to add target
Microservices
- break down application into microservices based on the business functionalities
- keep one service doing one specifical jobs
- self-contained and independent from each other , can be developed deployed scaled separately
- it is loosely coupled
- communication use api call / message broker / service mesh
downside of MicroSerivces
- communication complexity
- how to monitor so many microservice when it is down
repo
when use microservice you might choose below two Repo type
- monorepo
- polyreop
Near Zero DownTime
Blue/Green deployment strategy
running two server and use load balanceCanary release strategy
slowly roll out the new version to a small group of users
k8s AutoScaling
K8s has three types of autoscaling
HPA(Horizontal Pod Autoscaler)
Pod number autoscaling, depends on metrics-server,adjust to CPU/memory/QPS
VPA(Vertical Pod Autoscaler)
Inside a Pod
CA(cluster Autoscaler)
Node number autoscaling
folder structure
1 | - core #the core part of CA |
How k8s manage to increase Node(AWS)?
use awsmanager to increase ASG, the same we increase ASG inside aws console:
IncreaseSize .231