Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

How can two processing units be forced to start on the same host?

Lets say we have a grid on 2 hosts. For a particular processing unit can we force the primary to get deployed on one specific host?

Edited by: A Sirohi on Jun 16, 2011 4:29 AM

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3688]{quote}

asked 2011-06-16 04:19:08 -0600

asirohi gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

Controlling a deployed PU target machine can be done via the SLA (IP , or zone will do). Why you need two data grid? Usually one data grid used to store the entire data. You don't need to split it into few data grids.


answered 2011-06-16 06:27:16 -0600

shay hassidim gravatar image
edit flag offensive delete link more



No, no we have 1 grid running over 2 machines. We want to ensure 2 processing units get deployed on the same host since these two will be doing a lot of talking.
So say if we put them in the same zone, and run them in primary-backup mode, we they still get started on one host?


asirohi gravatar imageasirohi ( 2011-06-16 20:03:22 -0600 )edit

How 2 instances of the same PU communicate with each other? I'm not sure I understand what you are trying to deploy. Are these 2 instances that embed different partitions of the same cluster? Primary and a backup should always provisioned into different machines. When you say "talking" do you mean performing space operations or doing some other remote activity? If you want absolute control just place these 2 components within the same pu.xml. Shay

shay hassidim gravatar imageshay hassidim ( 2011-06-16 20:50:49 -0600 )edit


First of, let me just say thank you so much for the super quick responses. Much appreciated!

Let me clarify my query. We have one grid spread across two machines. We want to deploy 2 processing units(lets call them orderProxy, and orderWorker) on this grid. We will be deploying 1 instance of each, in primary-backup mode. These 2 processing units(orderProxy, and orderWorker) need to constantly talk to each other. So ideally we would want to ensure that both their primaries are on one machine.

We want to ideally segregate them out to 2 different processing units for design reasons.

So my query is: When deploying a processing unit in primary-backup mode, can we dictate which machine is to be the primary?

Do please let me know your thoughts!

asirohi gravatar imageasirohi ( 2011-06-16 21:08:49 -0600 )edit

You can use the approach used here to force the different primaries and backups to be provisioned into the same GSC: http://www.gigaspaces.com/wiki/displa...

In general I would not advise separating components that talk with each other constantly into different processing unit instances, but colocate these to be part of the same PU to share the same space instance.

Having PU instance type X accessing PU type Y with an embedded space while hosted within the same GSC is for sure faster than having these hosted within different GSCs, but it will not be fast as having these as part of the same PU running within the same GSC within the same PU instance. The reason is that each PU instance have its own classloader, so when 2 PU instances running within the same GSC they will still go through serialization and network (loopback) when communicating with each other via the space.

Having these within the same PU instance will allow them to share the same embedded space proxy. This will allow them to communicate with each other using an embedded space proxy that will avoid serialization and network overhead.


shay hassidim gravatar imageshay hassidim ( 2011-06-17 06:49:38 -0600 )edit


Thanks a lot - that is exactly what we were looking for. A question though - If we have 2 embedded spaces within the same processing unit(say for the sake of logical separation of data, will the serialization cost still hamper us?

asirohi gravatar imageasirohi ( 2011-06-19 20:17:57 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2011-06-16 04:19:08 -0600

Seen: 79 times

Last updated: Jun 16 '11