May 05, 2011 12:29PM
> Oh, I'm so happy to hear that ;) Please bring my
> best wishes to your cousin!
>
> >
> > Sure, thats no problem. Tomorrow ill attach to
> it and take a sample for
> > you. Have also a full dump, as every build has
> its own /prefix.
> >
>
> Looking forward to that :)

Will do both as soon i'll arrive at home later this day!


>
> When you're using ngx_redis2 + lua-redis-parser,
> please ensure you're
> using a tcp connection pool (provided by
> ngx_http_upstream_keepalive)
> and redis pipelining wherever possible. These
> features will
> significantly improve performance. Also, using
> multiple instance of
> redis servers on your multi-core machines also
> help a lot due to the
> sequential processing nature of a single redis
> server instance.
>
> Also, when you're benchmarking performance, please
> ensure that your
> error log level is high enough to prevent nginx
> workers spend too much
> cycles on flushing the error.log file, which is
> certainly very
> expensive :)
>

Thank you for this, my conf applied already to this, but maybe you should tell about that in your docs too. (:



> > As a last resort for mysql i thought of getting
> an unique id from a
> > (lua) location which is then used for insertion
> and afterwards on
> > success, i.e. for redirects. Or have i missed
> something, what would you
> > do?
> >
>
> You can certainly generate a globally unique id by
> means of pure Lua
> or by accessing redis, though that's a bit silly
> ;)
>
> If all you want is to get LAST_INSERT_ID, then
> ngx_drizzle already
> returns that automatically for you when you're
> doing a SQL insert
> query. Consider the following sample nginx.conf
> snippet:
>
> location /test {
> echo_location /mysql "drop table if exists
> foo";
> echo;
> echo_location /mysql "create table foo (id
> serial not null,
> primary key (id), val real);";
> echo;
> echo_location /mysql "insert into foo
> (val) values (3.1415926);";
> echo;
> echo_location /mysql "select * from foo;";
> echo;
> }
> location /mysql {
> drizzle_pass backend;
> drizzle_module_header off;
> drizzle_query $query_string;
> rds_json on;
> }
>
> Then GET /test gives the following outputs:
>
> {"errcode":0}
> {"errcode":0}
> {"errcode":0,"insert_id":1,"affected_rows":1}
> [{"id":1,"val":3.1415926}]
>
> Have you noticed the "insert_id" field in the 3rd
> JSON response? ;)
>

Unbelievable! :D Ive seen "insert id" header in ngx_drizzle, but hadnt looked further at inserts with rds_json (damn stupid me, i should write an article about that).

>
> LOL
>
I have a php-fpm install for exactly 3 apps which are our webmail/cms/board, because php-users are not aware of their risks ive disabled it apart from that. NCARS rulez, but im replacing it already -> xmpp (psyc) + web frontend.

I used techniques like MEF and such in .Net, but imho its desktop-only.. One can do amazing things with it, also without using client-side runtime, but if you're not bound to that platform, why would you do?

Its good to have varnish, ha and/or simple nginx in front of such servers/frameworks, but now nginx+lua is enough, its so tiny and fast..

>
> Happy hacking!
>

Greetz (;
# HTML
Subject Author Posted

Catch ALL requests by LUA-script

andiL March 01, 2011 02:34AM

Re: Catch ALL requests by LUA-script

agentzh March 01, 2011 03:42AM

Re: Catch ALL requests by LUA-script

andiL March 01, 2011 04:53AM

Re: Catch ALL requests by LUA-script

agentzh March 01, 2011 06:14AM

Re: Catch ALL requests by LUA-script

andiL March 01, 2011 07:52AM

Re: Catch ALL requests by LUA-script

HowToMeetLadies May 02, 2011 12:11AM

Re: Catch ALL requests by LUA-script

agentzh May 03, 2011 10:56PM

Re: Catch ALL requests by LUA-script

HowToMeetLadies May 04, 2011 08:05PM

Re: Catch ALL requests by LUA-script

HowToMeetLadies May 05, 2011 12:29PM

Re: Catch ALL requests by LUA-script

agentzh May 04, 2011 11:22PM

Re: Catch ALL requests by LUA-script

agentzh May 06, 2011 12:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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