This guide shows how to deploy your Virtual Memory Manager to Render's free tier. Render provides:
- Free tier: 750 hours/month, sleeps after 15min inactivity
- Automatic deployments from GitHub
- Custom domains (free)
- SSL certificates (automatic)
- GitHub repository with your code
- Render account (free)
- Environment variables configured
Make sure your repository has:
- ✅ Environment variables fixed (already done)
- ✅
render.yamlconfiguration file - ✅
backend/Dockerfilefor C++ backend - ✅ All source code committed
- Go to render.com
- Sign up with GitHub
- Connect your GitHub account
-
Go to Render Dashboard
- Click "New +"
- Select "Blueprint"
-
Connect Repository
- Select your GitHub repository
- Render will automatically detect
render.yaml
-
Deploy
- Click "Apply"
- Render will create all 3 services automatically
Deploy each service individually:
-
Create Web Service
- Go to Render Dashboard
- Click "New +" → "Web Service"
- Connect your GitHub repository
-
Configure Service
Name: vmm-predictor Environment: Python Build Command: pip install -r predictor/requirements.txt Start Command: cd predictor && python -m uvicorn predictor.service:app --host 0.0.0.0 --port $PORT -
Environment Variables
PREDICTOR_HOST=0.0.0.0 PREDICTOR_PORT=5000 LOG_LEVEL=INFO MODEL_PATH=model.pkl AI_MODEL_TYPE=xgboost AI_PREDICTION_THRESHOLD=0.7
-
Create Web Service
- Click "New +" → "Web Service"
- Connect your GitHub repository
-
Configure Service
Name: vmm-backend Environment: Docker Dockerfile Path: ./backend/Dockerfile -
Environment Variables
BACKEND_PORT=8080 BACKEND_HOST=0.0.0.0 PREDICTOR_URL=https://vmm-predictor.onrender.com VMM_TOTAL_FRAMES=256 VMM_PAGE_SIZE=4096 VMM_TOTAL_PAGES=1024 VMM_REPLACEMENT_POLICY=CLOCK VMM_ENABLE_AI=true LOG_LEVEL=INFO
-
Create Static Site
- Click "New +" → "Static Site"
- Connect your GitHub repository
-
Configure Build
Build Command: cd frontend && npm install && npm run build Publish Directory: frontend/dist -
Environment Variables
NODE_ENV=production VITE_BACKEND_URL=https://vmm-backend.onrender.com
NODE_ENV=production
VITE_BACKEND_URL=https://your-backend-url.onrender.com
VITE_FRONTEND_PORT=3000BACKEND_PORT=8080
BACKEND_HOST=0.0.0.0
PREDICTOR_URL=https://your-predictor-url.onrender.com
VMM_TOTAL_FRAMES=256
VMM_PAGE_SIZE=4096
VMM_TOTAL_PAGES=1024
VMM_REPLACEMENT_POLICY=CLOCK
VMM_ENABLE_AI=true
LOG_LEVEL=INFOPREDICTOR_HOST=0.0.0.0
PREDICTOR_PORT=5000
LOG_LEVEL=INFO
MODEL_PATH=model.pkl
AI_MODEL_TYPE=xgboost
AI_PREDICTION_THRESHOLD=0.7After deployment, you'll get URLs like:
- Frontend:
https://vmm-frontend.onrender.com - Backend:
https://vmm-backend.onrender.com - AI Predictor:
https://vmm-predictor.onrender.com
-
Add Custom Domain
- Go to your service settings
- Click "Custom Domains"
- Add your domain (e.g.,
vmm.yourdomain.com)
-
Configure DNS
- Add CNAME record pointing to your Render URL
- Render will automatically provision SSL
- Go to your service dashboard
- Click "Logs" tab
- View real-time logs
- Backend:
GET /metrics - AI Predictor:
GET /health - Frontend: Static file serving
-
Build Failures
- Check build logs in Render dashboard
- Ensure all dependencies are in requirements.txt/package.json
- Verify Dockerfile syntax
-
Service Not Starting
- Check start command
- Verify environment variables
- Check service logs
-
Connection Issues
- Ensure services are using correct URLs
- Check CORS settings
- Verify environment variables are set
# Check service status
curl https://your-backend-url.onrender.com/metrics
# Check AI predictor
curl https://your-predictor-url.onrender.com/health
# Check frontend
curl https://your-frontend-url.onrender.com- 750 hours/month per service
- Sleeps after 15 minutes of inactivity
- Cold starts when waking up
- Combine services where possible
- Use static site for frontend (no cold starts)
- Optimize build times
- Monitor usage in dashboard
- Starter: $7/month per service
- Standard: $25/month per service
- Pro: $85/month per service
- No sleep (always running)
- More resources (CPU, RAM)
- Faster builds
- Priority support
- Never commit
.envfiles - Use Render's environment variable system
- Rotate secrets regularly
- Automatic SSL certificates
- Force HTTPS redirects
- Secure headers configured
- Automatic backups on paid plans
- Manual exports available
- Point-in-time recovery
- GitHub integration for version control
- Automatic deployments on push
- Rollback to previous versions
- Documentation: render.com/docs
- Community: render.com/community
- Support: Available on paid plans
- ✅ Deploy to Render using this guide
- ✅ Test all services are working
- ✅ Configure custom domain (optional)
- ✅ Set up monitoring and alerts
- ✅ Optimize performance for production