# HAProxy and Plex = Endless Lag/Buffering

**URL:** https://discourse.haproxy.org/t/haproxy-and-plex-endless-lag-buffering/9329
**Category:** Help!
**Created:** [December 15, 2023, 3:58pm UTC](https://discourse.haproxy.org/t/haproxy-and-plex-endless-lag-buffering/9329 "2023-12-15T15:58:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Zacherl](https://avatars.discourse-cdn.com/v4/letter/z/8dc957/32.png) [@Zacherl](https://discourse.haproxy.org/u/Zacherl)
#### Post date: [December 15, 2023, 3:58pm UTC](https://discourse.haproxy.org/t/haproxy-and-plex-endless-lag-buffering/9329/1 "2023-12-15T15:58:07Z")

</div>

Hi there,

I’m using HAProxy for SSL termination for a Plex server. Unfortunately I can’t get this setup to work correctly. While I can successfully connect through the proxy and start streaming, the stream is lagging very hard. In the Plex Dashboard I can see that the bandwidth is capped at ~10 MBits and the bandwidth graph has a tooth pattern (ranging from 0 to 10 MBits). As soon as I remove HAProxy from the equation, the graph looks more like a flat line and correctly settles at about 25 MBits (which is what I’ve configured as the limit in Plex itself).

Any ideas what I could try?

This is my current config:

```auto
global
  log stdout format raw local0
  maxconn 100000
  nbthread 4
  tune.ssl.default-dh-param 2048

defaults
  timeout connect 10s
  timeout client 30s
  timeout server 30s
  log global
  option httplog
  maxconn 10000

frontend www-no-cache
  mode http
  bind :2096 ssl crt /certs/DOMAIN.de.all.pem
  option forwardfor if-none
  http-request replace-header x-forwarded-for ^ "%[req.fhdr(x-forwarded-for)], %[src]"
  use_backend plex.DOMAIN.de if { req.hdr(host) -i plex.DOMAIN.de:2096 }
  default_backend access_denied

resolvers default
  parse-resolv-conf

backend access_denied
  mode http
  http-request deny

backend plex.DOMAIN.de
  mode http
  server s1 plex.lan.DOMAIN.de:32400 resolvers default

```
