Performance problems with HTTPS
Has anyone used the Spring Android Rest Template over https?
We've recently integrated this into our android application and are running into performance problems when we switch our REST urls to HTTPS.
Everything works fine under HTTP. Response times from the server are around a second to invoke the REST template and deserialize our JSON object. However, when we switch over to HTTPS it's taking 10-20 seconds to get complete the request.
Anyone else have this problem?
Thanks,
Charles
Re: Performance problems with HTTPS
How are you connecting? Are you using RestTemplate.exchange with an HTTPS URI or some other mechanism?
Re: Performance problems with HTTPS
Hmmmmm ....
I seem to be getting a:
Code:
org.springframework.web.client.ResourceAccessException: I/O error: No peer certificate; nested exception is javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
when I try something similar, however, I am using the exchange method because I want access to the HTTP headers rather than your getForObject:
Code:
ResponseEntity responseEntity = restTemplate.exchange("https://myserver/foo",
HttpMethod.GET,
new HttpEntity<String(headers),
null);
Re: Performance problems with HTTPS
Yes, I know. I was actually using an internal Tomcat server to connect to. Like you, I was using "https://myserver/foo" as a stand-in for the real URL.