[Pacemaker] Pacemaker Active-Active Load Balancing Issue
Andreas Kurz
andreas at hastexo.com
Wed Nov 16 15:56:23 UTC 2011
On 11/16/2011 10:10 AM, IVAN GARCIA wrote:
> Hi there,
> I'm configuring a cluster active-active for web proxy (SQUID), the proxy
> will be 4 nodes but now I only have 2 nodes, I've configured Virtual-IP
> with resource OCF:heartbeat:IPaddr2 and Squid in LSB resource mode, In
> active pasive all works fine but in active-active mode I don't know,
> why the requests are not balanced?. All requests go to the first node.
> I've both services actives in both nodes.
>
> [root at nproxy01 /]# crm status
> ============
> Last updated: Wed Nov 16 10:02:32 2011
> Stack: cman
> Current DC: nproxy01 - partition with quorum
> Version: 1.1.2-f059ec7ced7a86f18e5490b67ebf4a0b963bccfe
> 2 Nodes configured, 2 expected votes
> 2 Resources configured.
> ============
>
> Online: [ nproxy01 nproxy02 ]
>
> Clone Set: CLONE_ClusterIP (unique)
> ClusterIP:0 (ocf::heartbeat:IPaddr2): Started nproxy01
> ClusterIP:1 (ocf::heartbeat:IPaddr2): Started nproxy01
Here ^^^^... both IP clones on the same node, that is the reason why the
request are only redirected to node1.
> Clone Set: CLONE_squid
> Started: [ nproxy01 nproxy02 ]
> [root at nproxy01 /]#
>
> The node's configrations are:
> _*
> nproxy01:*_
>
> crm configure show
> node nproxy01 \
> attributes standby="off"
> node nproxy02 \
> attributes standby="off"
> primitive ClusterIP ocf:heartbeat:IPaddr2 \
> params ip="10.24.2.38" nic="eth0" cidr_netmask="24"
> clusterip_hash="sourceip" \
> op start interval="0s" timeout="60s" \
> op monitor interval="5s" timeout="20s" \
> op stop interval="0s" timeout="60s"
> primitive squid lsb:squid \
> op monitor interval="5s" \
> op start interval="0s" timeout="60s" \
> op stop interval="0s" timeout="180s" \
> meta is-managed="true"
> clone CLONE_ClusterIP ClusterIP \
> meta globally-unique="true" clone-max="2" clone-node-max="2"
> target-role="Started"
interleave=true ... might be useful
> clone CLONE_squid squid \
> meta master-max="2" master-node-max="2" clone-max="2"
> clone-node-max="1" notify="true" target-role="Started"
> colocation ClusterIP-Squid inf: CLONE_ClusterIP CLONE_squid
> order ClusterIP-after-Squid inf: CLONE_ClusterIP CLONE_squid
try the correct order:
order ClusterIP-after-Squid inf: CLONE_squid CLONE_ClusterIP
> property $id="cib-bootstrap-options" \
> dc-version="1.1.2-f059ec7ced7a86f18e5490b67ebf4a0b963bccfe" \
and consider an update to >= 1.1.5, there have been some useful bugfixes
regarding clones IIRC
Regards,
Andreas
--
Need help with Pacemaker?
http://www.hastexo.com/now
> cluster-infrastructure="cman" \
> expected-quorum-votes="2" \
> stonith-enabled="false" \
> no-quorum-policy="ignore" \
> last-lrm-refresh="1321377655"
> rsc_defaults $id="rsc-options" \
> resource-stickiness="100
>
>
> _*nproxy02:*_
>
> crm configure show
> node nproxy01 \
> attributes standby="off"
> node nproxy02 \
> attributes standby="off"
> primitive ClusterIP ocf:heartbeat:IPaddr2 \
> params ip="10.24.2.38" nic="eth0" cidr_netmask="24"
> clusterip_hash="sourceip" \
> op start interval="0s" timeout="60s" \
> op monitor interval="5s" timeout="20s" \
> op stop interval="0s" timeout="60s"
> primitive squid lsb:squid \
> op monitor interval="5s" \
> op start interval="0s" timeout="60s" \
> op stop interval="0s" timeout="180s" \
> meta is-managed="true"
> clone CLONE_ClusterIP ClusterIP \
> meta globally-unique="true" clone-max="2" clone-node-max="2"
> target-role="Started"
> clone CLONE_squid squid \
> meta master-max="2" master-node-max="2" clone-max="2"
> clone-node-max="1" notify="true" target-role="Started"
> colocation ClusterIP-Squid inf: CLONE_ClusterIP CLONE_squid
> order ClusterIP-after-Squid inf: CLONE_ClusterIP CLONE_squid
> property $id="cib-bootstrap-options" \
> dc-version="1.1.2-f059ec7ced7a86f18e5490b67ebf4a0b963bccfe" \
> cluster-infrastructure="cman" \
> expected-quorum-votes="2" \
> stonith-enabled="false" \
> no-quorum-policy="ignore" \
> last-lrm-refresh="1321377655"
> rsc_defaults $id="rsc-options" \
> resource-stickiness="100
>
>
> I've configured *clusterip_hash="sourceip" *according to the
> documentation that
>
> Now we must tell the ClusterIP how to decide witch requests are
> processed by witch hosts. To do this we must specify the
> clusterip_hash parameter.
>
>
> With this parameter it's sufficient to do Load Balancing or againts it's
> necessary install ldirector?
>
> Thanks in advance.
>
> ---
> Ivan.-
>
> Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda prohibida su divulgación copia o distribución a terceros sin la previa autorización escrita de Leroy Merlin España, S.L.U. En el caso de haber recibido este correo electrónico por error, se ruega notificar inmediatamente esta circunstancia, mediante reenvío a la dirección electrónica del remitente, procediendo seguidamente a su destrucción.
> -------------------------------------------------------------------------------
> The information in this e-mail and in any attachments is confidential and solely for the attention and use of the named address(es). You are hereby notified that any dissemination, distribution or copy of this communication is prohibited without the prior written consent of Leroy Merlin España, S.L.U. If you have received this communication in error, please, notify the sender by reply e-mail., proceeding immediately afterwards to its destruction.
>
>
>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 286 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20111116/e042fa4c/attachment-0004.sig>
More information about the Pacemaker
mailing list