Welcome! Log In Create A New Profile

Advanced

Re: nginx mogilefs module 1.0.1

Maxim Dounin
April 16, 2009 09:19AM
Hello!

On Thu, Apr 16, 2009 at 01:49:46PM +0100, Valery Kholodkov wrote:

>
> ----- "Maxim Dounin" <mdounin@mdounin.ru> wrote:
>
> > Not really used (and not likely to in near future), but here are
> > some questions:
> >
> > 1. Any reason why you create hidden location from the module instead
> > of accepting name of existing one? It looks unnatural for me.
>
> There are several reasons:
>
> 1) The other way around looks unnatural to me :)
> 2) People will tend to forget internal; directive, leaving fetch locations open to public, which is kinda security hole. You did it as well, by the way:) I don't feel comfortable with it.
>
> In alpha version of this module, however, mogilefs_pass took location name as an argument as you describe. This also allowed to compile module with nginx 0.6.x.
>
> I don't know where the balance is at the moment. I don't have enough feedback.

They will be unable to fetch anything without appropriate variable
correctly set.

And personally I think that security is quite a different thing
and should be handled in the way admin prefers. It may be
internal, may be allow/deny, may be something else. That's why I
usually omit internal from the examples. And any magic is really
bad here since people may think that software will handle security
for them while it actually can't.

On the other hand, it may be handy to actually have this location
non-internal (e.g. for direct requests from internal services or
just admin checks).

> > 2. As far as I see it uses only first path returned by mogilefs.
> > Is it planned to support failover? From my understanding it
> > should be simple, something like
> >
> > location /mogilefs {
> > mogilefs_tracker ...
> > mogilefs_pass /mogilefs_fetch;
> > }
> > location /mogilefs_fetch {
> > error_page 502 503 504 = @failover;
> > proxy_pass $mogilefs_path_0;
> > }
> > location @failover {
> > proxy_pass $mogilefs_path_1;
> > }
>
> That's actually good idea, I'll implement it. The only thing I'd love to have to do this is access to parametric variables from modules.

For this particular case I suppose it will be simple enough to
register just 10 variables with appropriate names.

Alternatively, this may be handled by something like

set $mogilefs_failover 1;
proxy_pass $mogilefs_path;

with appropriate lookup of $mogilefs_failover in code before
returning value for $mogilefs_path.

Maxim Dounin
Subject Author Posted

nginx mogilefs module 1.0.1

Valery Kholodkov April 16, 2009 06:39AM

Re: nginx mogilefs module 1.0.1

Maxim Dounin April 16, 2009 08:21AM

Re: nginx mogilefs module 1.0.1

Valery Kholodkov April 16, 2009 08:49AM

Re: nginx mogilefs module 1.0.1

Maxim Dounin April 16, 2009 09:19AM

Re: nginx mogilefs module 1.0.1

Valery Kholodkov April 16, 2009 09:38AM

Re: nginx mogilefs module 1.0.1

Maxim Dounin April 16, 2009 10:31AM

Re: nginx mogilefs module 1.0.1

Valery Kholodkov April 16, 2009 10:45AM

Re: nginx mogilefs module 1.0.1

mike April 16, 2009 12:05PM

Re: nginx mogilefs module 1.0.1

mike April 16, 2009 12:09PM

Re: nginx mogilefs module 1.0.1

Valery Kholodkov April 16, 2009 12:34PM

Re: nginx mogilefs module 1.0.1

mike April 16, 2009 12:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 145
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready