WebFaction
Community site: login faq

I have a very simple application (just a Static app) that is located on Servers A and B.

Currently there is one website record set up, pointing to Server A. I want all requests to go to Server B.

If I add a new website record, round-robin DNS will kick in and requests will go to both A and B. If I remove the record for A at that point, I think some people will be unable to connect until their DNS updates. The "Advanced Migration" tutorial, while showing me how to test the app on Server B, does not indicate how all the traffic will somehow start hitting just the new server, unless I am missing something.

The application is stateless and it doesn't matter if some requests go to both servers for awhile; I just need to prevent downtime. Thank you very much for the advice :)

asked 01 Dec '12, 19:46

SethKinast
258211
accept rate: 54%


Can I do some sort of trickery with adding an A record to Server A's website entry that points to server B or anything, to ensure that if people hit the old server they get sent to B?

You can do the following...

  • Create sites to serve the app from both servers, and ..
  • Use an A record (the "external" hosting option for the domain in the control panel) to set the sites IP to that of the new server

... then you won't see any downtime during DNS propagation. Once you see that no more traffic is hitting the old server, you can then delete the site on the old server and set the hosting option for the domain to "WebFaction". No need for any redirects - this will be completely transparent for your site visitors.

permanent link

answered 02 Dec '12, 10:41

seanf
12.2k41836
accept rate: 37%

edited 02 Dec '12, 10:42

Got it. This is the scenario that is hinted at in the docs but not explicitly set out. Glad to know it will work.

(02 Dec '12, 12:58) SethKinast

DNS changes will always have a possibility of downtime, since they take time to globally update.

You can have us reduce the TTL value of a given domain to 5 minutes, which forces all DNS servers who honor caching times to refresh every 5 minutes.

permanent link

answered 01 Dec '12, 21:22

johns
5.4k312
accept rate: 23%

Can I do some sort of trickery with adding an A record to Server A's website entry that points to server B or anything, to ensure that if people hit the old server they get sent to B?

(02 Dec '12, 02:01) SethKinast

DNS is not that suited for fault tolerance implementations, so (assuming your app is on www.yourdomain.com):

  • run your app on server B on its own unique URL (as in new.YOURDOMAIN.com), as well as on www
  • issue temporary (302) redirects (on server A) from www to new
  • remove the A record for server A - even if someone cached it, s/he will still be redirected to the new location
  • monitor server A for incoming requests - when they stop, or diminish to a certain threshold, then you can abandon the site on server A, and remove the redirect.

Thus, people who hit the old site will still be redirected to the new location, and people who reach the new site will not notice the difference.

(02 Dec '12, 03:19) valentini
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×44

question asked: 01 Dec '12, 19:46

question was seen: 2,345 times

last updated: 02 Dec '12, 12:58

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM