Back to PortSync Platform
Infrastructure Architecture

Infinite Scalability. Zero DevOps.

PortSync’s architecture is completely stateless. Start with a simple 1-click local Docker setup. When you hit a million views, seamlessly decouple your database and scale the web nodes infinitely behind a load balancer. No command line required.

1

The Starter Setup (Vertical Scaling)

By default, PortSync installs the Next.js web app and the database (PostgreSQL/MongoDB) together inside a single machine via Docker Compose.

Single Node Server (e.g. $5 DigitalOcean Droplet)
Web App (Container)
Database (Container)
How to scale: Just resize the VPS to add more RAM and CPU. The containers will automatically use the extra power. Flawless for up to millions of requests per month.
2

The Decoupling (Migration in UI)

When a single machine is no longer enough, you cannot simply duplicate the machine, otherwise you will have fragmented, isolated databases. You must decouple the database using the Built-in Admin Migration tool.

Step A. Cloud Database
Spin up an external managed Database (AWS RDS, Supabase, Mongo Atlas).
Step B. Built-in Migration
Go to PortSync Settings → Database. Paste your new Cloud DB string. Wait just ONE SECOND for the migration tool to securely move your data.
Zero-Downtime Migration Complete
1.0s
3

Infinite Horizontal Scaling

Because PortSync uses stateless JWT authentication and saves data externally, your web containers are now officially stateless. You can run 10, 50, or 1000 containers behind a load balancer and they will dynamically share the load.

You don't need to manually configure the setup script again. Just boot the script and select Scaling & Advanced Env Management! From there, you can remotely download your existing .env directly to the new machine in seconds. The script automatically handles version control with timestamped backups of your `.env` so you can always safely restore history. The script even provides the exact 1-liner copy/paste Docker command to boot the new Node, or you can simply run the exact same docker-compose.yml file you already know. The script can do it all for you!

Cloudflare / AWS Load Balancer
Node 1
Stateless
Node 2
Stateless
Node 3
Stateless
AWS RDS / Managed DB

If Node 2 crashes, the load balancer instantly redirects traffic to Node 1 & 3. If traffic spikes, auto-scaling groups deploy Node 4 & 5. Zero user data is lost.

    Scaling PortSync - Enterprise Architecture | praveenojha.com