-
August 13th, 2009, 05:30 PM
#1
Reverse proxy - Nginx?
Hi
I am thinking about using reverse proxy in my app so that part of the site could be server by the web app server and push part by the Lightstreamer.
Up to now I have been using Nginx as reverse proxy, and I wanted to check if anyone has experience with Nginx+LightStreamer combination?
Many thanks!
Davorin
-
August 13th, 2009, 06:21 PM
#2
Do you mean that Nginx would intercept requests directed to Lightstreamer Server,
then forward them to the Server through a different HTTP connection?
This would partly limit Lightstreamer capabilities; see this post, or this one, for similar cases.
If you can instruct Nginx to only route packets to Lightstreamer (in a way similar to a load balancer) this would be ideal.
I can't answer on the insights of Nginx.
-
August 13th, 2009, 09:52 PM
#3
![Quote](images/styles/AestheticaGreen/misc/quote_icon.png)
Originally Posted by
DarioCrivelli
Do you mean that Nginx would intercept requests directed to Lightstreamer Server,
then forward them to the Server through a different HTTP connection?
This would partly limit Lightstreamer capabilities; see
this post, or
this one, for similar cases.
If you can instruct Nginx to only route packets to Lightstreamer (in a way similar to a load balancer) this would be ideal.
I can't answer on the insights of Nginx.
I was thinking of using Nginx as reverse proxy / load balancer. Nginx would accept all incomming HTTP requests for domain, and based on url it would make http requests towards either app server (www.mydomain.com/app) or Lightstreamer (www.mydomain.com/lightstreamer).
So in this scenario Nginx would be terminating all client connections, and have open connections towards the app server(s) and Lightstreamer server. Acting as reverse proxy, Nginx is supposed ta scale well and at least accordingly to the data presented should be able to handle large number of parallel connections (it also uses async sockets).
What capabilities would be limited in this setup? Probably Adaptive streaming? Anything else?
Many thanks!
Davorin
-
August 14th, 2009, 11:39 AM
#4
It depends on how your reverse proxy manages persistent connections.
If it buffers the Server response until the whole content is received,
so that the response is sent to the client atomically,
then streaming is not possible at all.
Note that some client libraries can detect such case and switch to long polling,
but, if you ascertain that streaming is not possible,
you should directly configure the clients for long polling.
Otherwise, the only issues can be related to Adaptive Streaming.
Lightstreamer Server tries to minimize the number of sent packets
that are waiting to be read by the client
and the reverse proxy could interfere, by buffering more packets.
In case of network congestion, such packets could become obsolete
and could have been conflated.
-
February 18th, 2011, 02:37 AM
#5
Nginx
I have the same problem - using NGINX as a reverse proxy to LightStreamer (for push), and Tomcat (for static).
Reason: so that both can use port 80.
This is critical to my evaluation of the product.
If both can't run over port 80, then LS is out of the question for us.
-
February 21st, 2011, 11:08 AM
#6
Hi,
please can you expand on what problem are you experiencing?
-
February 21st, 2011, 03:13 PM
#7
@dmoshal
I confirm it is very important to run LS on port 80, to prevent firewalls and proxies to block its traffic. But using a reverse proxy for this purpose is usually discouraged, because you are introducing a bottleneck in your system and you are hiding the real state of the connection to LS Server. That said, it works.
As an alternative, you can easily set up both LS Server and the Web Server on port 80 by using two network cards or by using a couple of virtual machines. Of course, you need to public IP addresses in any case.
In more typical production scenarios, there is a cluster of servers with a load balancer in front of them. In these cases, it is up to the load balancer to route the requests to the right server and there is number of configurations possible, impacting in different ways on the number of public IP addresses needed. (Clustering is not allowed with Lightstreamer Moderato).
-
April 16th, 2014, 09:58 AM
#8
![Quote](images/styles/AestheticaGreen/misc/quote_icon.png)
Originally Posted by
Alessandro
@dmoshal
I confirm it is very important to run LS on port 80, to prevent firewalls and proxies to block its traffic. But using a reverse proxy for this purpose is usually discouraged, because you are introducing a bottleneck in your system and you are hiding the real state of the connection to LS Server. That said, it works.
I also tried to configure Nginx as reverse proxy for Lightstreamer, but with no success. If you say it works, how would a working configuration look like? I wonder, why i can not find an example for .e.g. reverse proxy one of the demo applications.
-
April 17th, 2014, 12:42 PM
#9
@essagl, Nginx should work with no specific configuration. In the worst case, you will see connections to Lightstreamer in polling mode. Enabling streaming and/or WebSockets will improve performance. But is seems you are having other issues. Can you expand on what problem you are seeing exactly?
-
May 29th, 2014, 10:16 PM
#10
![Quote](images/styles/AestheticaGreen/misc/quote_icon.png)
Originally Posted by
Alessandro
@essagl, Nginx should work with no specific configuration. In the worst case, you will see connections to Lightstreamer in polling mode. Enabling streaming and/or WebSockets will improve performance. But is seems you are having other issues. Can you expand on what problem you are seeing exactly?
Hi Alessandro,
it was a configuration problem.
Found a working configuration here: http://nginx.com/blog/websocket-nginx/
Similar Threads
-
By vdhinesh in forum Client SDKs
Replies: 1
Last Post: December 7th, 2009, 01:36 PM
-
By Alessandro in forum Adapter SDKs
Replies: 0
Last Post: November 14th, 2008, 06:04 PM
-
By ksivasam in forum Client SDKs
Replies: 4
Last Post: January 16th, 2008, 08:58 PM
-
By Mone in forum Client SDKs
Replies: 0
Last Post: October 22nd, 2007, 11:20 AM
-
By DarioCrivelli in forum Client SDKs
Replies: 0
Last Post: June 14th, 2007, 05: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 04:51 PM.
Bookmarks