<p dir="ltr">Also, as far as resources go - http clients by themselves are unlikely to tax a box at any rate you are likely to do. At high rates, you may encounter file handle or socket starvation on (at least) essentially all Linux boxes owing to pathologically poor defaults out of the box.  You may need to tweak sysctl values on those systems if you need more than a few thousand http requests per second. </p>
<p dir="ltr">F. </p>
<div class="gmail_quote">On Apr 1, 2016 9:44 AM, "Felix Gallo" <<a href="mailto:felixgallo@gmail.com">felixgallo@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I accidentally once destroyed a 50 machine php http api cluster by pointing a single four core erlang instance at it and making requests as fast as I could go. You may wish to build rate limiting and error handling in from the start instead of ignoring the response. </p>
<p dir="ltr">F. </p>
<div class="gmail_quote">On Apr 1, 2016 9:14 AM, "Steven Livingstone" <<a href="mailto:steven@livz.org" target="_blank">steven@livz.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Paul. It was more that as i would be just logging lots of data,<br>
if some gets lost it is ok, hence it doesn't need to wait on a 200.<br>
<br>
So, I guess it was how to optimise under those conditions, but perhaps<br>
doing an async post and later getting a 200, even if it is just a "all<br>
is ok" even if i don't intend to do anything beyond that may be a<br>
sensible approach anyway.<br>
<br>
Restart temporary under supervisor sounds good - i mainly don't want<br>
to block anything. Unfortunately I come with the burden of years of<br>
procedural programming so my mindset is still adjusting to the fact<br>
spinning up many processes is a good thing in erlang.<br>
<br>
It may be I should be passing the data using something other than an<br>
HTTP POST and more erlang-like but one step at a time :-)<br>
<br>
regards,<br>
steven<br>
<br>
On Fri, Apr 1, 2016 at 4:55 PM, Paul Peregud <<a href="mailto:paulperegud@gmail.com" target="_blank">paulperegud@gmail.com</a>> wrote:<br>
> Low complexity solution: just spawn a process which will send request<br>
> and terminate.<br>
> More complex solution: spawn process under supervisor. Restart<br>
> strategy "temporary" is a good fit. Or "transient" if you want to<br>
> restart failed attempts.<br>
><br>
> As for "response never happens". Do you mean that server does not<br>
> return anything ever? Not even HTTP 200 OK? Just holds up connection?<br>
><br>
> On Fri, Apr 1, 2016 at 5:18 PM, Steven Livingstone <<a href="mailto:steven@livz.org" target="_blank">steven@livz.org</a>> wrote:<br>
>> Hi all, Erlang newbie here. So, hello all :-) Now,<br>
>><br>
>> I wish to do a fire and forget http post in Erlang.<br>
>><br>
>> I looked at the httpc module which seems to allow synchronous and<br>
>> asynchronous calls but in the latter case i do not expect a return<br>
>> value so don't need a request id .... and not sure whether that<br>
>> behaviour influences what I want ... does it hold open a connection or<br>
>> use up resources on a response that is never going to happen etc.<br>
>><br>
>> Does anyone know the best approach?<br>
>><br>
>> many thanks,<br>
>> steven<br>
>> _______________________________________________<br>
>> erlang-questions mailing list<br>
>> <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
>> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
><br>
><br>
> --<br>
> Best regards,<br>
> Paul Peregud<br>
> <a href="tel:%2B48602112091" value="+48602112091" target="_blank">+48602112091</a><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>
</blockquote></div>