DTA-SLO: Towards Efficient Multi-Chain Resource Management: A Dynamic Traffic-Aware Framework for SLO-Driven Microservice Optimization
A robust framework for optimizing resource management in complex microservice deployments with shared services and multi-chain dependencies. DTA-SLO leverages real-time traffic monitoring, time-series prediction using GRU (Gated Recurrent Unit), and novel optimization approaches to dynamically allocate resources based on individual service chain SLOs.
- Real-time Traffic Monitoring: Continuous monitoring of service metrics including request rates, latency, and error rates
- ML-Powered Traffic Prediction: Advanced time-series forecasting using GRU neural networks
- Dynamic Resource Optimization: Intelligent resource allocation based on current and predicted workloads
- SLO-Driven Management: Ensures service level objectives are met across all service chains
- Kubernetes Integration: Native support for Kubernetes deployments with rolling updates
- Multi-Chain Awareness: Handles complex dependencies between microservices
- Performance Impact Analysis: Quantifies the impact of shared services on overall system performance
- Python 3.8+
- Kubernetes cluster (for deployment)
- Docker (optional)
- kubectl configured with cluster access
- Clone the repository:
git clone https://github.com/ahmadpanah/dta-slo.git
cd dta-slo- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txtdocker-compose up --builddocker build -t dta-slo .
docker run -d --name dta-slo -v ~/.kube:/home/appuser/.kube:ro -p 8000:8000 dta-slo- Configure your services in
config/config.yaml:
services:
auth-service:
chains:
- user-registration
- order-processing
min_cpu: 0.1
max_cpu: 4.0
min_memory: 128
max_memory: 8192
slos:
user-registration: 0.2 # 200ms
order-processing: 0.5 # 500ms- Run the framework:
python main.pydta_slo/
β
βββ __init__.py
βββ requirements.txt
βββ config/
β βββ config.yaml
β
βββ src/
β βββ __init__.py
β βββ models/
β β βββ data_models.py
β β βββ metrics.py
β β
β βββ components/
β β βββ traffic_monitor.py
β β βββ traffic_predictor.py
β β βββ performance_quantifier.py
β β βββ resource_allocator.py
β β
β βββ utils/
β βββ kubernetes_utils.py
β
βββ main.py
Collects and processes real-time service metrics:
traffic_monitor = TrafficMonitor(sampling_interval=1.0)
traffic_monitor.record_request("auth-service", "user-registration", 0.15)Forecasts future traffic patterns using GRU:
predictor = TrafficPredictor(sequence_length=60, prediction_horizon=10)
future_load = predictor.predict(historical_data)Optimizes resource allocation based on traffic and SLOs:
allocator = DynamicResourceAllocator(traffic_monitor, traffic_predictor, performance_quantifier)
new_allocations = allocator.optimize_resources(services, slos)DTA-SLO tracks several key metrics:
- Resource Utilization
- SLO Violation Rate
- Average End-to-End Latency
- Fairness Index (resource distribution)
monitoring:
sampling_interval: 1.0 # seconds
window_size: 3600 # secondsprediction:
sequence_length: 60
prediction_horizon: 10
feature_dim: 3- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Seyed Hossein Ahmadpanah - h.ahmadpanah@iau.ac.ir
- Meghdad Mirabi - meghdad.mirabi@cs.tu-darmstadt.de