Upstream block: backup with max_fails=0 does not appear to work as expected

2017-05-17 Thread Jonathan Simowitz via nginx
Hello, I have an upstream block with two servers as follows: upstream { server foo.com; server bar.com max_fails=0 backup; } My desired use case would be that the foo.com server is hit for all requests and can be marked as down by nginx if it starts serving errors. In this case nginx will fa

Passing $upstream_response_time in a header

2017-03-07 Thread Jonathan Simowitz via nginx
Hello, I have an nginx server that runs as reverse proxy and I would like to pass the $upstream_response_time value in a header. I find that when I do the value is actually a linux timestamp with millisecond resolution instead of a value of seconds with millisecond resolution. Apparently this is a

Re: Behavior between upstream hash and backup

2017-01-12 Thread Jonathan Simowitz via nginx
; > On Wed, Jan 11, 2017 at 04:27:51PM -0500, Jonathan Simowitz via nginx > wrote: > > > Hello, > > > > I would like to define an upstream block with a number of servers and > > utilize the hash directive to choose a particular server dependent on the > > requ

Re: Behavior between upstream hash and backup

2017-01-11 Thread Jonathan Simowitz via nginx
< rpapro...@fearnothingproductions.net> wrote: > Hi, > > On Wed, Jan 11, 2017 at 1:27 PM, Jonathan Simowitz via nginx < > nginx@nginx.org> wrote: > >> Hello, >> >> I would like to define an upstream block with a number of servers and >> utilize the has

Behavior between upstream hash and backup

2017-01-11 Thread Jonathan Simowitz via nginx
Hello, I would like to define an upstream block with a number of servers and utilize the hash directive to choose a particular server dependent on the request. There is a chance that the chosen server could fail and so I would also like to configure a backup server to handle the request in this ca