# Is load balancing possible?

**URL:** <https://forums.plex.tv/t/is-load-balancing-possible/233076>\
**Category:** General Discussions\
**Created:** [April 18, 2018, 6:16pm UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076 "2018-04-18T18:16:18Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![SecurityPlus](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@SecurityPlus](https://forums.plex.tv/u/SecurityPlus)\
**Post date:** [April 18, 2018, 6:16pm UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/1 "2018-04-18T18:16:18Z")

</div>

I have been running Plex for about 4 years. I run it on a NUC (Next Unit Computing) system. My CPU has a benchmark score of about 10,000. It’s an i7, 16 gigs memory, blah blah. I can have about 8-10 family/friends connected with no issues as long as they aren’t all transcoding (can handle about 5 transcodes without issues though).

I now am getting fiber internet installed so only bottleneck is transcodes at times. I wanna build a duplicate hardware server which would cost about $700. Is there a way to have the two pieces of hardware load balance to share the work that is pushed out via fiber (1,000 up and down)??

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 18, 2018, 6:22pm UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/2 "2018-04-18T18:22:39Z")

</div>

Nothing automatic.  
All you can do is to tell your sharees to switch servers when they experience buffering.

---

<div class="post-metadata">

**Author:** ![SecurityPlus](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@SecurityPlus](https://forums.plex.tv/u/SecurityPlus)\
**Post date:** [April 18, 2018, 8:18pm UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/3 "2018-04-18T20:18:55Z")

</div>

What is the biggest cause of transcoding; the end users playback device not having the correct codecs to play a file so my end pre-converts it on the fly, correct?

If so, is Chromecast and Roku the best devices for end users to use for least chance of transcoding?

---

<div class="post-metadata">

**Author:** ![rbeatse](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/rbeatse/32/81857_2.png) [@rbeatse](https://forums.plex.tv/u/rbeatse)\
**Post date:** [April 18, 2018, 8:29pm UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/4 "2018-04-18T20:29:15Z")

</div>

> @theDwiz said:  
> What is the biggest cause of transcoding; the end users playback device not having the correct codecs to play a file so my end pre-converts it on the fly, correct?

I believe it depends on how your have encoded the files originally. If you have encoding them in a manner that Chromecast and/or Roku can play natively, then no transcoding is needed. If you encode them for Roku but your users all use AppleTV, then they may have to transcode them.

You can also have the Plex server pre-transcode your movies into multiple formats so that less on the fly transcoding is needed. Maybe you could encode one way on one of your servers and a different way on your other one. Then you could tell people that have Player X to use Server X and those that have player Y and Z to use Server YZ.

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 18, 2018, 8:59pm UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/5 "2018-04-18T20:59:15Z")

</div>

> @theDwiz said:  
> What is the biggest cause of transcoding; the end users playback device not having the correct codecs to play a file so my end pre-converts it on the fly, correct?

This  
or bitrate too high  
or subtitles activated (even more so, when subs are in a ‘bitmap’ format, like PGS or VOBSUB)

> If so, is Chromecast and Roku the best devices for end users to use for least chance of transcoding?

CC is the most restriced  
Roku is better

the least chance of transcoding is if you are using  
either Kodi (with Plex4Kodi Addon)  
or Plex Media Player on PC/Mac  
or the nVidia Shield TV console

---

<div class="post-metadata">

**Author:** ![stevencas](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@stevencas](https://forums.plex.tv/u/stevencas)\
**Post date:** [April 19, 2018, 2:35pm UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/6 "2018-04-19T14:35:24Z")

</div>

there is an unofficial transcoderscript that does this (in linux). I haven’t tried it myself yet.

> **[Plex Remote Transcoder - A distributed transcoding backend for Plex](https://forums.plex.tv/discussion/178320/plex-remote-transcoder-a-distributed-transcoding-backend-for-plex)**
>
> I just came across this repo and couldn’t find a post on here about it. I AM NOT THE DEVELOPER, but I am really excited about this and have been waiting for something like this. Would love to hear peoples take/opinion on this project.

As for chromecast, plex should allow us to ban certain clients on our servers to avoid transcoding.

---

<div class="post-metadata">

**Author:** ![Chadimus](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@Chadimus](https://forums.plex.tv/u/Chadimus)\
**Post date:** [December 23, 2018, 9:57pm UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/7 "2018-12-23T21:57:18Z")

</div>

You can put a proxy in front of the 2 to load balance. HAproxy is going to be your best bet. I can go into more detail if you want more info on how to set this up. its pretty easy.

---

<div class="post-metadata">

**Author:** ![CaptiveCreeper](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@CaptiveCreeper](https://forums.plex.tv/u/CaptiveCreeper)\
**Post date:** [December 26, 2018, 4:01am UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/8 "2018-12-26T04:01:21Z")

</div>

Would this split the load of a single stream or would it decide on the server and stick with it for the entity of the stream? Also would the servers then have synced watch history? Would it have to be HAproxy or would ngix/apache reverse proxy work as well? Any answer is appreciated.

---

<div class="post-metadata">

**Author:** ![RazorBlades](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@RazorBlades](https://forums.plex.tv/u/RazorBlades)\
**Post date:** [December 26, 2018, 4:09am UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/9 "2018-12-26T04:09:42Z")

</div>

> [@SecurityPlus](#):
>
> What is the biggest cause of transcoding; the end users playback device not having the correct codecs to play a file so my end pre-converts it on the fly, correct?

Yes, this is very true. I have different devices within my setup, so I opted to convert my content after recording it, or downloading it using HandBrakeCLI. After month and months of research on the best option, plus trial and error, I found this conversion worked the best. And will give you "Direct Play " for playback on your devices, which is great in a prefect world.

```auto
HandBrakeCLI -i <input file> -o <output file> --optimize --two-pass --turbo --preset "Universal"

```

Enjoy all ! this keeps your format of the original to your newly streamed file. Meaning if the original is 1080p, your end file is 1080p, and likewise 720p and so on. Audio, if done in dolby 3.1 or 5.1, you’ll also get the same result on your convert file. 🙂

---

<div class="post-metadata">

**Author:** ![TeknoJunky](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/teknojunky/32/165055_2.png) [@TeknoJunky](https://forums.plex.tv/u/TeknoJunky)\
**Post date:** [December 26, 2018, 5:23am UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/10 "2018-12-26T05:23:51Z")

</div>

for many people the bottleneck on remote clients is often the server’s internet upload speed

if you are getting fiber, then you are probably getting a pretty fast upload speed, then your remote clients can most likely direct play.

ie if your getting 100+ meg upload, then as long as your clients are getting 20-30+ download then they should be able to direct play pretty much everything up to bluray quality.

assuming of course the clients are not transcoding because of codec incompatibilities as previously discussed above.

---

<div class="post-metadata">

**Author:** ![Chadimus](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@Chadimus](https://forums.plex.tv/u/Chadimus)\
**Post date:** [December 26, 2018, 9:34pm UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/11 "2018-12-26T21:34:28Z")

</div>

The proxy would identify the sever with the least clients connected to it and stick with that server the whole stream. As for nginx or Apache. Those are for reverse proxy. Maybe nginx has a load balancing function but I don’t have much experience with it. As far as the servers syncing with data about who has watched what, I would assume they would sync because it’s still all on one plex pass account but that’s just my theory.

---

<div class="post-metadata">

**Author:** ![CaptiveCreeper](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@CaptiveCreeper](https://forums.plex.tv/u/CaptiveCreeper)\
**Post date:** [December 27, 2018, 12:19am UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/12 "2018-12-27T00:19:55Z")

</div>

Ahhh. I was hoping for something that would split stream across multiple servers because I cant get even 1 stream to go outside my network without artifacting. And on the syncing if it is just a sticky load balance one server will take an entire request and therefore only that server would have the watch history. Watch history is per server not per account. Even if all the servers are under the same plex pass account.

---

<div class="post-metadata">

**Author:** ![Chadimus](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@Chadimus](https://forums.plex.tv/u/Chadimus)\
**Post date:** [December 27, 2018, 1:11am UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/13 "2018-12-27T01:11:30Z")

</div>

Oh ok. I actually see some weird artifacts while playing on my xbox one X locally. I have a really beefy 26 thread beast and I still see issues but if I play the same movie on the shield TV I see no issues whatsoever. maybe its a client issue?

---

<div class="post-metadata">

**Author:** ![CaptiveCreeper](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@CaptiveCreeper](https://forums.plex.tv/u/CaptiveCreeper)\
**Post date:** [December 27, 2018, 1:24am UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/14 "2018-12-27T01:24:30Z")

</div>

Dont think so. It happens on my laptop over the internet but when on local network it doesn’t.

---

<div class="post-metadata">

**Author:** ![Chadimus](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@Chadimus](https://forums.plex.tv/u/Chadimus)\
**Post date:** [December 27, 2018, 1:43am UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/15 "2018-12-27T01:43:18Z")

</div>

Ahhh. Are you over wifi? if so, does your wifi support 5GHz band? If it does I would use that instead of 2.4GHz. Playback will clear right up.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 12:56am UTC](https://forums.plex.tv/t/is-load-balancing-possible/233076/16 "2020-01-08T00:56:23Z")

</div>


