From 5dfeeb9d08f53b70d0dde6e481853106cbfa8f8d Mon Sep 17 00:00:00 2001 From: N Date: Fri, 25 Jan 2019 22:50:00 +0000 Subject: [PATCH] Fully document #193 stream module --- pillar.example | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pillar.example b/pillar.example index 4188c43..f522bc5 100644 --- a/pillar.example +++ b/pillar.example @@ -110,6 +110,7 @@ nginx: access_log: [] #suppress default access_log option from being added ### module nngx_stream_core_module + ### https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/#example stream: upstream lb-1000: - server: @@ -119,6 +120,26 @@ nginx: listen: 1000 proxy_pass: lb-1000 + upstream stream_backend: + least_conn: '' + 'server': 'backend1.example.com:12345 weight=5' #one way + 'server backend2.example.com:12345 max_fails=2 fail_timeout=30s': '' + 'server backend3.example.com:12345 max_conns=3': '' #another way + upstream dns_servers: + least_conn: + 'server 192.168.136.130:53': '' + 'server 192.168.136.131:53': '' + 'server 192.168.136.132:53': '' + + 'server ': + listen: '53 udp' + proxy_pass: dns_servers + + 'server ': + listen: 12346 + proxy_pass: backend4.example.com:12346 + + servers: disabled_postfix: .disabled # a postfix appended to files when doing non-symlink disabling