This Tutorial explains how to implement a MP3 Converter Pro (MCP) Cluster (load-balancing) configuration with multiple MCP instances each running on their own Server.
Tutorial (example) use case:
- A Master Server using the Domain example.com and IP 111.111.111.111
- A Second Server (a.k.a., Worker) using the Domain cdn02.example.com and IP 222.222.222.222
Ensure your DNS is Correctly Configured and an A Record points to each Server!
All website requests MUST be sent to the Master Server (example.com), and the Horizon Queue system (configured on the Master Server) will equally distribute Conversion Jobs to each of your Worker Servers.
The Worker domain cdn02.example.com will only be used by the queue to download/convert files. DO NOT send Backend API requests to it.
You DO NOT need to purchase additional Software Licenses for each Worker. A single MCP license can be used for ALL Worker Servers.
1) Configure Redis (on the Master Server) so that it can communicate with your other Worker Servers.
See How To Configure Redis to use it for a MP3 Converter Pro Cluster (Multi Server).
2) Install the MCP on the Second (Worker) Server in the same way that it is installed on your First (Master) Server. See How To install MP3 Converter Pro.
Important: During the Second (Worker) Server's installation, you must use the same Redis Server details that are used for your Master Server's MCP instance. So, enter the IP of your First (Master) Server into the MCP installer form/utility on your Second (Worker) Server. In this case, for the purpose of this Tutorial, we will enter 111.111.111.111.
3) Open the .env file in the root directory of the Second (Worker) Server's MCP installation.
Change APP_WORKER_NAME="node1" to APP_WORKER_NAME="node2" (or any name that you want). This name must be different on each server!
4) In the Admin Panel of the Worker Server (located at, e.g., cdn02.example.com/admin), you must enable API Mode (and NOT GUI mode), select Enable Subdomain Support, and then enter the Domain of your Worker Server (e.g., https://cdn02.example.com) in the Subdomain used for Download field.
5) Once all previous steps are done, Restart Horizon in Supervisor to activate your new Settings.
You should now see both Master and Worker Servers in the Horizon Dashboard.
That's it!