<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02/09/2015 01:32 AM, Paul Oliver
wrote:<br>
</div>
<blockquote
cite="mid:CABNk+6=VBryFeGOSgWJAQTaPOHRi4_V2trXFXv=hNBLw5oTwkQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Roberto,
<div><br>
</div>
<div>In my experience cpg struggles with a high volume of
joins/leaves. By default it uses a single gen_server as part
of all such calls (the default scope) and in my production
system this ended up being a bottleneck. A potential
workaround might be to create a bunch of scopes and hash over
them.</div>
</div>
</blockquote>
Yes, using more than the single cpg scope would utilize more than
the single Erlang process to avoid it becoming a bottleneck. It
also helps to use cached cpg data for the process lookups to avoid
adding extra load to the cpg scope Erlang process by using the
cpg_data module (after receiving the cpg data with
cpg_data:get_groups/2 function) which is equivalent to what happens
for a lazy destination refresh in CloudI when sending a service
request.<br>
<blockquote
cite="mid:CABNk+6=VBryFeGOSgWJAQTaPOHRi4_V2trXFXv=hNBLw5oTwkQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Cheers,</div>
<div>Paul.<br>
<br>
<div class="gmail_quote">On Sun Feb 08 2015 at 11:07:52 PM
Roberto Ostinelli <<a moz-do-not-send="true"
href="mailto:roberto.ostinelli@widetag.com">roberto.ostinelli@widetag.com</a>>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
Michael,<br>
Do you know what the impact of this is when you add/remove
keys often? I'm imagining a lot of communication (async)
happening between nodes.<br>
<br>
I'm actually very ok with the AP portion of the CAP
theorem (that pg2 seems to offer) in contrast with the CA
(of global/gproc).<br>
<br>
Just wandering if there are studies and impact on
performance. As said, I have 3 nodes with a total of 500k
pids that need registration<br>
<br>
Thanks,<br>
r.<br>
<br>
<br>
<br>
> On 08/feb/2015, at 22:10, Michael Truog <<a
moz-do-not-send="true" href="mailto:mjtruog@gmail.com"
target="_blank">mjtruog@gmail.com</a>> wrote:<br>
><br>
> The main reason is that you avoid the need to resolve
state conflicts when global state gets merged after a
netsplit. With pg2 and cpg, all the state relevant to the
local node is stored locally and remote state gets merged
as nodes are added. When a node dies, its pids are
removed, as expected, but there is no need for centralized
global state.<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a moz-do-not-send="true"
href="mailto:erlang-questions@erlang.org"
target="_blank">erlang-questions@erlang.org</a><br>
<a moz-do-not-send="true"
href="http://erlang.org/mailman/listinfo/erlang-questions"
target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
</body>
</html>