[erlang-questions] Using the OTP 'rpc' service (rex) under high load, was: Re: Load balancing/multiplexing rpc calls amongst Erlang Nodes

Bengt Kleberg bengt.kleberg@REDACTED
Wed Oct 24 09:07:26 CEST 2012


Greetings,

My use case is to start a gen_server on the remote node. I need the Pid
returned in {ok, Pid} from gen_server:start/3 (actually a start_link/3
would be preferable).
Will erlang:spawn/4 return that Pid, as does rpc:call/4, or another pid?


bengt

On Tue, 2012-10-23 at 23:33 -0500, Scott Lystig Fritchie wrote:
> Hi, Joshua.  One note of caution about the rpc service, or more
> specifically about the 'rex' gen_server that implements the server side
> of the client/server remote execution service.
> 
> The 'rex' process is a single OTP gen_server and thus can use at most a
> single CPU core's worth of computation resource.  Experience with using
> rpc/rex with Riak has shown that certain workloads can easily overwhelm
> the rex server's ability to quickly execute requests from remote
> clients.  When possible, I'd recommend avoiding using the 'rpc' module
> and bypass 'rex' by spawn()/spawn_monitor()/spawn_link()'ing worker
> processes directly on a remote node.
> 
> -Scott
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list