intel / asynch_mode_nginx

Other
210 stars 61 forks source link

Support for NGINX 1.14 or 1.12 #4

Closed numeronove closed 5 years ago

numeronove commented 6 years ago

I have successfully built asynch_mode_nginx against the latest QAT 1.7, and OpenSSL 1.1.0i, but I noticed that NGINX version is 1.10.3:

[root@localhost asynch_mode_nginx-0.3.5]# fakeroot/usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.10.3
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) 
built with OpenSSL 1.1.0i  14 Aug 2018
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module \ 
--add-dynamic-module=modules/nginx_qat_module/ \
--with-cc-opt='-DNGX_SECURE_MEM -I/usr/local/ssl/include \
-Wno-error=deprecated-declarations' \
--with-ld-opt='-Wl,-rpath=/usr/local/ssl/lib -L/usr/local/ssl/lib'

Last update on 1.10 branch was 31 Jan 2017 (not as old as myself but), that in Internet time sounds like a long time ago.

Is there any plan to add support to a more recent version of NGINX?

Could I get QAT hardware async offload by just (statically) linking OpenSSL 1.1.0i with Intel OpenSSL* Engine, to the 1.14 executable?

Could I adapt nginx-1.10.3-async.patch to 1.12 or 1.14 version of NGINX?

To give some context, I'm currently running the 1.12 stable branch (without QAT) with Google PageSpeed in production, and planning to upgrade to the new 1.14 stable branch, since it fixes some warnings seen in error log, related to the Intel optimized zlib patch.

weicz11 commented 5 years ago

hi @numeronove , sorry for the late response due to Chinese national holiday. Yes, we have plan to upgrade Nginx baseline to 1.14 Currently, if you want to adapt 1.10.3 asynch patch to 1.12 or 1.14, you can do it by yourself. General speaking, you can make a patch between offical nginx 1.10.3 and 1.12, then apply it to our asynch mode nginx repo. There will be some of confiction files. Most of them are straight forward, you can merge the reject files manually. Only ngx_event_openssl.c file is exception, since we have done lots of optimization on it, you need to merge it carefully. I think you can do it well if you are familiar with Nginx and OpenSSL code. If you have any more questions, please reply us in this thread.

Thanks

numeronove commented 5 years ago

Hi @weicz11, I hope you had a nice holiday. Well, upcoming support for NGINX 1.14, is very good news! I did something myself applying the 1.10.3 async patch to 1.14: how you have imagined, some hunks failed to succeed in various files. Most of rejects were straightforward, with the exception of ngx_http_request.c, where code has been changed noticeably and more work was needed. My first build attempt hasn't been successful, ngx_http_request.c didn't compile. I'll continue to work on it, while keeping an eye on future releases.

Thank you.

WenqianYu commented 5 years ago

@numeronove great to see you are trying to upgrade that to nginx 1.14. If you have future question, please let us know.

jaminlu commented 5 years ago

I have successfully built asynch_mode_nginx against the latest QAT 1.7, and OpenSSL 1.1.0i, but I noticed that NGINX version is 1.10.3:

[root@localhost asynch_mode_nginx-0.3.5]# fakeroot/usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.10.3
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) 
built with OpenSSL 1.1.0i  14 Aug 2018
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module \ 
--add-dynamic-module=modules/nginx_qat_module/ \
--with-cc-opt='-DNGX_SECURE_MEM -I/usr/local/ssl/include \
-Wno-error=deprecated-declarations' \
--with-ld-opt='-Wl,-rpath=/usr/local/ssl/lib -L/usr/local/ssl/lib'

Last update on 1.10 branch was 31 Jan 2017 (not as old as myself but), that in Internet time sounds like a long time ago.

Is there any plan to add support to a more recent version of NGINX?

Could I get QAT hardware async offload by just (statically) linking OpenSSL 1.1.0i with Intel OpenSSL* Engine, to the 1.14 executable?

Could I adapt nginx-1.10.3-async.patch to 1.12 or 1.14 version of NGINX?

To give some context, I'm currently running the 1.12 stable branch (without QAT) with Google PageSpeed in production, and planning to upgrade to the new 1.14 stable branch, since it fixes some warnings seen in error log, related to the Intel optimized zlib patch.

could you share the version of nginx 1.12 for qat?I would appreciate your help.