0

Situation: We're setting up a load-balancer with a self hosted WordPress (4.6) Networks on RHEL 7. MariaDB is replicated via master-slave.

Problem: However, our network team want to point the load-balancing monitor trigger to http://IP/canary-page. There is a certain string we look for. If present, the DNS stays on the primary IP address. If not present (server issue or manually altered), the DNS changes to the fail-over instance.

Question: Can one access a WP site via it's IP?

If the answer to the above question is yes, then the rest of this doesn't matter.

I tried to set up domain aliasing through wordpress-mu-domain-mapping but this doesn't not appear to allow any aliasing of the base site ("site 1"). This complicates the matter. Since I couldn't alias site 1, I thought of the option below.

Alternative options: My other thought was to create a subsite in the networks install called Canary. Since the database is replicated it would have the same primary domain (http://my-canary-url). At the WP level, we could also assign domain aliases of both my-canary-pirmary and my-canary-failover.

Then at a DNS level, the load-balancer would use my-canary-url. We'd point my-canary-primary to the primary instance and my-canary-secondary to the fail over installation.

0

The answer is yes, but the question is flawed.

The only thing that determines how a website can be addressed is how the web server is setup.

Note that if you use DNS entries, then you're not accessing the site by IP.

Although it's feasible and useful to use DNS to do some load-balancing, it is very impractical to handle redundancy because of caching at multiple levels.

If your two servers are at the same location, the best approach would probably be to have a facade (router/firewall) that handles the load balancing and redundancy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.