-
June 30th, 2016, 10:43 AM
#1
Using NGINX as a Reverse Proxy
We usually suggest to avoid putting a reverse proxy in front of a Lightstreamer Server, as it could negatively impact on performance. In particular, the reverse proxy might result as a bottleneck compared to Lightstreamer Server's scalability, or it might buffer the data, thus hiding the real network status to Lightstreamer (which employs some mechanisms to throttle the data flow accordingly).
That being said, there are still cases where a reverse proxy might be needed, and NGINX is often the first choice. Below are some tips to configure NGINX to work as smoothly as possible with Lightstreamer. Any feedback and comments are welcome.
To use NGINX as a reverse proxy in front of Lightstreamer Server, it is necessary to set proxy_buffering to off. See http://nginx.org/en/docs/http/ngx_ht...roxy_buffering
As an alternative, if you prefer to disable buffering only on the connections with the Lightstreamer origin server, you need to add a special HTTP header to the Lightstreamer responses. If not already present, add this elements to the lightstreamer_conf.xml file:
Make sure that the proxy_ignore_headers parameter of the NGINX configuration file does not include X-Accel-Buffering.
Then, in both cases, you need to enable WebSockets on nginx. See http://nginx.org/en/docs/http/websocket.html
In any case, even if you don't need WebSockets, consider that nginx proxy by default uses HTTP protocol 1.0. It is advised to turn proxy_http_version flag to 1.1 for best performance. See http://nginx.org/en/docs/http/ngx_ht...y_http_version
To configure nginx for TLS/SSL offloading, normal considerations apply. There are several articles on this topic, such as https://www.nginx.com/blog/nginx-ssl/
Similar Threads
-
By MrkiMedo in forum General
Replies: 9
Last Post: May 29th, 2014, 09:16 PM
-
By DarioCrivelli in forum Adapter SDKs
Replies: 1
Last Post: November 14th, 2008, 04:58 PM
-
By ksivasam in forum Client SDKs
Replies: 4
Last Post: January 16th, 2008, 07:58 PM
-
By Mone in forum Client SDKs
Replies: 0
Last Post: October 22nd, 2007, 10:20 AM
-
By DarioCrivelli in forum Client SDKs
Replies: 0
Last Post: June 14th, 2007, 04:59 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 10:24 PM.
Bookmarks