Welcome! Log In Create A New Profile

Advanced

Re: pls. help for adding another parameter to ngx_upstream_server

Maxim Dounin
November 26, 2013 11:39AM
Hello!

On Tue, Nov 26, 2013 at 06:37:59PM +0900, moto kawasaki wrote:

>
> Hello,
>
> I am the questioner about setfib feature on the upstream side.
> And I am back for asking you comments/suggestions/help.
> Thank you very much in advance.
>
> Please refer the following URL for the conversation before.
> http://forum.nginx.org/read.php?29,244686
>
> mdounin> Well, as far as I can tell there is no reasons to do per-server
> mdounin> setfib in this usecase, and
> mdounin>
> mdounin> proxy_setfib N;
> mdounin>
> mdounin> should be enough. It should be much easier to implement than what
> mdounin> you are trying to do in your patch.
>
> Thank you very much, Mr. Dounin, I followed your advice.
>
> Now, I am refering src/http/modules/ngx_http_upstream_keepalive_module.c,
> and create a new module "ngx_http_upstream_proxy_setfib_module.c".
>
> With this module, I can write "setfib N" in nginx.conf like;
>
> http {
> (snip)
> upstream UPSTREAM {
> proxy_setfib 5;
> server 10.200.195.70:80 max_fails=3 fail_timeout=300;
> }
> }
>
> And also I can create server config for this module, and the config
> "proxy_setfib 5" can be read and set into server config.

Why you are trying to do this with a balancer module? You won't
be able to do this with a balancer module anyway, as you'll have
to call setsockopt() on a socket after it's created but before the
connect() is called, which is only possible with modifications to
ngx_event_connect_peer().

Try following proxy_bind implementation as already suggested.

[...]

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

pls. help for adding another parameter to ngx_upstream_server

moto kawasaki 1002 November 15, 2013 03:38AM

Re: pls. help for adding another parameter to ngx_upstream_server

Vladimir Homutov 348 November 15, 2013 04:44AM

Re: pls. help for adding another parameter to ngx_upstream_server

moto kawasaki 379 November 16, 2013 04:34AM

Re: pls. help for adding another parameter to ngx_upstream_server

Maxim Dounin 392 November 18, 2013 09:10AM

Re: pls. help for adding another parameter to ngx_upstream_server Attachments

moto kawasaki 341 November 26, 2013 11:39AM

Re: pls. help for adding another parameter to ngx_upstream_server

Maxim Dounin 334 November 26, 2013 11:39AM

Re: pls. help for adding another parameter to ngx_upstream_server

moto kawasaki 297 November 26, 2013 09:08PM

Re: pls. help for adding another parameter to ngx_upstream_server

moto kawasaki 443 November 29, 2013 02:06AM

Re: pls. help for adding another parameter to ngx_upstream_server

Maxim Dounin 356 November 15, 2013 05:26AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 69
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready