Load Banalancing in AFR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
in afr.c i can read :

afr_first_up_child function which is always call, but if i understand,
there's no load balancing in afr, just the first child up is taken.
Can I just implement a Round Robin function to alternate between child
up or it's more complicated ?

Regards,
Nicolas Prochazka

 /*
  first_up_child - return the index of the first child that is up
 /

int
afr_first_up_child (afr_private_t *priv)
{
 xlator_t * children = NULL;
 int         ret      = -1;
 int         i        = 0;

 LOCK (&priv->lock);
 {
  children = priv->children;
  for (i = 0; i < priv->child_count; i++) {
   if (priv->child_up[i]) {
    ret = i;
    break;
   }
  }
 }
 UNLOCK (&priv->lock);

 return ret;
}




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux