Re: upstream - behavior on pool exhaustion

2017-04-14 Thread B.R. via nginx
Let me be clear here: I got 6 active servers (not marked down), and the logs show 1 attempt on each. They all failed for a known reason, and there is no problem there. Subsequently, the whole pool was 'down' and the response was 502. Everything perfectly normal so far. ​What is unclear is the feat

Re: weight and balancing in upstream proxy

2017-04-14 Thread Frank Liu
Hi Aleks, Those information are extremely helpful. Much appreciated! Regards, Frank On Fri, Apr 14, 2017 at 1:47 AM, Aleksandar Lazic wrote: > Hi. > > Am 12-04-2017 23:50, schrieb Frank Liu: > > Hi, >> >> How does nginx balances traffic to upstream with different weight? >> If I have 3 server

Re: auth_basic and satisfy allowing all traffic

2017-04-14 Thread daveyfx
Hi Francis - That would have been my suspicion as well. To test that theory, I installed the same nginx 1.10.1 RPM file on a similar CentOS 6 virtual machine in my environment. This particular VM has never been used for any nginx testing, nor has it ever had nginx installed. I tested the same s

Re: Unable to resolve the "Access-Control-Allow-Origin" issue

2017-04-14 Thread Ajay Garg
Thanks a ton Richard !! I will ask my colleague if this works in angularjs on Monday; my gut feel is it will :) Thanks a ton guys !!! Thanks and Regards, Ajay On Fri, Apr 14, 2017 at 5:01 PM, Richard Stanway wrote: > You're correct - placing the username and password in the URI is just as > s

Unable to use a GET url-param

2017-04-14 Thread Ajay Garg
Hi All. When I do the following call :: https://username:password@1.2.3.4?upstream_protocol=http I get a 500 error (on the browser-client), with the following seen in /var/log/nginx/error.log (on nginx-server) ## 2017/04/14 13:03:51 [error] 1

Re: Unable to resolve the "Access-Control-Allow-Origin" issue

2017-04-14 Thread Richard Stanway
You're correct - placing the username and password in the URI is just as safe as any other method as long as it's going over HTTPS, and the credentials should never appear in any access logs (unless you specifically choose to log the Authorization header). On Fri, Apr 14, 2017 at 6:47 AM, Ajay Gar

Re: weight and balancing in upstream proxy

2017-04-14 Thread Aleksandar Lazic
Hi. Am 12-04-2017 23:50, schrieb Frank Liu: Hi, How does nginx balances traffic to upstream with different weight? If I have 3 servers in upstream, with weight 1, 2, 4, assuming all are healthy, will nginx send traffic to server 1, 2, 3, 2, 3, 3, 3 or 1, 2, 2, 3, 3, 3, 3? If I have two serve

Re: upstream - behavior on pool exhaustion

2017-04-14 Thread Ruslan Ermilov
On Fri, Apr 14, 2017 at 09:41:36AM +0200, B.R. via nginx wrote: > Hello, > > Reading from upstream > > docs, on upstream pool exhaustion, every backend should be tried once, and > then if all fail the response should be crafte

Re: auth_basic and satisfy allowing all traffic

2017-04-14 Thread Francis Daly
On Thu, Apr 13, 2017 at 11:49:50PM -0400, daveyfx wrote: Hi there, > In both cases, I get a 404 response, which is to be expected as the default > doc root for nginx isn't served on my host. I should expect a 401 on the > second curl test, but I get a 404. If your test nginx.conf contains the o

upstream - behavior on pool exhaustion

2017-04-14 Thread B.R. via nginx
Hello, Reading from upstream docs, on upstream pool exhaustion, every backend should be tried once, and then if all fail the response should be crafted based on the one from the last server attempt. So far so good. I recently

Re: weight and balancing in upstream proxy

2017-04-14 Thread Francis Daly
On Thu, Apr 13, 2017 at 10:08:21PM -0700, Frank Liu wrote: Hi there, > Thanks for confirming that there is no document, and any results observed > through testing or reviewing code will not be guaranteed. I guess it is > purposely undocumented so that people won't rely on one behavior and we are

Re: weight and balancing in upstream proxy

2017-04-14 Thread B.R. via nginx
Please, enlighten us then. --- *B. R.* On Thu, Apr 13, 2017 at 4:34 PM, Maxim Dounin wrote: > Hello! > > On Thu, Apr 13, 2017 at 10:09:16AM +0200, B.R. via nginx wrote: > > > That is an interesting questions as intuitively, people could think the > > former behavior applies. > > > > If I got the