I googled but i did not understand the difference between nginx stream and upstream block for load balancing.
stream
{
upstream
{
}
}
i showed google that some people used stream block, some people ignored for http load balancing but all people used stream block for tcp/udp load balncing.
when i have to use stream block?
when i may ignore stream block?
Best Answer
Since v1.9.0 Nginx can be used as load balancer for any tcp and udp (mysql, dns, etc..)
https://nginx.ru/en/docs/stream/ngx_stream_core_module.html
So if you want to use nginx as usal (web server only). You don't need this derective. If you need to balance you dns (for example) traffic, use it.