[Nginx] 使用Proxy實作Load Balancer

Nginx設定: 直接給範例: # nginx conf http { upstream myapp1 { server srv1.example.com; server srv2.example.com; server srv3.example.com; } server { listen 80; location / { proxy_pass http://myapp1; } } } 簡而言之,在Http設定內註冊Upstream,在Server內使用Proxy Pass調用該Upstream Server Group。 分派演算法: round-robin — requests to the application […]