I see this weird problem where if I use HTTP to invoke a JSP on Jboss, it responds quickly (in almost no time) but if I invoke the same JSP using HTTPS, it takes more time - sometimes up to 15 seconds and this extra time seems to be spent in some kind of SSL validation. Once the request reaches the JSP, it gets processed quickly. How can I eliminate this SSL bottleneck? I expected HTTPS to take a little extra time but not this much and it's random - sometimes it takes 2 seconds extra and sometimes up to 15 seconds extra.
I see this issue when I use java client to invoke this JSP and also when I use linux curl command.
When I use curl -v, I noticed that server takes too long to response with Hello
The following line comes quickly-
* SSLv2, Client hello (1):
Then it waits for 2-15 seconds and then I see the rest of the output starting with