Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

if blog_id > 50000 use 2nd server WordPress


I am trying to understand possibilities if i need in future. I am preparing to open a network on WordPress MultiSite with HyperDB. I want to let users open subdomain sites with registration and i need a solution for using a 2nd server when need.

There is 1 main site and subdomains are not connecting each other. I need somehow forward requests to other server if blog_id > 50000 There is some "old" duscussions about it: [[LINK href=" "]] [[/LINK]]

<blockquote>The idea is to receive all incoming requests on a single HTTP server. This server, using mod_proxy and mod_rewrite, will route requests to X backend servers, acting as a reverse proxy.</blockquote>

Ofc I am not expecting answer on this question for 1$. I just need someone that can explain me solution for it and tell me your price for it.

(I have solution with hyperdb database sharding + blog.dir sharding for 1 server but problem is i couldnt understand how to route requests to 2nd server when need.)

Answers (2)


juan manuel incaurgarat answers:

im not sure, but reverse proxy might help
this is one thing i found, its a lil bit old though:

A configuration of your virtual host site:
put this in apache2/sites-enabled
<VirtualHost <ip address if your outgoing ethernet card:80>
# Basic setup
ServerAdmin <your email adres>
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
ProxyPass / http://<the ip address that your other server has>:80/
ProxyPassReverse / http://<the ip address that your other server has>:80/

plus, this link
the "A Reverse Proxy Scenario" part seems like a good idea too.


Francisco Javier Carazo Gil answers:

Furthermore, you will have to use a good cache in web server, I recommend you Varnish:, for example, Facebook is one of their users (

I recommend you this post:

You will have to join all the ideas to have the best optimization possible.