aws-mock
aws-mock copied to clipboard
Implement a pool of jaxbMarshallers
As c52f8a8 fixed #14, the performance would be poor if remain only one instance of marshaller in our JAXBUtil.java.
A good way is to add and manage multiple jaxbMarshallers there, in a pool (e.g. of size=5), to feed a max concurrency of 5 for processing xml output to improve the performance.
Though the solo synchronized marshaller works fine and of enough performance in most test cases so far, we still decide to add a pool for marshallers and benchmark the performance since as v1.0 of aws-mock released, we will have more and more users asking for high concurrency tests with aws-mock.
In the meantime could you please put some information for the users as to what the performance looks like now. For example, I see that aws-mock can easily handle 600 concurrent requests. Thanks!
Yes there is a proven test case here: https://github.com/treelogic-swe/aws-mock/blob/v1.0.1/src/test/java/com/tlswe/awsmock/ec2/Ec2EndpointTest.java#L175 And in that case we limit to 300 requests only because the memory limitation on travis-ci for passing the auto-build. When locally running on a more powerful machine, it is also proven that the test can pass with a max concurrency of 5000.