Hi Sasa,<br><br><div class="gmail_quote">On 6 May 2011 15:17, sasa <span dir="ltr"><<a href="mailto:sasa555@gmail.com">sasa555@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
thank you for the reply. It helped me move in the right direction, but<br>
I still can't figure out the underlying problem.<br>
<br>
I have configured stunnel on the test server. The stunnel acted as a<br>
https proxy to the http erlang server on the same machine.<br>
<br>
The behavior was somewhat better - the load test of about 2000<br>
requests would work correctly for about 30 seconds, then all<br>
subsequent requests would fail. When using erlang ssl, such load test<br>
would fail immediately.<br></blockquote><div><br>Which side do you think they failed? Server or client?<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have then moved stunnel proxy to a separate server, and then it<br>
worked perfectly. </blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Currently, I am suspecting that cpu load might be the problem. When I<br>
had stunnel on the same machine as erlang server, cpu load was going<br>
high. The same thing happened when I used erlang ssl. When stunnel is<br>
on a separate machine, the cpu load on both machines is fairly low.<br></blockquote><div><br>That is quite strange. What is the spec of the machine? This might be a peculiarity of the virtual instances you get on EC2. Is there any chance you can repeat this test on dedicated hardware? When running both on the same machine, have you monitored which process eats more CPU? beam or stunnel?<br>
<br>I remember a similar situation in the past trying to run load tests on EC2. It was hard to get a predictable set of results when load testing because the performance for the same test used to fluctuate.<br><br></div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I cannot explain why it works better with stunnel. Do I have to<br>
manually configure ssl sessions when using erlang? As I mentioned<br>
earlier, the client does long polling i.e. it sends an request, and as<br>
soon as the request is responded, the new one is made. Is it possible<br>
that ssl handhsake occurs for every request?<br></blockquote><div><br>I doubt the handshake occurs for every request. It might have something to do with the fact that stunnel is written in C so is likely to benefit in terms of performance. You could try hipe compilation of the ssl application to see if that gives you any better performance.<br>
<br>cheers<br>Chandru<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
On Fri, May 6, 2011 at 5:51 AM, Chandru<br>
<<a href="mailto:chandrashekhar.mullaparthi@gmail.com">chandrashekhar.mullaparthi@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> To rule out any issues with the implementation of ssl, I would suggest you<br>
> use stunnel (<a href="http://www.stunnel.org" target="_blank">http://www.stunnel.org</a>) to firstly do the SSL handling for you.<br>
> If your https tests work properly with that, then we know it is an issue<br>
> with the OTP implementation of SSL. If you still have the same problems, it<br>
> could be a problem with your setup.<br>
><br>
> cheers<br>
> Chandru<br>
><br>
</div><br><div><div></div><div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br>