Hi, I am new to MINA, and looking to apply it in a context where I need to build a synchronous TCP/IP socket server, to service volumes that are not very high at all in comparison to some of the applications quoted on the MINA website (e.g. our peak load is expected to be 500 transactions/minute).
However, one thing that is very important about the solution is that it must meet our security requirements and support concurrent requests with absolutely no risk of one client receiving another client's response messages. This should apply, even if the load far exceeds the expected normal requirements e.g. in a malicious attack scenario. I have extended the MINA quickstart example to build a very simple socket server, which just returns the same string message in response to all requests. I then tested it using a JMeter TCP Sampler. What I am finding is that when I ramp up the number of threads to 500, and let it run for >100 loop iterations or so, I will eventually reach a point where some JMeter user threads receive two response messages (or more in some cases), whilst others receive no response. i.e. some clients seem to be receiving other clients' response messages. JMeter settings: Number of threads: 500 Ramp up period: 10 secs Loop count: 1000 TCP sampler timeout: 50 ms Constant timer thread delay: 300 ms I added a JMeter assertion, which asserts that the response message is always the expected response string, so I can easily see from the JMeter error reports when the response is either repeated or empty. One thing that I changed from the quickstart was that I altered the MINA thread model, since I gathered from the documentation that this was generally a good idea. I configured the ThreadModel to be manual, and reduced the number of I/O Processors down to just 1, since I don't need very high performance, but I do need it to be reliably thread-safe. Not sure if this was the correct approach - but after configuring this, it seemed to be able to go up to higher loads before getting the concurrency problem. I'm not sure if this is a problem with the way I have configured MINA or a problem with the validity of my JMeter test (or even a bug in the way JMeter is reporting responses?). I think MINA ought to be capable of meeting this requirement, and probably this is more a case of me not understanding how to configure it correctly. Can anyone suggest a solution? Thanks, Chris