I have a system with two separate servers and I’m wondering if my approach will cause performance problems as I scale up. Let me explain my setup:
My Current Setup
I run two servers:
-
Public Server - Users can access this to browse products and make purchases. It’s visible to everyone on the internet.
-
Data Server - This holds all the database information and stays hidden from public access.
How They Talk to Each Other
Right now, the public server only contacts the data server when users want to download products with their license keys. The public server runs a script that sends JSON data using curl to the data server. The data server responds with instructions on how to handle the download.
Why I Built It This Way
I wanted to keep the data server completely hidden from users. Even if someone breaks into the public server, they can’t easily access the database without knowing the exact API calls to make.
The Issue I’m Facing
Currently, server communication only happens during downloads, so traffic is low. But I want to add a user dashboard where people can log in, see their licenses, check order history, and manage their accounts. This means the public server will need to make many more requests to the data server for every page load and user action.
I’m concerned this will create a bottleneck and make the user interface slow since every request has to go through this extra step.
Has anyone dealt with similar challenges? What’s the best way to handle this kind of architecture without sacrificing performance?