Welcome! Log In Create A New Profile

Advanced

Re: lua parser and redis2 questions

agentzh
June 04, 2011 11:22AM
On Thu, Jun 2, 2011 at 7:27 AM, gregr401 <nginx-forum@nginx.us> wrote:
>
> This auth + get works great and yields the following as expected:
>
> +OK
> $12
> blahblahblah
>
>
> Goal 1:
> I'd like to be able to strip out the +OK\r\n$12\r\n and be left with the
> actual value of blahblahblah.  Hints or example?
>

As documented in ngx_redis2's README, this module always returns the
raw TCP responses from the remote redis server. You need to parse the
redis response yourself (for example, by combining ngx_lua +
lua-redis-parser).

>
> Goal 2:
> Eventually I'd like to be able to pipeline an 'auth' plus numerous
> 'gets' together and leverage each value, if a $-1 isn't returned for a
> 'get', ie:
>  location /redis2 {
>                set $key $http_host;
>                set $key2 $http_host:some_arbitrary_value;
>                redis2_query auth foobar;
>                redis2_query get $key;
>                redis2_query get $key2;
>                redis2_pass redis-backend;
>  }
>

The latest version of ngx_redis2 fully supports redis command
pipelining. Isn't it working for you?

Regards,
-agentzh

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

lua parser and redis2 questions

gregr401 June 01, 2011 07:27PM

Re: lua parser and redis2 questions

logar.damir June 04, 2011 08:49AM

Re: lua parser and redis2 questions

Marcos Ortiz June 04, 2011 11:12AM

Re: lua parser and redis2 questions

Marcos Ortiz June 04, 2011 11:16AM

Re: lua parser and redis2 questions

agentzh June 04, 2011 11:22AM

Re: lua parser and redis2 questions

gregr401 June 04, 2011 02:15PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 04:06AM

Re: lua parser and redis2 questions

logar.damir June 04, 2011 04:26PM

Re: lua parser and redis2 questions

gregr401 June 05, 2011 06:40PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 04:12AM

Re: lua parser and redis2 questions

logar.damir June 06, 2011 07:16AM

Re: lua parser and redis2 questions

agentzh June 06, 2011 10:56AM

Re: lua parser and redis2 questions

gregr401 June 06, 2011 12:50PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 09:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 304
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