This repository contains a prototyped version of Panorama described in our paper "Panorama: Unveiling Latent Dependencies for Microservice Autoscaling via Meta-learning"
- Python 3.6
- pip3 install -r requirements.txt
Docker 24.0.5
A running Kubernetes cluster is required before Panorama working, for set-up instructions, refer to this.
Prometheus is an open-source monitoring and alerting toolkit used for collecting and storing metrics from various systems. For detailed installation steps, please refer to this.
Istio is an open-source service mesh platform that enhances the management and security of microservices in a distributed application. After having a cluster running a supported version of Kubernetes, installing Istio is needed. Follow these steps to get started with Istio.
We use Jaeger to collect traces, which involves establishing an invocation relationship among microservices through automated processes. Follow these steps to get started with Jaeger.
We utilize the Locust load testing tool, an open-source tool that employs Python code to generate workload.
Deploy the Train-Ticket system on K8S with istio.
cd ./benchmark/train-ticket
./deploy.sh
The generated workload intensity is
cd ./workload_generation
locust -f ./load_generator_train.py --headless > ./logs/trainticket.log 2>&1
Tip
⚠️ When starting the Locust script, make sure to update the data collection time incollect_RIDs.pyand start RID collection at the same time.
The information that needs to be configured before metric fetching is stored in metric_fetch.json, and the training related information is stored in dataset_config.json and model.json.
Run this code, and the metrics will be stored in the folder location you have set.
cd ./metric_fetch
python3 metrics_fetch.py
Transform the raw dataset into a time-sliced dataset for model training and learning.
cd ./dataset
python3 data_process.py
DID, we can send a http request to Jaeger and save the response to a json file, the request api is http:///api/dependencies, or we can do it in the code. Then we can run the code to generate DID matrix.
cd ./dependencies_extract/DID
python3 DIDs.py
EBD, we first extract the call order of all services use python3 TrainTicket_call_order.py and save it to json file
cd ./dependencies_extract/EBD
python3 TrainTicket_call_order.py
python3 EBDs.py
RID, we run the code at the beginning of workload generation
cd ./dependencies_extract/RID
python3 collect_RIDs.py
python3 train_model.py
Replace the workload intensity the locust use in load_generator_train.py. Utilizing well-trained and tested models to enable automatic scaling of various microservices, the configuration is stored in autoscaling.json.
python3 autoscaling.py
Collect the metric during autoscaling phase and calculate the average response time and pod count.
python3 evaluate_avg.py