1

We have 2 servers. One is old server and another is the new one. Currently we about doing a migration because the old server is not capable enough to handle everyday requests.

The specs are:

Old server

  • Ubuntu 10.04
  • Nginx as Reverse Proxy
  • Apache WSGI
  • Python/Django

New Server

  • Ubuntu 10.04
  • Nginx
  • Gunicorn
  • Python/Django
  • Celery+Redis

Our manager asked us to research if the old server can perform multiple forwarding to all incoming request, for example, set Nginx of old server to forward all request to both old and new server. The purpose is to perform unit testing to new server using old server as comparer, see if the new server is ready to take over the role.

Please help, if there is an idea, or must install some engine, or what we do is impossible. Many thanks.

Currently my server configuration (old server) :

server {

listen *:80;
access_log /var/log/nginx/apps.access.log;

error_log /var/log/nginx/apps.error.log;
location / {

   proxy_pass http://127.0.0.1:8081;
   include /etc/nginx/proxy.conf;

}

location /media/ {

   root    /var/www/media/;
   expires 24h;

}

}

1 Answer 1

1

No answer? :'(... for now, this is my approach:

I created new server (dummy server) that copy all web service structures and methods (dummy method, same method declaration but no code). Inside every those methods I wrote:

def foo( bar ):

import xmlrpclib as x p = x.ServerProxy( server1_url )

result = p.foo(bar)

p = x.ServerProxy( server2_url )

p.foo(bar)

return result

if you found this code make the web service slower, just perform send to Server2 using celery. We only need the Server1 result.

This way is only a trick but it works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .