Welcome! Log In Create A New Profile

Advanced

Re: Set generated PHP output to Memcached server by Nginx transparently

August 18, 2010 11:26AM
Dayo, thank you for the response. It seem that is what I am looking for. I am going to try it out and see if it works.


Given the fact that this is still on the "bleeding edge" side of Nginx usage, I am thinking it might be better off if I will just use a "middleware" PHP to handle the update to the memcached server.


1) If there is PHP output in the Memcached server cluster given $uri, use it (with header stuff set)

2) If not, REWRITE the URL for http://mysite.com/memcached_update.php?location=the_original_url

This memcached_update.php will open up a output buffer, perform a url get for the content of the original url, store the buffered content in memcached server (unfortunately that means this PHP will need to perform memcached server look up and cluster management in a clustered memcached environment) and return the content

3) Next time the same location is requested, we should have the content available in the memcached server cluster.

This should not have impact on the original application as the "middleware" PHP is generic. But still it is a messy hack. It is not "pretty"

I really hope NginxHttpMemcachedModule or NginxHttpMemcModule should bundle this critical capability in the modules directly. It seems so obviouos this job belongs to these two modules.

Thanks
-- Jin Kuang
Subject Author Posted

Set generated PHP output to Memcached server by Nginx transparently

jkuang August 17, 2010 05:18AM

Re: Set generated PHP output to Memcached server by Nginx transparently

Dayo August 17, 2010 01:47PM

Re: Set generated PHP output to Memcached server by Nginx transparently

jkuang August 18, 2010 11:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready