How arudraviharbommana/rl_cloud works
This repository provides a capacity-scaling recommendation interface backed by a Node.js proxy and a FastAPI decision service. The main workflow is to enter CPU, memory, instance-count, and request-rate values in the React UI, submit them through Node, normalize the state, and return the action and closest trained sample. The UI also offers load presets and displays the reward and normalized-state debug details. The tree and excerpts support this request path; the separate Action endpoint is present but is not shown as part of the mounted UI workflow.
Main entry points: DecideEndpoint.jsx Decision form · App.jsx App composition · main.py FastAPI decision API · apiClient.js API client
Components 18
React interface
- App composition
frontend-react/src/App.jsx - Page layout
frontend-react/src/components/layout - Decision form
frontend-react/src/components/endpoints/DecideEndpoint.jsx - Input fields
frontend-react/src/components/common/FormField.jsx - Endpoint card
frontend-react/src/components/common/EndpointCard.jsx - Primary button
frontend-react/src/components/common/PrimaryButton.jsx - Action endpoint view
frontend-react/src/components/endpoints/ActionEndpoint.jsx - API client
frontend-react/src/services/apiClient.js
Node API proxy
- Node server
backend-node/server.js - API routes
backend-node/routes/api.js - Decision controller
backend-node/controllers/controller.js - Python proxy
backend-node/services/pythonService.js
Recommendation service
- FastAPI decision API
rl-fastapi/main.py - State scaler
rl-fastapi/scaler.py - Nearest-sample agent
rl-fastapi/agent.py
Decision data
- RL samples
rl-fastapi/rl_dataset.json
Other components
- Operator
- Python HTTP service
Connections 17
- Operator → App composition: uses
- App composition → Page layout: renders
frontend-react/src/App.jsx - App composition → Decision form: renders
frontend-react/src/App.jsx - App composition → API client: passes callback
frontend-react/src/App.jsx - Decision form → Input fields: renders
frontend-react/src/components/endpoints/DecideEndpoint.jsx - Decision form → Endpoint card: renders
frontend-react/src/components/endpoints/DecideEndpoint.jsx - Decision form → Primary button: renders
frontend-react/src/components/endpoints/DecideEndpoint.jsx - Decision form → API client: submits via
frontend-react/src/components/endpoints/DecideEndpoint.jsx - Node server → API routes: mounts
backend-node/server.js - API routes → Decision controller: routes to
backend-node/routes/api.js - Decision controller → Python proxy: calls
backend-node/controllers/controller.js - API client → Node server: POSTs decision
frontend-react/src/services/apiClient.js - Python proxy → Python HTTP service: POSTs decision
backend-node/services/pythonService.js - Python HTTP service → FastAPI decision API: serves
- FastAPI decision API → State scaler: normalizes state
rl-fastapi/main.py - FastAPI decision API → Nearest-sample agent: requests recommendation
rl-fastapi/main.py - Nearest-sample agent → RL samples: loads samples
rl-fastapi/agent.py