This just popped into my head, I haven't given it much thought but it sounds plausible.
Basically you have a bunch of servers (Cloud/VPS/DEDI) that sync their db's and share the same file server. A load balance would be programmed to distribute based on CPU load
Assuming this would work, why would anybody want to do this? For home users its way easier and cheaper to just upgrade the PMS hardware. For Business users: Well, i really don't see distributing media through plex could be a valid business model :P
I am looking into setting up a small beowolf cluster myself. Finding little completed info on the subject in regards to Plex
Assuming this would work, why would anybody want to do this? For home users its way easier and cheaper to just upgrade the PMS hardware. For Business users: Well, i really don't see distributing media through plex could be a valid business model :P
Because I would have to spend >$1000 for a 12k passmark system where 2x $99 Unix surplus servers have the potential of 13k passmark. . . .and that is scalable. great potential if serving to many users (exp. in my situation where I have all large .mkv's and serving to low powered Samsung TVs & Bluray players.
I've been thinking about this for a while actually but figured I'd wait and see if GPU encoding was implemented.
I'm running my Plex server on a Ubuntu VM hosted in ESXI. Unfortunately there's just not enough power to handle more than one high quality transcode at the same time. At the same time - upgrading that server would be very costly and difficult. I've also got another machine that runs almost 24/7 and could at least handle one more stream at the same time.
Lately I've been wondering if possibly a plugin would work - I haven't done the research so I'm not sure but what I was thinking isn't far off from what you described but it would basically run off the 'main' server.
Each box would run a server
The main server would actually be the one exposed and advertising.
When a stream is requested the main server will check it's current load (CPU mostly) and any other server in the pool. The nodes in the pool could also transmit that information in a heartbeat as well.
Once the server with the resources to spare was selected - that's where things can either get hacky or elegant. My first thought, without having done research into extending/modifying plex directly, by one of the following hacks: some clever share mapping and/or URL rewriting, hijacking and modifying the stream URL passed back to the client, start the transcode from the main server and then pass that file onto the client, and more along those lines. But essentially they're all trying to make it possible to pass off to another.
I'm sure someone is much more knowledgable and can immediately strike out one or more - or all - of those ideas as impossible, but I'm hoping that there's a way to get more access into the logic directly to do it 'The Right Way'.
Anyway, I'll try to keep an eye on the topic. I'm hoping to get some time away from work at some point, and my other hobbies that are in the queue, to dedicate some time to this. I do have a background in video encoding and I'm a software dev by trade - so you never know :)
Lately I've been wondering if possibly a plugin would work - I haven't done the research so I'm not sure but what I was thinking isn't far off from what you described but it would basically run off the 'main' server.
Each box would run a server
The main server would actually be the one exposed and advertising.
When a stream is requested the main server will check it's current load (CPU mostly) and any other server in the pool. The nodes in the pool could also transmit that information in a heartbeat as well.
Once the server with the resources to spare was selected - that's where things can either get hacky or elegant. My first thought, without having done research into extending/modifying plex directly, by one of the following hacks: some clever share mapping and/or URL rewriting, hijacking and modifying the stream URL passed back to the client, start the transcode from the main server and then pass that file onto the client, and more along those lines. But essentially they're all trying to make it possible to pass off to another.
That actually sounds quite plausible. Unless everything's done locally or via VPN, I think the encoding server will have to pass the encoded stream to the main server to send to the client. Mind, it's easy enough to make the Transcoding Cache a network share where secondary servers can write the encoded streams/chunks to. That said, I'd hate to see the power bill and air conditioning costs for such a set-up. Maybe okay if you live in colder climes, alas, I'm located in sunny SoCal.
That actually sounds quite plausible. Unless everything's done locally or via VPN, I think the encoding server will have to pass the encoded stream to the main server to send to the client. Mind, it's easy enough to make the Transcoding Cache a network share where secondary servers can write the encoded streams/chunks to. That said, I'd hate to see the power bill and air conditioning costs for such a set-up. Maybe okay if you live in colder climes, alas, I'm located in sunny SoCal.
Sure - I think most people would not need this at all. Definitely not a priority for the Plex team. In my particular setup, though, it would be ideal since I'm not planning on like 5 servers or anything. My ESXI box (which hosts the VM running PMS) is pretty much maxed out with other VMs. I have a Windows desktop that's usually running 24/7 that also hosts some other services that are not CPU intensive. It also has pretty decent power management.
On the other hand, it might be more worth the time to look into GPU assisted transcoding. It's been a while since I last checked but I'm pretty sure the transcoder is CPU only. Or maybe HW decoding only? ffmpeg does have support for decoding for some codecs. It has more limited support for encoding (OpenCL for filters and in some libx264 lookahead operations). It has to be a matter of time though. Not to mention, maybe it's possible to setup a third party/propriety encoder to be used from ffmpeg and built with the plex transcoder source. So if that ended up making more sense, in my case, I'd add some kind of supported graphics card into my ESXI server and assign pass through to the PMS VM.
Either way, looks like there's no magic bullet for this yet beyond adding/upgrading CPUs or building a new machine.
On the other hand, it might be more worth the time to look into GPU assisted transcoding. It's been a while since I last checked but I'm pretty sure the transcoder is CPU only. Or maybe HW decoding only? ffmpeg does have support for decoding for some codecs. It has more limited support for encoding (OpenCL for filters and in some libx264 lookahead operations). It has to be a matter of time though. Not to mention, maybe it's possible to setup a third party/propriety encoder to be used from ffmpeg and built with the plex transcoder source. So if that ended up making more sense, in my case, I'd add some kind of supported graphics card into my ESXI server and assign pass through to the PMS VM.
Either way, looks like there's no magic bullet for this yet beyond adding/upgrading CPUs or building a new machine.
Alas, you do need a fairly recent Intel CPU - Sandy Bridge or newer and even then, it was only available on higher end Sandy and Ivy. Of course now, even a $40 Celeron Haswell has it. Heck, even some Bay Trail models have QuickSync.
To be honest, I looked into QuickSync because I couldn't stand the transcode quality of the Plex Transcoder. On the videos I've tried, QSV Balanced, High L4.0, QP 20 was better than x264 Very Fast, High L4.0, CRF 20 and on par with x264 Medium, High L4.0, CRF 20 (all on Handbrake Nightly).
Didn't much like QSV for SD content, though. Lots of old DVDs tend to have crap quality to begin with so had to go with x264 Very Slow on those to get something with acceptable quality without going insanely high on bitrates. I use x264 Very Slow, High L4.0, CRF 18 for SD.
And yes, I keep 2 copies of videos on my server. The original 1:1 rip I use for playback on HTPCs. Then 720p CRF 20 encodes for Blu-ray and 480p CRF 18 for DVDs. Don't have unlimited LTE data so for us, primary use of Plex is for Plex Sync.
I think a simpler execution would be that a second server could be set as a transcoder. Then when/if the first one becomes overloaded, the first (master server) points a client to the second (slave) server to to get content from. In this way the client is oblivious.
Though I am not sure if there is value in baking this complexity into the server software vs upgrading hardware or adding a second stand alone server.
I think a simpler execution would be that a second server could be set as a transcoder. Then when/if the first one becomes overloaded, the first (master server) points a client to the second (slave) server to to get content from. In this way the client is oblivious.
Only issue with this is if you're doing remote connections, the remote client will either have to VPN to the network or you're going to have to enable port forwarding for each of your additional transcoder servers.
I have built my own Plex Cluster in a sense. I have connected My Public Domain Name to My Main PLEX Server which is the First Server in my Cluster. I have a Static IP Address through my Business Gateway with an 80MBPS Download and a 20MBPS Upload. I have a Block of Five each other Address to each other PLEX Server is a Subdomain of that Address. Each with their own Domain Web Login.
Each Server in Conjunction with my PLEX PASS is managed through 1 PLEX Web Interface. On a PLEX enabled device it just displays the media from all the Servers.
It is fairly simple and straight forward. By doing this allows Multiple Streams Per PLEX Server. This takes a huge LOAD Off of the system opposed to having 1 Server handle all the Transcoding.
It's simple, Godaddy Hosts my Domain Name: myplexhome.com, My Cable Modem/Gateway is Public Static IP's so there is no Port Forwarding. At the Godaddy side I Forward my Domain Name to the IP Adress:32400/web of my First PLEX Server. I create a Sub Domain For Each of the Other PLEX Servers, such as: AMD, AMD2, OPTIPLEX, PARASERV. Which I can Log in Directly to The PLEX Server or manage them all through the main Domain Name amd.myplexhome.com, amd2.myplexhome.com, optiplex.myplexhome.com, paraserv.myplexhome.com or just myplexhome.com. Secure them with signing in with your PLEX Account and then your PIN that you create on the Main PLEX Server. From there Create User Accounts for Friends and Family or share Media with Other PLEX Users.
I have 2 Servers Running on Windows 7 Ultimate and the other 2 run on UBUNTU 15 with Kernel 4.0.0RC4
Windows Machines are AMD QUAD Core Systems with 6GB DDR2 and the other 8GB DDR3. I have about 6.5TB of storage spanned accross my whole Network. and the UBUNTU Machines are Intel Core Duo's 2.80GHZ with 2GB DDR2 RAM.
@cjparad said:
I have 2 Servers Running on Windows 7 Ultimate and the other 2 run on UBUNTU 15 with Kernel 4.0.0RC4
Windows Machines are AMD QUAD Core Systems with 6GB DDR2 and the other 8GB DDR3. I have about 6.5TB of storage spanned accross my whole Network. and the UBUNTU Machines are Intel Core Duo’s 2.80GHZ with 2GB DDR2 RAM.
How did you set everything up on the PMS side? Like where is the Media?
Are you using a central file server location, or is your media split between the various servers?
If you are splitting your media then the load balancing is being done depending on where each media file is stored. Or does he primary PMS know to assign out task to the other servers?
Sorry I know this thread is a bit old but found it while google search and it is an interesting topic.
@cjparad
I have been thinking of how to do something similar or the same. Mine just being spanning media across different machines that would be managed through the central server without having it show as many individual servers.
@cjparad said:
I have 2 Servers Running on Windows 7 Ultimate and the other 2 run on UBUNTU 15 with Kernel 4.0.0RC4
Windows Machines are AMD QUAD Core Systems with 6GB DDR2 and the other 8GB DDR3. I have about 6.5TB of storage spanned accross my whole Network. and the UBUNTU Machines are Intel Core Duo’s 2.80GHZ with 2GB DDR2 RAM.
How did you set everything up on the PMS side? Like where is the Media?
Are you using a central file server location, or is your media split between the various servers?
If you are splitting your media then the load balancing is being done depending on where each media file is stored. Or does he primary PMS know to assign out task to the other servers?
Sorry I know this thread is a bit old but found it while google search and it is an interesting topic.
Really interested to find this out too.
Please reply!
@DanNEBTD said:
Because I would have to spend >$1000 for a 12k passmark system where 2x $99 Unix surplus servers have the potential of 13k passmark
…and then after a while those two old surplus unix servers have added so much to your electricity bill you would’ve been better-off building that single big system using modern hardware.
And for the record: it does not cost >$1000 for a 12K Passmark system. You can get a i7-4790K for under $300 and then build up from there.
And finally: anyone needing this is likely using Plex in a way that violates its TOS, and perhaps outright illegal.
@DanNEBTD said:
Because I would have to spend >$1000 for a 12k passmark system where 2x $99 Unix surplus servers have the potential of 13k passmark
…and then after a while those two old surplus unix servers have added so much to your electricity bill you would’ve been better-off building that single big system using modern hardware.
And for the record: it does not cost >$1000 for a 12K Passmark system. You can get a i7-4790K for under $300 and then build up from there.
And finally: anyone needing this is likely using Plex in a way that violates its TOS, and perhaps outright illegal.
Not anymore “suspecious” then the fact that we are able to invite “friends” to a server, so thats a pretty terrible arguement.
@DanNEBTD said:
Because I would have to spend >$1000 for a 12k passmark system where 2x $99 Unix surplus servers have the potential of 13k passmark
…and then after a while those two old surplus unix servers have added so much to your electricity bill you would’ve been better-off building that single big system using modern hardware.
And for the record: it does not cost >$1000 for a 12K Passmark system. You can get a i7-4790K for under $300 and then build up from there.
And finally: anyone needing this is likely using Plex in a way that violates its TOS, and perhaps outright illegal.
I made this post in early 2015 after just creating an i7-4790K rig:
Asus Sabertooth Z97: $170
I7-4790K: $339
GSKILL 16GB Ram: $140 (yes, you could halve the ram)
240 SSD $110
Power Supply ~100 (I reused an existing PC&P)
Video Card: Irrelevant per discussion as this would only be server
Case: ~$50
Total: $910 . … I’m sorry for being $90 off. . .i guess I could throw in a monitor keyboard/mouse to make it up.
And If I have a family of 4, three kids streaming to Samsung TV’s, maybe I’m syncing for a work trip. . .my parents logon to watch a movie I told them about. . . all trying to access my 1080p+ high quality ripped blurays ro TV shows then yes . . my non-TOS violating self could easily approach those limits and I don’t think it is that unreasonable of a system. . . . and that’s without hoping to maybe support 4k, atmos, etc. in the future.
. . . And the point of this post/thread is expandability. When I do hit that limit I would like to throw on another server/computer that I acquired for free rather than build up a new one. . .assuming I haven’t hit the limit of the current processors without going to dual proc boards or expensive DDR4 rigs. (Referencing 2014 pricing, been out of market for a year)