./prontouso.com
WEB & JARINGAN

Simulator Load Balancer

Visualisasikan cara kerja load balancer dalam membagi request web ke sekumpulan backend server dengan algoritma Round Robin, Weighted Round Robin, IP Hash, dan Least Connections.

Status alatBerjalan di browser Anda
Pratinjau

Load Balancer Simulator

Algorithm

Servers

  • Server 1Weight:
  • Server 2Weight:
  • Server 3Weight:

Weight only affects the weighted round robin algorithm.

Distribution

  • Server 1
    7 requests (35%)
  • Server 2
    7 requests (35%)
  • Server 3
    6 requests (30%)

Cara kerja

  1. Masukkan data Anda

    Isi nilai yang diperlukan, tempel teks Anda, atau unggah file yang ingin diproses.

  2. Lihat hasil seketika

    Sebagian besar alat diperbarui secara langsung saat Anda mengetik; beberapa menggunakan satu tombol tindakan.

  3. Gunakan hasil Anda

    Salin, unduh, atau bagikan hasil yang dihasilkan — Anda selalu memiliki kendali penuh atas data Anda.

Privasi dan pemrosesan dataBerjalan secara lokal di browser Anda. Alat ini tidak mengunggah data Anda.

Apa itu Simulator Load Balancer?

Simulate how round robin, weighted round robin, and least-connections algorithms distribute a stream of requests across servers.

PAHAMI CARA KERJA ALAT

How the load balancer simulator works

The three algorithms

  • Round robin — cycles through servers in a fixed order, ignoring load.
  • Weighted round robin — the same rotation, but servers with a higher weight get proportionally more turns (using the smooth algorithm nginx uses internally).
  • Least connections — routes each new request to whichever server currently has the fewest still-active requests.

How to use it

  • Pick an algorithm and add or remove simulated servers.
  • Set a weight per server (used only by weighted round robin).
  • Set how many requests to simulate and how long each one keeps a server busy.

What "request duration" models

Least connections only differs from round robin once requests take more than one tick to finish — that's what lets some servers still be "busy" when the next request arrives, which is exactly the condition least-connections is designed to react to.

Weighted round-robin example

Weights 5:1:1

Smooth weighted round robin gives more turns to the strongest server while still spacing weaker servers into the sequence.

A, A, B, A, C, A, A

Simulation notes

Server weights and request counts are simulated locally. No network requests are sent to any real backend or load balancer.

Pertanyaan yang Sering Diajukan (FAQ)

Which algorithm should I actually use in production?

Round robin works well when every server is equally sized and requests are roughly equal cost. Weighted round robin suits a mix of server sizes. Least connections tends to perform best when request duration varies a lot.

Is this exactly how a real load balancer works?

It models the core decision logic correctly (including nginx's actual smooth weighted round-robin algorithm), but a production load balancer also handles health checks, connection draining, and session affinity, which this simulator doesn't.

Why does least-connections need a request duration at all?

Without one, every request would be considered "finished" instantly, and every server would always show zero active connections — making least-connections indistinguishable from round robin.

Does least connections know future request duration?

No. It only counts requests still active at the current tick, then chooses the server with the fewest active requests.