
I Run 46 Microservices on a Single $20 VPS — Here's the Architecture
I wanted to build a platform where AI agents could access real-world data — IP geolocation, DNS lookups, website screenshots, crypto prices, code execution, and more. Most people would reach for Kubernetes, Docker Compose, or at minimum a managed container service. I chose a $20/month VPS, PM2, and nginx. 46 Node.js microservices. 4.8GB RAM. 300+ daily visitors. Zero container orchestration. Here's how it works and what I learned. The Stack Internet → nginx (reverse proxy + SSL) → PM2 (process manager) → 46 Node.js services Each service: Runs on its own port (3001–3099) Has its own package.json and directory Listens on 127.0.0.1 (internal only) Gets proxied through nginx One service — the API Gateway on port 3010 — is the only one exposed externally. It handles: API key authentication Rate limiting Credit tracking Request routing to internal services Everything else stays behind the firewall. Why Not Docker? Docker adds ~50MB overhead per container. With 46 services, that's 2.3GB just
Continue reading on Dev.to Webdev
Opens in a new tab


