-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use my fork as base for this #2
Comments
I managed to get the test depencies into order and the tests are now running. |
Now the tests are working too. Figuring out how to install the dependencies for the tests was quite painful but now we have quite good test coverage. |
I'm not sure why but this fork works just fine with nginx version:
But not with:
They all shout that:
|
I managed to fix them by using fixes from PR: openresty/redis2-nginx-module#42. Now the tests are passing for everything from 1.13.2->1.0.15. This should be good to go but of course I'm waiting for your review. |
@onnimonni Thanks for your hard work on this. Maybe we should migrate from nginx's Test::Nginx to our openresty's Test::Nginx test scaffold, just like ngx_redis2's test suite? This way we can also easily enjoy all the advanced testing features provided by our Test::Nginx test scaffold, as documented here: https://openresty.gitbooks.io/programming-openresty/content/testing/ And also integrate it into our EC2 test cluster here: Just my 2 cents. |
Sounds good, I'll check these soon too. |
I agree that the tests would be more prettier using openresty For example this is is more easier with The openresty Maybe you just know a better way to achieve this? And I think that the ngx_redis2 only tests against one static redis instance? |
I wanted to have the full version history from the earlier
and included them to:
Now the repo reflects the age and development of this module better. I also refactored the tests to use openresty I hope this is good enough now. |
@onnimonni Well, you can use |
Ah thats a good idea :)! Thanks for the input! I think openresty doesn't currently have an AUTH enabled redis server for tests. I know you are quite busy and I really appreciate all you have done for this so far. If you want I can help you to setup this in the QA server. If you do that I could add few additional tests into redis2_nginx_module for testing with AUTH too. If it is installed I could use it from the tests with env like these two: |
I removed the code which starts custom redis instance for every test and the tests now rely on redis database to be available in 127.0.01. I didn't use In order to use the tests the system running them now needs to have:
|
@onnimonni I don't think relying on Perl's CPAN module Redis is a good idea since that CPAN module has many more dependencies than just ngx_redis2, for example. Also, I don't quite trust those Perl CPAN modules. |
@onnimonni After some more thinking, I think for OpenResty, we'd better completely retire the ngx_redis2, ngx_redis, and ngx_srcache modules some time in the near future. Those represent the old way of hacking things around nginx, which has no real future IMHO. And the official OpenResty team should not waste more of its time on these modules any more. We should spend energy on the future. IMHO, the ngx_lua module and the lua-resty-* libraries represent the future. |
Well I believe you know the best. Even though ngx_srcache is old it has served me really well in many projects. I think the lua-resty-* libraries are cool but for many developers they represent another kind of layer and many are not that comfortable with lua. Also with lua I feel that the project structure gets easily really messy, the old way of hacking nginx only provides few configuration directives and those don't get that messy at least so easily. ( This might just be a local problem I have noticed in the projects where I have been working YMMV ) |
@onnimonni I hold a similar perspective in the year 2009 ~ 2011 and wrote MANY nginx C modules like those, but later I realized the nginx C module route has no future and the Lua route can give not only much more flexibility but also even better performance in general. |
@onnimonni For example, the |
@onnimonni The current implementations of |
@onnimonni At that point, we'll even abandon the standard ngx_proxy module for many industrial proxying requirements. |
This sounds really cool! The thing is that I'm not working for internet scale CDN provider. I would want to get semiscalable cache which can handle ~100-500K requests per minute and which implement something like X-Cache-Tags and I'm going to do this probably with redis + nginx. What would you suggest for this? |
@onnimonni I was talking about scalability. Such techs can surely be used for little trivial stuff at the same time. 500K req/min is not something impressive at all on modern hardware. |
Hey @agentzh!
This issue is result of the conversation we had in: openresty/srcache-nginx-module#60
I prepared a fork from the original work of Sergey A. Osokin <[email protected]> from:
https://people.freebsd.org/~osa/ngx_http_redis-0.3.8.tar.gz
into my github account:
https://github.com/onnimonni/redis-nginx-module.
It should be ready to be forked here.
Also one more question: What do you think about changes in:https://github.com/Yongke/ngx_http_redis-0.3.7/commit/9075b7d20c2881ccaf367319904b1490922fbf10I didn't yet port those changes. Are they useful? Should those be ported here too?I ported all of the changes from Yongke and enabled tests with docker and travis.
The text was updated successfully, but these errors were encountered: