Hi Rakesh
What's the recommended deployment model for Synapse? I've a webservice hosted
on tomcat container and would like to mediate to it with Synapse such that
only Synapse end point is accessible to the callers. I read that Synapse is
optimized for handling large number of concurrent connections.
You could very well run both Synapse and your web service on Tomcat on
the same machine. Synapse manages to handle a large number of concurrent
connections since its using a non-blocking http/s implementation. The
NIO performance can be tuned best on a Linux machine, so thats what I
would recommend, and thats whats mostly used in production. People run
Synapse on other Unix systems such as SunOS on production, and run it
also on mainframes. I would not recommend an installation on Windows
though. Depending on the load expected, the CPU cores on the system etc,
we can tune the performance, but you should also tune the OS to allow
Synapse to use the available TCP sockets and file handles etc.
To prevent users from talking direct to Tomcat, the easiest would be to
make Tomcat only accept connections on the local interface :-) .. and
make Synapse talk over it to Tomcat. Of course you could also do NW
access control to prevent access over the other ports etc.
If I deploy synapse and webservice on the same jvm (tomcat), would that any way
limit
Synapse ability to handle a large number of concurrent connection?
In a way - could be. How many concurrent users are we talking about? and
how long does each request take on average to complete? How many Tomcat
instances are you going to run on the same machine, and get Synapse to
load balance between them etc? For one thing, running more processes on
the same machine would limit its performance (memory/CPU) etc, but also
the TCP sockets on a machine is limited to around ~64K. If you are able
to use HTTP 1.1 keep alive connections and chunking, the HTTP
performance could be optimized, to efficiently use only a few TCP
connections underneath.
Has any one tried to deploy Synapse and webservice in the same package (war)
file? What was your experience with that?
I can't understand why so many people seem to ask this question :-) ..
First of all the Synapse WAR deployment is just a way of packaging. It
does not use a servlet container at all - except to start itself. All
http/s happens over its optimized NIO transports and not over the
servlet engine - which is inherently blocking. Personally I prefer hard
modularity between your ESB and the rest of the services, so that the
ESB can continue to function, even in the face of more common failures
in other systems
cheers
asankha
--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org
http://esbmagic.blogspot.com