ChicagoBoss clustering works now! :)

167 views
Skip to first unread message

Kai Janson

unread,
Jan 22, 2013, 1:44:39 AM1/22/13
to chica...@googlegroups.com
Hi y'all,

Evan and I sat down and fixed CB's clustering.
There are two different ways of setting up clustering now.

a) Multiple nodes on one host
b) Multiple hosts with one (maybe more than one?) CB node

For a:
For the master_node (that one that runs the shared services) configure boss.config like this:

{vm_cookie, "mycoolapp"},
{vm_sname, "iamboss"},

and on the "client" side set 

{vm_cookie, "mycoolapp"},
{vm_sname, "iamclient"},
{master_node, "iamboss"},

For b:
For the master_node (that one that runs the shared services) configure boss.config like this:
{vm_cookie, "mycoolapp"},
{vm_name, "appmaster@<fullyqualifiedhostname>"},

and on the "client" side set

{vm_cookie, "mycoolapp"},
{vm_name, "client@<fullyqualifiedhostname>"},
{master_node, "appmaster@<fullyqualifiedhostname>"},

Startup the master node first.
Then start the client(s).

Open cb_admin at one of the nodes and you should see connected nodes listed on the first page.

--Kai

P.S.> You might need to deal with the port numbers of the apps especially when they are on the same host.

Tim McNamara

unread,
Jan 22, 2013, 1:52:34 AM1/22/13
to chica...@googlegroups.com
Sweet!

Does anyone know if it's better to use a single node on a multi-core host or multiple, now that SMP has been implemented?

--
 
 

Kai Janson

unread,
Jan 22, 2013, 1:54:19 AM1/22/13
to chica...@googlegroups.com
Hi Tim,

Maybe you can help figuring it out?

:)

--Kai

Sent from my tricorder
--
 
 

Jose Luis Gordo Romero

unread,
Jan 22, 2013, 3:29:47 AM1/22/13
to chica...@googlegroups.com
If you need HA and scale out, multi host is needed.

Having a master node is problematic on the operations side, if master node is down the whole cluster will be down (server failure, deployments, ...).



--
Jose Luis Gordo Romero


2013/1/22 Kai Janson <kot...@gmail.com>
--
 
 

Evan Miller

unread,
Jan 22, 2013, 9:12:02 AM1/22/13
to ChicagoBoss
On Tue, Jan 22, 2013 at 12:52 AM, Tim McNamara <mcnama...@gmail.com> wrote:
Sweet!

Does anyone know if it's better to use a single node on a multi-core host or multiple, now that SMP has been implemented?

Single node should be fine -- the request processing is all parallel but it's possible there are bottlenecks that would make multiple nodes preferable. I haven't done any serious testing or profiling yet.

Evan
 
--
 
 



--
Evan Miller
http://www.evanmiller.org/

Max Lapshin

unread,
Jan 22, 2013, 9:21:18 AM1/22/13
to chica...@googlegroups.com
What is this clustering for?

Is it session sharing?

Tino Breddin

unread,
Jan 22, 2013, 9:21:26 AM1/22/13
to chica...@googlegroups.com, Evan Miller
I would also suggest using only one node. When running multiple nodes
I'd expect a performance penalty since the nodes will essentially
contest each others resources as long as you are not working with cpu
affinity.

Tino

On 01/22/2013 03:12 PM, Evan Miller wrote:
> On Tue, Jan 22, 2013 at 12:52 AM, Tim McNamara <mcnama...@gmail.com>wrote:
>
>> Sweet!
>>
>> Does anyone know if it's better to use a single node on a multi-core host
>> or multiple, now that SMP has been implemented?
>>
>
> Single node should be fine -- the request processing is all parallel but
> it's possible there are bottlenecks that would make multiple nodes
> preferable. I haven't done any serious testing or profiling yet.
>
> Evan
>
>
>>
>> On 22 January 2013 19:44, Kai Janson <kot...@gmail.com> wrote:
>>
>>> Hi y'all,
>>>
>>> Evan and I sat down and fixed CB's clustering.
>>> There are two different ways of setting up clustering now.
>>>
>>> a) Multiple nodes on one host
>>> b) Multiple hosts with one (maybe more than one?) CB node
>>>
>>> *For a:*
>>> For the master_node (that one that runs the shared services) configure
>>> boss.config like this:
>>>
>>> {vm_cookie, "mycoolapp"},
>>> {*vm_sname*, "iamboss"},
>>>
>>> and on the "client" side set
>>>
>>> {vm_cookie, "mycoolapp"},
>>> {*vm_sname*, "iamclient"},
>>> {master_node, "iamboss"},
>>>
>>> *For b:*
>>> For the master_node (that one that runs the shared services) configure
>>> boss.config like this:
>>> {vm_cookie, "mycoolapp"},
>>> {*vm_name*, "appmaster@<fullyqualifiedhostname>"},

Evan Miller

unread,
Jan 22, 2013, 9:25:49 AM1/22/13
to ChicagoBoss
On Tue, Jan 22, 2013 at 8:21 AM, Max Lapshin <max.l...@gmail.com> wrote:
What is this clustering for?

Is it session sharing?

It's for running shared services on one node which can be accessed by the others -- message queue, incoming email, in-memory sessions, mock database, BossNews, etc.
 

--
 
 

Max Lapshin

unread,
Jan 22, 2013, 9:27:30 AM1/22/13
to chica...@googlegroups.com
got it.


--
 
 

Kai Janson

unread,
Jan 22, 2013, 10:55:56 AM1/22/13
to chica...@googlegroups.com
I wonder what kind of already written (Erlang) software could be used to soup up the single master node.
As I tried it last night, it works great (thus far).  I setup a two node "cluster", one being the master node on a different host
and one on my laptop (the client).

The client accesses the database (in my case MongoDB) on the master node and naturally, master and client have access to the same data in the database.  Which might or might not be a good thing ... :)

I love the idea to be able to setup one master node and many clients, and I guess if I were trying to put something like this in production, I'd take a soupier server (physical/virtual host machine) for the master node in place, with a few more CPU cores, maybe 8/12/16 and a good amount of RAM.  Then I would setup clients that utilize the master node, and even though the code base on the clients and the master node is no different, I'd avoid to use the master node as a "work node"; that's what the clients are for.

Furthermore, I guess it would be a good idea to put some (hardware) load balancer(s) in front of the clients and hum away with this setup.

What are your thoughts?

How can we:
  • Make it rock solid
  • Make it HA
  • Improve it on the master node for ... ?!
I know we have a very smart user base, so c'mon guys and make this thing rock!
The challenge is up!

--Kai

Kai Janson

unread,
Jan 22, 2013, 11:15:17 AM1/22/13
to chica...@googlegroups.com
Here is one more question:

Which port(s) do I need to open on a firewall and which protocol do these connections require?
I opened the port for epmd (4369) according to http://www.erlang.org/doc/man/epmd.html

No dice when I try to connect from the outside, anything else I might be missing?

--Kai

japb...@gmail.com

unread,
Feb 23, 2015, 8:20:04 AM2/23/15
to chica...@googlegroups.com
Hi. 

I see that this is "old" conversation but I'm interesting to know if CB has a HA availability. In other case, I will try my best.

thanks. 

Regards.   
Reply all
Reply to author
Forward
0 new messages