Posted By:
Matthias_David
Posted On:
Tuesday, December 3, 2002 03:47 AM
Is it necessary to set up a Socket Cache to improve performance? Here's the situation: I have a static helper class that makes some communication over a socket. This helper class may be invoked by many users (say 100 - 1000) and is used within a J2EE AppServer. Right now the helper class always creates a new Socket for the communication. I am wondering if a cache for sockets would be useful, so I could reuse already instantiated sockets. How does the system (jvm) handle closed socket connections? Are they cached inernally? What's the cost of opening a socket connection? What do you think? Does it make a difference if I need different sockets (e.g. different ips, ports) or if the connection should always
More>>
Is it necessary to set up a Socket Cache to improve performance?
Here's the situation:
I have a static helper class that makes some communication over a socket. This helper class may be invoked by many users (say 100 - 1000) and is used within a J2EE AppServer. Right now the helper class always creates a new Socket for the communication. I am wondering if a cache for sockets would be useful, so I could reuse already instantiated sockets.
How does the system (jvm) handle closed socket connections? Are they cached inernally? What's the cost of opening a socket connection?
What do you think? Does it make a difference if I need different sockets (e.g. different ips, ports) or if the connection should always have the same ip and port?
Thanks for any hints,
Matthias.
<<Less