Changing the IP of a facebook application without downtime

This is definitely not rocket science, but perhaps it could help someone...

If you have a facebook application, and want to move from one server to another, requiring an IP change, as we did recently, you can follow this method to achieve a virtually no downtime move.

Your domain is MyApp.com (IP 1.1.1.1).
Your Facebook (FB) application MyApp.com/WelcomePage

You want to move to a different IP (1.1.1.2):
  1. create a new sub-domain old.MyApp.com pointing to 1.1.1.1
  2. change your FB app to point to old.MyApp.com/WelcomePage
  3. create a new sub-domain new.MyApp.com pointing to 1.1.1.2
  4. setup new server, do what you need to do, when ready, change FB app to point to new.MyApp.com/WelcomePage
  5. leave the old server online in case it is accessible outside of facebook, via http://www.myapp.com/ and forward all requests to new server
  6. change *.MyApp.com and http://www.myapp.com/ to point to 1.1.1.2
  7. 48hours later, take down your old sever

Overkill ??? yes, for many it could be but this allows you to run parallel servers while you test everything, and allows you to quickly and easily rollback in case the moves goes sour.

No comments: