[erlang-questions] Cowboy , Concurrency , Tuning

Paul Peregud paulperegud@REDACTED
Wed Oct 10 08:41:23 CEST 2012


It seems that you are using old Cowboy. I was using it too and I hit a
bottleneck in cowboy_listener add_pid/remove_pid mechanism. New
Cowboy/Ranch handles that part better.

On Wed, Oct 10, 2012 at 4:02 AM, AD <straightflush@REDACTED> wrote:

> hello,
>
>  I currently have a SockJS websocket implementation sitting on top of
> cowboy.  We have been going through some tuning/concurrency testing and we
> have improved our results drastically by increasing
>
> ERL_MAX_PORTS to 64000
> +P parameter to a very high number , around 128000
> Kernel tuning
>
>  With this config on a medium VM we have been able to successfully get to
> around 60,000 connections, up from 4096 so we are headed in the right
> direction :-)
>
>  MY next question is with Cowboy tuning.  I notice that the default
> max_connections parameter on the TCP transport is 1024 if not set, but I am
> not hitting this issue.  What is the right way to tune NBAcceptor pool and
> the the max_connections setting for the acceptor ?
>
>  Right now my start_listener is simply
>
> cowboy:start_listener(my_http_listener, 200,
>      cowboy_tcp_transport, [{port, ?COWBOY_HTTP_PORT}],
>      cowboy_http_protocol, [{dispatch, Routes}]
>     ).
>
> but i have seen some examples with
>
> cowboy:start_listener(my_http_listener, 200,
>      cowboy_tcp_transport, [{port, ?COWBOY_HTTP_PORT}, *{max_connections,
> infinity}* ],
>      cowboy_http_protocol, [{dispatch, Routes}]
>     ).
>
> Cowboy tuning seems like the last place i need to look, any
> thoughts/feedback here on best practices ?
>
> Thanks
> -AD
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>


-- 
Best regards,
Paul Peregud
+48602112091
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121010/9b3bcd62/attachment.htm>


More information about the erlang-questions mailing list