Monday, February 05, 2007

Moving To A New Server


I'm in the middle of planning my move to a new server for my biggest site. It is a bit nerve-racking. Over the years (8 years to be exact), my site has grown to a size I never thought possible. In the old days when I first went to a small dedicated server a few years back, the move went pretty smooth. There were some predictable down times I could take advantage of to get everything moved before the high traffic came back.

Well now things are different. The site is pretty much in a constant flux. New users registering, new blog posts, new comments, new everything every few minutes. So I've decided I'm going to have to post a "down time" message sometime soon... alerting folks the site will be off-line while we move to a new server.

My first big step will be moving the database. I'm planning on 30 minutes downtime to dump the MySQL database, move it over and reload it on the new server. Then I'll reconfig the old server to connect to the new server for all database activity.

Once I get this far, I'm almost out of the woods. I'll have my old and new server both talking to the same database. At this point, I can move the remaining pieces at my leisure... like scripts, cron jobs, etc... Then do the DNS cut-over whenever I like. Since both boxes will be using the same database, I won't need to worry about the 24 hour IP change propagation window...

Actually, for that 24 hours it will kind of be like I have a load balanced system sending requests to from around the country to both servers... =)

I'm pretty excited about the new box... Dual processor with 2 GB RAM... upgraded network port... should be a huge performance boost. In the past I had some big days where a large news site or big newsletter featured a link to the site... During those big days my site was a dog... The worst (or best) day was when I got a link in a hugely popular newsletter that had over 1 million subscribers... I got about 50,000 visitors in one day... brought my server to its knees... =)

Hopefully this new box will be better equipped to handle such spikes. Those traffic spikes are prime opportunities to capture a whole new set of return visitors... so you don't want them leaving upset or bored because your pages won't load.

Well wish me luck... I'm hoping to wrap-up the cut-over sometime this week.

No comments: