I am looking for a way to load balance multiple plex servers (theoretically for now).
I know there are perhaps better ways to get a high powered PMS solution but I like the idea of load balancing and I am now reaching out to the community to help fill some of the holes.
Explanation:
Ideally, there would be a single load balancing server that would route traffic to various slave PMSs. There would be however, a single (or multiple?) master PMS that would take all requests from Plex.tv (to map servers and such) but also to scan content and write to the PMS db. In my "ideal" load balancing situation, all of the servers would share the metadata and settings libraries via the network but I am not sure this is even possible? The way I see it, this would work best if PMS on all x slaves even thought they had the same UUID. But back to the explanation. As requests come in from end-users the load balancing server would route them based on current server load of the slaves.To ensure plex doesn't get confused or is being "hacked," the load balancer would also tell the routed server to mangle packets sent on the PMS port so that they appear to be coming from the load balancer's IP. Having the same UUID also is key here because the request for content would, ideally, not need to be changed for each server. That is, if a request comes in as ```:32400/servers//tv/mediaid``` then the slave needs to be able to process this as if the content is local to that server.
Is it possible for two plex servers to have the same UUID? Even if its a "hack"
VPS's could be potentially anywhere. What type of realistic expectations surround hosting the PMS metadata library via network?
Aside from network and speed constraints. Are there any race conditions that need to be considered with multiple PMSs using the same metadata folders?
Update:
I have updated the drawing in the link above with some goodies for those of you watching this thread. Below are answers to 2 of the questions
Q: Is it possible for two plex servers to have the same UUID? Even if its a "hack"
A: No. If two servers have the same uuid Plex will "pick one" and roll with it.
Q: VPS's could be potentially anywhere. What type of realistic expectations surround hosting the PMS metadata library via network?
A: Although I have not had time to test this for myself, from my readings it seems to be a horrible idea.
Lastly for now, turns out I was working on the wrong end of the stick in thinking that all PMS "slaves" needed the same uuid. It was much easier to make plex think a request belonged to one of many uuid's.
Whoops, I shouldn't be giving out secrets.. yet.... XD
Was just thinking of the same thing as I ran into a problem.
I have a physical PMS server, now I was thinking of making it virtual, so I loaded my VMWare ESXi host and converted my physical PMS server.
Now the interesting thing happens.
As the virtual server (with a new name PMS2 and a different IP) connects it fights the plex service for the server "slot", so every once in a wile it states PMS1 and then PMS2...
The sharing is the same for the two servers without any reconfiguration.
Maybe a bug maybe a feature...
If the PMS metadata where to be located on a disk shared by the servers you might be able to put any load balancer in front of it...
I have just configured a load balancer in my Firewall and so far so good, I will let you know how it works out.
I guess the have as the virtuall is a clone of the physical. I plan to use the same friendly name, but for now I use different to keep track. But it seems like it does not matter for function.
I will try to use the same metadata or a sync tool to have the metadata be the same on both servers.
I wish this was a possibility, since it's much cheaper building mid-end servers that could balance the traffic vs. a single high-end server, at least whiteboxes.
Bump for this. I’m seeing transcode capacity issues running a VM on my ESX server, I’m thinking about running multiple plex VMs to help. Adding more CPUs to my single plex server hasn’t helped at all and making a huge VM is bad for the environment overall.
I know this post is old but, if you wanted to load balance with 2 phyiscal servers you can use HAproxy in front of the 2. If you want to know more I can go into detial.