I have a WordPress website. These days I'm having physical memory limitations. I tried to fix it and did well except the memory usage (RAM) usage is still high. Not as high as before, but still not good.

I have a Linux hosting with cPanel in Godaddy which is where my domain is based, and I have another hosting on Obambu. Can the domain work under the two hosts? I mean with the same database and both servers presenting content to users?


1 Answer 1


There is a technique that could make it work, sort-of: round robin DNS. You can add two DNS records for the same name with two different IP addresses. In theory, clients should get one of two of the IP values and half your traffic should hit each of your servers.

In practice round robin DNS has problems:

  • One of your servers will end up getting more traffic than the other. This is due to DNS servers making a choice for all their users and serving just one of the two values to many users.
  • If one of your servers goes down, the half of users that would hit it won't be able to get to your site. There is nothing that will route them to the other server that is still up. This makes your site twice as fragile as it was with only one server and makes it hard to do scheduled down time and maintenance.

It is better to get two servers at the same web host and put a load balancer in front of them. A load balancer only works on a local network, but it routes traffic to servers based on whether or not they are actually up. It also allows you to control traffic percentages much better.

With either round robin DNS or a load balancer, you will need two central things to run WordPress:

  1. Your database which stores posts and users
  2. Your wp-content directory which stores images and themes

To use two servers, you will need to set both of them up to use a central database and a network file system for wp-content.

Another option is to continue with a single server but put a content delivery network (CDN) in front of it. A CDN is a set of caching proxy servers designed to be close to your users. A CDN will reduce the load on your main server while making your site faster for users. Because there is caching, it is hard to use this technique with highly dynamic websites.

  • can i use CDN Plugins ? Apr 18, 2018 at 22:47
  • A CDN is an external service, not a plugin. Here is an article comparing seven of them for WordPress: wpbeginner.com/showcase/best-wordpress-cdn-services Apr 19, 2018 at 1:33
  • 1
    Technically both problems you mentioned can be overcome using "failover" type services offered by some DNS providers. These would use low TTLs and monitor both hosts in order to stop serving records to one particular host if it goes down. Apr 19, 2018 at 11:07
  • There are also problems with failover services. First they are usually fairly expensive. Second, failover can take an hour, even with low TTL values. We have found that low TTL values are not universally honored, so not all traffic moves over in a timely manner. I'd recommend a load balancer first, and then a fail over to a second load balancer in a different geographic location for when something catastrophic happens to your primary hosting. Apr 19, 2018 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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