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="http://codex.wordpress.org/How_to_Scale_WPMU "]]http://codex.wordpress.org/How_to_Scale_WPMU [[/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.)
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>
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 http://www.apachetutor.org/admin/reverseproxies
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: https://www.varnish-cache.org/, for example, Facebook is one of their users (https://www.varnish-software.com/references/social-media/facebook).
I recommend you this post: http://ocaoimh.ie/2011/08/09/speed-up-wordpress-with-apache-and-varnish/.
You will have to join all the ideas to have the best optimization possible.