Additional work on plugins after upgraded to WP 3.6

I’ve just finished upgrade WP 3.6 and related plugins. There are two plugins generate Error message

PHP Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GoogleSitemapGeneratorLoader::Enable() should not be called statically in /wp-includes/plugin.php on line 406, referer: http://www.refmanual.com/wp-admin/plugin-editor.php?file=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-core.php&plugin=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-ui.php

PHP Strict Standards: Non-static method GoogleSitemapGeneratorLoader::GetBaseName() should not be called statically in /wp-content/plugins/google-xml-sitemaps-v3-for-qtranslate/sitemap.php on line 114, referer: http://www.refmanual.com/wp-admin/plugin-editor.php?file=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-core.php&plugin=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-ui.php

PHP Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GoogleSitemapGeneratorLoader::CallHtmlShowHelpList() should not be called statically in /wp-includes/plugin.php on line 173, referer: http://www.refmanual.com/wp-admin/plugin-editor.php?file=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-core.php&plugin=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-ui.php

PHP Strict Standards: Declaration of W3_Cache_Memcached::delete() should be compatible with W3_Cache_Base::delete($key, $group = '') in /wp-content/plugins/w3-total-cache/lib/W3/Cache/Memcached.php on line 15, referer: http://www.refmanual.com/wp-admin/plugins.php Continue reading

Configuring LVS-TUN for web service

There are many way to spread load to server farm, but I think LVS-TUN can do the best job. Since LVS-TUN will forward the requests to REAL servers and they response client request through their own public interface. Also REAL servers can locate in different data center or even different Geographical location. This mechanism can prevent uplink flooding, compare to LVS-NAT and LVS-DR that cannot work outside a physical network segment.

Our sample config is a startup model with two failover load balancers running ldirectord, heartbeat and LVS-TUN IP-IP tunneling configured on two web nodes in different datacenter.

Requirement

You’ll need a virtual IP address (VIP) that can float between load balancers, and setup in all web nodes. The way to work with that VIP is that, load balancers will receive traffic on VIP and forward request to a web node, and it will reply using that IP address as a source. Heartbeat will determine which load balancer take control of VIP at one time. Web nodes need to configure silent and won’t send ARP.
Install necessary packages

# yum -y install \
heartbeat.i386 \
heartbeat-ldirectord.i386 \
heartbeat-pils.i386 \
heartbeat-stonith.i386 \
ipvsadm.i386

Configuring the load balancers

Copy default config files…

[[email protected]_lvs ~]# cp /usr/share/doc/heartbeat-2.1.3/ha.cf /etc/ha.d/
[[email protected]_lvs ~]# cp /usr/share/doc/heartbeat-2.1.3/authkeys /etc/ha.d/
[[email protected]_lvs ~]# cp /usr/share/doc/heartbeat-2.1.3/haresources /etc/ha.d/
[[email protected]_lvs ~]# cp /usr/share/doc/heartbeat-ldirectord-2.1.3/ldirectord.cf /etc/ha.d/

Setup ldirectord

#cat >>/etc/heartbeat/ldirectord.cf<<EOF
checktimeout=10
checkinterval=2
autoreload=yes
logfile="local0"
quiescent=yes


virtual=1.2.3.4:80
real=192.168.0.10:80 ipip
real=172.19.0.10:80 ipip
service=http
request="httpcheck.html"
receive="OK"
scheduler=rr
protocol=tcp
checktype=negotiate

Create a html file called httpcheck.html, content is “OK”. ldirectord will GET /httpcheck.html and see if it receive “OK” every two seconds, and it will drop the REAL server after 10 seconds disconnect. Noted that, the real ip is different subnet, i.e. real server don’t need to sit together in once place, one could be in USA and another one could be in Singapore. Load balance type was simply round-robin style.

Setup Heartbeat Continue reading