不通过应用程序而纯粹从简单服务器配置。。。transparent to your apps 1. 用 apache mod_rewrite 实现根据用户ip自动选择镜像 这是一个非常简单的实现–如果用户来自中国,自动重定向到位于中国的服务器,否则转到海外的服务器。并且自动检测服务器状态,如果一个服务器倒了所有traffic都会转到另外的server. 在 apache config 里加一个 virtual host: <virtualhost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot /hosting/balance ServerName balance <filesmatch "\.(php|htm|html|pl|asp)"> Allow from all </filesmatch> [...]