Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue in scim2-sdk-client #141

Open
gclayburg opened this issue Feb 19, 2020 · 0 comments · May be fixed by #142
Open

Performance issue in scim2-sdk-client #141

gclayburg opened this issue Feb 19, 2020 · 0 comments · May be fixed by #142

Comments

@gclayburg
Copy link

I've noticed that the scim2-sdk-client does not completely consume result entity data from client operations. The effect is that the underlying TCP stream is automatically closed after each operation. A new TCP stream must be re-negotiated for a subsequent request. This is all automatic under Jersey, but it causes a delay that is especially noticeable when any of these things are true:

  • there are many client requests
  • TLS is used to secure the connection
  • there is significant latency to the target server.

This can be reproduced with this client code:

        ScimService scimService = new ScimService(target);
        for (int i = 0; i < 100; i++) {
            UserResource newUser = new UserResource().setUserName("createLoopUser" + i);
            UserResource createdUser = scimService.createRequest("Users", newUser).
                    contentType(MediaType.APPLICATION_JSON).invoke();
            Assert.assertNotNull(createdUser);
        }

This code will complete without errors, but you can observe the unnecessary network activity by examining a wireshark trace of the TCP/IP network communications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant