Thanks Fred and Hassan.

For anyone following this thread, here' a tidy means for performing
the proxy with Apache:
http://blog.vacs.fr/index.php?post/2009/01/25/21-transparent-web-server-migration-with-apache-proxy

I'm not sure I'll want to bring services down in order to dump/restore
the production db onto the new server, so I'm investigating RubyRep
for an easy method of db replication.  They have a short screen cast
to watch if interested (http://www.rubyrep.org/)

So we're down to just a few "easy" steps:

1. A week ahead of the scheduled migration, throttle down the TTL for
your DNS entry
2. Get new server up and running with db/application/.etc (production
ready)
3. Install/Configure/Execute RubyRep on old server to replicate
production data to the new server
4. Restart old server's apache with a transparent proxy configuration
to new server's IP
5. Update DNS to point to new server's IP address with restored 3600,
7200 sec TTL
6. Monitor old server's use over a few days unil comfortable with
shutting it down.

Possible Flaws:
1.  A user flip flops between servers and the replication to the new
server hasn't completed.  Assuming that a user hits the new server
with their DNS resolved to the new IP, I can't see that they again hit
the old server.
2. RubyRep having any trouble or big latency working with a slave
server outside it's local network.


Thanks again.
-Jim


On Oct 13, 1:43 pm, Hassan Schroeder <[email protected]>
wrote:
> On Tue, Oct 13, 2009 at 10:17 AM, Frederick Cheung
>
> <[email protected]> wrote:
> >> 1. I like the use of the "temporary" new.foo.com domain name and
> >> redirect.
> >> Do you know how well Ruby libraries like Net::HTTP, ActiveResource, or
> >> RestClient will handle 302 Redirects?
> >> I'm concerned that user's "posts" to the application will fail when
> >> confronted with a redirect.
>
> > I'm not sure. It's certainly possible that some of your api clients
> > wouldn't understand them
>
> Yeah, redirects work great with human-oriented browser clients, but
> I'd be extremely surprised to see them work with an API client even
> for a GET, and I'd bet not at all for POST data.
>
> Using a proxy is probably a better idea if you want to avoid the DB
> circular replication complexity.
>
> --
> Hassan Schroeder ------------------------ [email protected]
> twitter: @hassan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to