The WPMS conundrum

@tanner and I have hit a snag with WPMS, and that snag is in the form of a load balancer. We’re basically looking at three options, each with their own drawbacks, and we’re not sure how to proceed. I’ll enumerate them:

1: HP Cloud’s LBaaS

This would be a perfect solution if there were proper cookie configuration settings. It’s not a single point of failure (it’s as a service, see the name), but the default settings for it don’t allow for sticky sessions, which means that people will constantly be logged out of WordPress. We contacted the LBaaS team, who said that they’d be implementing an option for cookies within the next 2-3 weeks, which is an unfortunately long timeframe.

2: Keepalived + HAProxy

We currently have two instances of HAProxy spun up in HP Cloud, but we have no way right now for the VIP to float between the two instances. HP Cloud doesn’t make it easy. We might be able to script something in Keepalived to assign the IP to the working instance using HP Cloud’s OpenStack CLI tools, but we have no experience in this area and are stuck. Another possibility is to have just one HAProxy instance, but that would create a SPOF.

**3: Route 53 **

This was our original, temporary solution, and we had session stickiness issues there. However, we could set up health checks “so if one LB fails a check twice, it’ll failover to the other one” (@tanner’s words). This isn’t the most ideal solution for load balancing (because it’s DNS-based, and low TTL doesn’t always work), but it might be good enough for now until HP gets its act together with configuration for the LBaaS.


@mrz, or anyone else, thoughts? This is proving to be a huge issue, and we’re not sure how to move forward.

I think there are two end points.

logged in admin users

anonymous readers

The latter needs to scale more than the former. So perhaps use two different IP addresses.

2 Likes

Unfortunately, WordPress doesn’t allow you to be able to access it from multiple addresses. Each site has a hardcoded domain name. It’s impossible (from my understanding, @bkerensa please confirm) to allow multiple addresses to point to the same admin interface. WordPress redirects automatically to one hardcoded one.

Yeah each site is hardcoded with its own domain name.

I understood @mrz incorrectly, but he clarified on IRC. His solution worked!

The admin panels are now pointing at only one instance of WPMS, and the blogs themselves (which need scaling) are pointing at the LBaaS. This is thanks to a domain mapping setting that allows for the admin panel to be on the original subdomain, rather than the mapped domain. No cookie problems. :smile: