Skip to content

Shared load balancer vs dedicated LB on PaaS — when traffic justifies the move

The shared LB is fine until it isn't. Here are the four signals — connection limits, TLS termination, custom timeouts, SLA — that tell you when a dedicated LB earns its place.

You run a B2B SaaS on managed PaaS behind the platform’s shared load balancer. Latency is fine, the green dot is green, life is good. Then a campaign brings a 6x traffic spike, p95 climbs from 180 ms to 1.4 s, and your trace data points at handshake time, not application time. You open a ticket and discover the shared LB caps you at 2,000 concurrent connections, terminates TLS with a vendor-managed cipher list you cannot tune, has a 60 s idle timeout you also cannot tune, and is sharing CPU with sixty other tenants. Welcome to the conversation about a dedicated LB.

What’s happening

On Jelastic-class PaaS, the shared load balancer is a multi-tenant nginx (or HAProxy) instance that fronts every customer environment on a given hardware node, routing by Host header to the correct container. It costs nothing extra and works perfectly up to a point. That point has four common edges:

  1. Connection ceiling. The shared LB caps concurrent connections per tenant (commonly 1,000–2,000) to keep one noisy customer from starving the others. WebSockets, long-polling, or a campaign spike will hit this ceiling before your app does.
  2. TLS knobs you don’t own. Cipher suite, HSTS preload, OCSP stapling, session ticket lifetime, mTLS — these are platform-wide settings on the shared LB. If your compliance team needs a specific TLS profile (FIPS, PCI-DSS-tuned, mTLS for B2B partners), you cannot get there from the shared LB.
  3. Custom timeouts and large bodies. Idle timeout is typically 60 s. Request body is capped (often 10–50 MB). Streaming uploads, server-sent events, slow webhook receivers — they break against shared-LB defaults and the platform won’t tune them per-tenant.
  4. Sev-1 isolation. A neighbor on the shared node sustains an L7 flood and your handshake latency suffers even though your container is idle. The shared LB is shared CPU. A dedicated LB is your CPU.

A dedicated load balancer is a single-tenant nginx or HAProxy container (sometimes a pair with keepalived for HA) sitting in front of your application tier. You own the config file. You set the connection limit, the cipher list, the timeouts, the rate limits, the access log format. You also own the operational responsibility — restarts during config push, certificate renewal pipeline, capacity planning for the LB itself.

The decision isn’t ideological. It’s traffic shape and config requirements.

How to verify

If you’re not sure you’ve outgrown the shared LB, three quick measurements settle it.

Connection count under load. From a client outside the PaaS, run a sustained load and check what the shared LB reports as concurrent active connections to your environment:

# Sustained 500-concurrent for 60 seconds
hey -z 60s -c 500 https://app.example.com/api/health

# In parallel, ask the platform LB metric endpoint (varies by PaaS):
curl -s https://node-stats.your-paas.example/lb/tenant/$ENV_ID/active

If the active connection count plateaus exactly at a round number (1000, 2000) while the load generator is asking for more, you’re capped.

TLS profile. Pull the actual cipher list and protocols served:

nmap --script ssl-enum-ciphers -p 443 app.example.com
# or
testssl.sh --quiet --color 0 app.example.com

If your compliance scope requires removing TLS 1.0/1.1 (now standard) but also pinning a specific cipher order, disabling session tickets, or enabling OCSP must-staple, and the platform won’t accommodate per-tenant settings, that’s signal #2.

Idle timeout. Open a connection and idle it:

curl -v --keepalive-time 120 https://app.example.com/api/long-poll

If the server resets at exactly 60 s without your app having written anything, that’s the shared-LB idle timeout closing on you.

The fix

The decision tree we use on inherited environments:

  • Stay on shared LB if: request rate is bursty but sub-1k concurrent, TLS is standard, request bodies are small, no L4 needs, no compliance-driven cipher requirements. Most early-stage SaaS lives here happily for years.
  • Move to dedicated LB when: any one of the four edges above is biting weekly, OR you need a stable IP for partner allow-lists, OR you need WAF rules tighter than the platform offers, OR you need mTLS for B2B integrations.

On Jelastic-class PaaS, a dedicated LB is usually one of:

  • nginx in front (most common). Config under your control, supports L7 routing, header rewriting, rate limiting, custom error pages, cache, and TLS termination with whatever profile you need.
  • HAProxy in front (when you need L4 too — Postgres, Redis, MQTT, custom TCP). Also gives you sticky sessions and connection draining that nginx does less elegantly.
  • A pair with keepalived for VRRP failover if a single LB instance is unacceptable. Adds complexity — only worth it above a certain traffic floor.

A starting nginx config we deploy on a dedicated PaaS LB looks like this. Mind the per-zone limits, the upstream keepalive, and the timeouts that you couldn’t tune on shared:

worker_processes auto;
worker_rlimit_nofile 200000;

events {
  worker_connections 16384;
  use epoll;
  multi_accept on;
}

http {
  sendfile on;
  tcp_nopush on;
  tcp_nodelay on;
  keepalive_timeout 75s;
  keepalive_requests 1000;
  client_max_body_size 100m;
  client_body_timeout 60s;
  client_header_timeout 30s;
  send_timeout 60s;
  reset_timedout_connection on;

  # rate limit zones
  limit_req_zone $binary_remote_addr zone=auth:10m rate=10r/s;
  limit_req_zone $binary_remote_addr zone=api:10m  rate=100r/s;
  limit_conn_zone $binary_remote_addr zone=perip:10m;

  upstream app_tier {
    least_conn;
    keepalive 256;
    keepalive_requests 10000;
    keepalive_timeout 60s;
    server 10.20.0.11:8080 max_fails=3 fail_timeout=10s;
    server 10.20.0.12:8080 max_fails=3 fail_timeout=10s;
    server 10.20.0.13:8080 max_fails=3 fail_timeout=10s;
  }

  ssl_protocols TLSv1.2 TLSv1.3;
  ssl_prefer_server_ciphers on;
  ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305';
  ssl_session_cache shared:SSL:50m;
  ssl_session_tickets off;
  ssl_stapling on;
  ssl_stapling_verify on;

  server {
    listen 443 ssl http2;
    server_name app.example.com;

    ssl_certificate     /etc/letsencrypt/live/app.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/app.example.com/privkey.pem;

    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;
    add_header X-Content-Type-Options nosniff always;
    add_header Referrer-Policy "strict-origin-when-cross-origin" always;

    location = /healthz {
      access_log off;
      proxy_pass http://app_tier;
      proxy_connect_timeout 2s;
      proxy_read_timeout 5s;
    }

    location /api/auth/ {
      limit_req zone=auth burst=20 nodelay;
      limit_conn perip 100;
      proxy_pass http://app_tier;
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header X-Real-IP $remote_addr;
    }

    location / {
      limit_req zone=api burst=200 nodelay;
      proxy_pass http://app_tier;
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_read_timeout 300s;
      proxy_send_timeout 300s;
    }
  }
}

Three things in that file that you couldn’t have on shared: the proxy_read_timeout 300s for the streaming endpoint, the explicit cipher list, and the per-IP connection cap. Each of those is a reason a customer asked to move.

If your traffic genuinely justifies a dedicated LB, we run it on managed PaaS with the LB sized to your peak, TLS profile under change control, and capacity alerts wired into monitoring — book a sizing review if you’d like us to look at your current connection telemetry first.