Upstream always NULL

Maxim Dounin mdounin at mdounin.ru
Mon Dec 7 14:37:38 UTC 2015


Hello!

On Mon, Dec 07, 2015 at 05:28:32PM +0400, Tigran Bayburtsyan wrote:

> Can you please send me some good example for upstream module implementation
> ?
> I've been googling all time this 2 days.

The upstream module as well as 5 protocol implementations are 
available in nginx sources:

http://hg.nginx.org/nginx/file/tip/src/http/ngx_http_upstream.c
http://hg.nginx.org/nginx/file/tip/src/http/modules/ngx_http_proxy_module.c
http://hg.nginx.org/nginx/file/tip/src/http/modules/ngx_http_fastcgi_module.c
http://hg.nginx.org/nginx/file/tip/src/http/modules/ngx_http_scgi_module.c
http://hg.nginx.org/nginx/file/tip/src/http/modules/ngx_http_uwsgi_module.c
http://hg.nginx.org/nginx/file/tip/src/http/modules/ngx_http_memcached_module.c

Most simple one is memcached, and I would recommend you to start 
with reading its code if you want to understand how nginx works 
with upstream servers.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list