RichP1
Hi all,
We have a web application being served by Tomcat. Part of this application uses Lightstreamer. The Tomcat and Lightstreamer installations are running on the same box, currently Tomcat is running on port 80 and Lightstreamer on port 81.
Rather than open up port 81 on the firewall we want all Lightstreamer connections (and pushed data) to go through Tomcat on port 80. My question is - Is this easy to set up and how can it be done? Or is there some documentation somewhere that can explain how to do this?
Thanks.
Richard
Alessandro Alinone
Richard,
You should not do that. Lightstreamer should directly handle the connections with the clients in order to optimized the bandwidth (adaptive streaming) and to absorb the load on itself without impacting on Tomcat. But shoud you need to do that, you should probably use a reverse proxy to route the requests to Tomcat or Lightstreamer. Or perhaps code a servlet that does the right routing.
In any case, this is not a common practice with Lightstreamer.
Cheers,
Alessandro
RichP1
Thanks Alessandro,
Do you think using Apache as a proxy for both Lightstreamer and Tomcat would be a reasonable solution? The client in this case will be hosting the system and they only have a single machine available, so this might have to be the way forward for now.
Cheers,
Richard
Alessandro Alinone
Richard,
That could work, if you can route the requests based on the URL path (for example requests beginning with "/lightstreamer" should go to Lightstreamer Server). Of course, if you need thousands of concurrent push sessions, Apache would become the bottleneck.
Another solution would be to have two network cards or to use some virtualization software in order to have two different IPs listening on port 80.