[gsoc-dev] [Mirror Syncing API] Adding slave node's via master API

Lance Albertson lance at osuosl.org
Wed Jun 25 15:32:24 UTC 2014


On Wed, Jun 25, 2014 at 1:16 AM, Pranjal Mittal <mittal.pranjal at gmail.com>
wrote:

> I had a question regarding "Adding Slave Nodes" to the Master node via the
> Mirror Syncing API. One way is to manually add the slave nodes to the
> master node by specifying the host-names. We can avoid the step by letting
> the slave nodes inform the master automatically as soon as they are started.
>

​At least in our case, adding nodes doesn't happen that often or as often
as we would add a node in ganeti.​ So I wouldn't worry about making it too
automatic, but easier to add.


> *1. Advantages of this scheme*
>
> 1.1 Less manual work for user (Adding slaves manually in the beginning
> avoided)
>
> 1.2 Consistency in use  of hostnames/ IP's. Later on when the slave has to
> inform the master that it has completed its syncing, it can use the same IP
> address it provided while registering with the master. The problem with
> manually specifying hostnames is that sometimes we may specify hostname or
> sometimes IP addresses and then there is a problem while querying. (Since
> queries, are string based and the same field may store either a FQDN
> hostname or an IP address)
>
>
> *2. Issues to consider*
>
> 2.1 Slaves need to be aware of master before hand which can be achieved by
> having a common MASTER_HOSTNAME setting in settings.py for all nodes in the
> architecture
>
> *or*
>
> Providing the master hostname everytime on starting the slave api
> (or a provision to adjust it dynamically or override defaults like
> MASTER_HOSTNAME setting)
>
>
> 2.2 Master API needs to be started before any of the slave API's for auto
> registration of slaves with master.
>
>
> *Question*
>
> What master-slave awareness scheme would you suggest? Does what I mention
> above look like a reasonable scheme and makes sense? I am not sure if I
> explained 1.2 properly, we could discuss it in detail on irc today.
>

​I like the idea of slaves notifying ​the master. My only concern is that
they would need some sort of authorization to connect to the master. We
wouldn't want any slave to just connect. From a deployment point of view
this makes it easier. One thing we may want to consider is once its added,
does anything else happen automatically (initial sync), or do we want to
initiate that from our end? Or make that configurable? I'd prefer the
latter since you may want to time the initial sync.

If the master API isn't up, the slave should just poll it every so often
until its back up. Maybe using one of those methods like gmail does where
it keeps increasing the interval frequency. But it shouldn't out right fail.

-- 
Lance Albertson
Director
Oregon State University | Open Source Lab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/gsoc-dev/attachments/20140625/aa1457a3/attachment.html>


More information about the gsoc-dev mailing list