Mô tả: Dự đoán resource usage (CPU, Memory, Disk) cho containers dựa trên lịch sử và patterns.
Tech Stack:
- Frontend: React dashboard với real-time charts (D3.js, Recharts)
- Backend: FastAPI/Node.js với time-series DB (InfluxDB)
- ML: LSTM/Prophet cho time-series forecasting
- DevOps: Prometheus integration, auto-scaling triggers
Gia tri Du Doan : Giảm 30-40% chi phí cloud bằng cách predict và auto-scale chính xác.
optiScale/ │ ├── services/ │ ├── api-gateway/ # Cổng API chung (routing, auth, rate-limit) │ ├── collector-service/ # Thu thập metrics từ Prometheus/K8s │ ├── predictor-service/ # Xử lý & dự đoán bằng ML (LSTM / Prophet) │ ├── scaler-service/ # Trigger auto-scaling qua Cloud/K8s API │ ├── dashboard-service/ # Backend cho dashboard frontend (FastAPI/Node) │ ├── notifier-service/ # Gửi cảnh báo (Slack, Email, Webhook) │ └── auth-service/ # Xác thực, phân quyền, JWT, RBAC │ ├── frontend/ │ ├── src/ │ │ ├── components/ # Các component UI tái sử dụng │ │ ├── pages/ # Dashboard, Resource Graph, Alerts, Settings │ │ ├── hooks/ # Custom React hooks │ │ ├── context/ # Context API cho user/session/theme │ │ ├── utils/ # Hàm helper, constants │ │ ├── api/ # Giao tiếp với các services qua API Gateway │ │ └── assets/ # Ảnh, icon, font │ ├── public/ │ └── package.json │ ├── ml-models/ │ ├── lstm/ │ │ ├── train.py # Huấn luyện mô hình LSTM │ │ ├── predict.py # Sinh dự đoán CPU/mem/disk │ │ └── model_weights.h5 │ ├── prophet/ │ │ ├── train_prophet.py │ │ ├── forecast.py │ │ └── model.pkl │ └── utils/ │ ├── preprocess.py │ └── evaluation.py │ ├── infra/ │ ├── docker/ │ │ ├── api-gateway.Dockerfile │ │ ├── predictor.Dockerfile │ │ ├── collector.Dockerfile │ │ ├── dashboard.Dockerfile │ │ ├── auth.Dockerfile │ │ └── ... │ ├── k8s/ │ │ ├── deployments/ │ │ ├── services/ │ │ └── ingress/ │ ├── prometheus/ │ │ ├── prometheus.yml │ │ ├── alert_rules.yml │ │ └── grafana_dashboards/ │ ├── terraform/ │ │ ├── main.tf │ │ ├── variables.tf │ │ └── outputs.tf │ └── ci-cd/ │ ├── github-actions/ │ │ ├── build.yml │ │ └── deploy.yml │ └── jenkinsfile │ ├── shared/ │ ├── libs/ # Thư viện chia sẻ giữa các service (logging, auth) │ ├── schemas/ # Định nghĩa schema chung (pydantic/json-schema) │ ├── configs/ # File cấu hình toàn hệ thống │ └── utils/ # Hàm tiện ích, middleware, common API helpers │ ├── docs/ │ ├── architecture-diagram.png │ ├── api-specs.yaml # OpenAPI/Swagger spec │ ├── ml-pipeline.md │ └── deployment-guide.md │ ├── tests/ │ ├── unit/ │ ├── integration/ │ ├── load/ │ └── e2e/ │ ├── .env.example ├── docker-compose.yml ├── README.md └── Makefile