[Feature Request] Load-balanced Shared Libraries

Load-balanced shared libraries so that a Plex client can select from a group of shared Plex Media Servers the server with the fewest number of active remote sessions.

 

Let's say I have two friends (Joe and Bob) sharing their libraries with me.  Each one of those friends has the same video I want to watch.  When I fire up Plex to watch the video the client would see that Joe's server has other remote connections so it would automatically pull the video from Bob's server that isn't busy.  

 

This would save having to share bandwidth and CPU resources with the other people who are currently viewing videos on Joe's server.

The biggest hindrance here is that Plex would have to store a list of each server's libraries. And the associated account links to manage the sharing access portion of it. This is a big security concern for users who may not have the most...kosher collections. Also, how would it definitively identify a media item? What if the servers used different agents to match? 

What if you ran a central server that scanned and managed each PMS database. Example. I run three servers all at different remote locations. Each server contains different media. I then spin up a server that just acts as the control to determine active streams, which content is where, etc. This way it is not something plex manages, but the users manage. So obviously I wouldn't do this with just any users since they will have access to a lot of info, but it would be a possible solution.

Either way it is done. I think this is a worthwhile feature.

I'm not sure how this could be done or if it should be done.

Lets say both Joe and Bob have Top Gun and this is the picture you want to watch.  So you select "Top Gun" and it does it's magic and you start watching it.  Now 5 seconds into the picture you think "Jeeze this looks awe full" on your 75" TV.

You exit and try again and get the same thing.  You talk to both Joe and Bob and find out it's streaming from Joe's server since he had the least load but his version of Top Gun is only DVD quality ripped at 2mbit while Bob had a great copy at 1080p and 18mbit which is the one you obviously would have preferred.

Then there will also be other problems that can occur that could make the decision "faulty".  The combination of your client and the Ops file might play direct from one server and need transcoding from the other.  This could get quite complex.

On the other hand what could be kind of cool is to get a 5 minute sample back from each server you are connected to that shows the overall CPU usage.  You could then make an intelligent decision on your own that way.

The above only mentions CPU but could also be bandwidth restricted which is another obstacle.  A "gauge" or numeric number could be shown for the 5 minute sample that takes both into consideration.  As cool as this could be I don't see it happening.

Where features like this would be handy IMHO is when the OP runs multiple servers and wants to balance them.  But there are better ways to do this.

Good points from everyone.  How about just one Shared Library folder that aggregates all videos shared with you?  You don't see folders for "Joe's Shared Videos" and "Bob's Shared Media", just one "Shared Library" folder.  You go to the folder, select a video you want to watch, and if there are multiple copies available it gives you the option to select the shared server you want to stream from.  For each shared server on the list there are details like quality of the video, number of remote sessions, estimated bandwidth, and any other pertinent information.

You exit and try again and get the same thing.  You talk to both Joe and Bob and find out it's streaming from Joe's server since he had the least load but his version of Top Gun is only DVD quality ripped at 2mbit while Bob had a great copy at 1080p and 18mbit which is the one you obviously would have preferred.

Then there will also be other problems that can occur that could make the decision "faulty".  The combination of your client and the Ops file might play direct from one server and need transcoding from the other.  This could get quite complex.

I do not think this will be as complex as you are thinking. Plex already can determine quality. so in this scenario if your settings are to play files at 1080p it will hit the server that has the file, but in the case that both machines have a high res copy it will prefer the least load. The smart way to do this would be to simply have it focus priorities. the general way i see this is Quality>Network>CPU. It will prefer the quality over anything, then balance network traffic, and lastly CPU. At least this is how i would most likely do it. although I may switch network to a higher priority depending on the day.

I agree it could be done.  I just don't see Plex doing it as they have a long list of request that I'm sure people would prefer to have implemented before this.

I could see this implemented for an Enterprise solution were the library is the same for all the servers in the farm and therefore no need to duplicate library info between the servers since that info would all be the same....

Not sure it would be effective on disparate servers with their own libraries. Cause is the server who has a file the other have is busy then there is no way to solve that with load balancing.

Replying to bring this back to the top. Moderator mentioned this as one of the already existing request. I have seen Plex implement features far newer than this and this is just one of the many similar post asking for the same. Not sure why it hasn’t even been considered yet. Such a useful feature for larger servers.