Moving your site without chaos Moving dynamic web applications Pubcon 2008 by Ralf Schwoebel, CEO Tradebit, Inc. [email_ad...
The reasons to move <ul><li>Bad experience with your host (Stability) </li></ul><ul><li>Scalability </li></ul><ul><li>Oper...
Requirements of the process <ul><li>No down-time </li></ul><ul><li>Database integrity (lost orders, etc.) </li></ul><ul><l...
Concepts of moving <ul><li>Sudden death </li></ul><ul><ul><li>„ This domain has moved and your nameserver does not know – ...
Prepare the new site – in peace Edit your hosts file to point to the new server and double-check your setup, restart your ...
The anatomy of a web application Webserver Installed mods (cache, auth, etc.) Language (PHP, Perl, Java) Version and modul...
The tough part – moving databases If you run a larger e-commerce site, you might have a large database with orders coming ...
The „no downtime, slow death“ combi <ul><li>After new server is prepared and up: </li></ul><ul><li>Move database like desc...
The time to live = TTL Lowering the TTL in your DNS entry helps
Tunnel view server move <ul><li>After new server is prepared and up: </li></ul><ul><li>Switch off webserver on old server ...
Example Squid config Open source package for Linux and Win [root@xy ~]# cat /etc/squid/squid.conf  [obfuscated] http_port ...
Thanks for watching,  contact me for questions Ralf Schwoebel, CEO Tradebit, Inc. [email_address] http://www.tradebit.com/...
Upcoming SlideShare
Loading in …5
×

how_to_move_your_website_without_chaos-ralf_schwoebel.ppt

315 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
315
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

how_to_move_your_website_without_chaos-ralf_schwoebel.ppt

  1. 1. Moving your site without chaos Moving dynamic web applications Pubcon 2008 by Ralf Schwoebel, CEO Tradebit, Inc. [email_address] http://www.tradebit.com/
  2. 2. The reasons to move <ul><li>Bad experience with your host (Stability) </li></ul><ul><li>Scalability </li></ul><ul><li>Operating System change </li></ul><ul><li>Space requirements </li></ul>
  3. 3. Requirements of the process <ul><li>No down-time </li></ul><ul><li>Database integrity (lost orders, etc.) </li></ul><ul><li>Within short time frame (costs) </li></ul><ul><li>SERPs preservation </li></ul>
  4. 4. Concepts of moving <ul><li>Sudden death </li></ul><ul><ul><li>„ This domain has moved and your nameserver does not know – come back later“ </li></ul></ul><ul><li>Slow death </li></ul><ul><ul><li>Nameserver switched – both servers deliver the same pages. Orders might be messed up. </li></ul></ul><ul><li>New domain </li></ul><ul><ul><li>„ This domain has moved here...“ – redirects, links... </li></ul></ul><ul><li>Tunnel view </li></ul><ul><ul><li>Reverse proxy setup on old IP to the new one or remote DB management </li></ul></ul>
  5. 5. Prepare the new site – in peace Edit your hosts file to point to the new server and double-check your setup, restart your browser (also edit on new server) Vista: C:WindowsSystem32driversetchosts XP: C:WindowsSystem32driversetchosts Mac / Linux: /private/etc/hosts or /etc/hosts
  6. 6. The anatomy of a web application Webserver Installed mods (cache, auth, etc.) Language (PHP, Perl, Java) Version and modules Dynamic pages (Application) Extension check, env security Database Engine compatibility, storage methods, space Tools (like ffmpeg, lame) Version and features (eg. encoding) File system / OS Path and config (eg amount of open files) Drives / Storage Speed and mount points
  7. 7. The tough part – moving databases If you run a larger e-commerce site, you might have a large database with orders coming in every minute – what now? <ul><li>Disable the order process „maintenance“ </li></ul><ul><li>Dump the DB (8 Gigabytes = 30 minutes) </li></ul><ul><li>Copy and load the dump (= 130 minutes) </li></ul><ul><li>Flip the switch </li></ul>
  8. 8. The „no downtime, slow death“ combi <ul><li>After new server is prepared and up: </li></ul><ul><li>Move database like described </li></ul><ul><li>Change database host in application </li></ul><ul><li>to remote </li></ul><ul><li>Change DNS entries </li></ul>
  9. 9. The time to live = TTL Lowering the TTL in your DNS entry helps
  10. 10. Tunnel view server move <ul><li>After new server is prepared and up: </li></ul><ul><li>Switch off webserver on old server </li></ul><ul><li>Fire up reverse proxy: </li></ul><ul><ul><li>Squid (caching proxy) </li></ul></ul><ul><ul><li>Nginx (tunnel proxy) </li></ul></ul><ul><ul><li>IP tables, Apache, others </li></ul></ul><ul><li>Change DNS entries </li></ul>
  11. 11. Example Squid config Open source package for Linux and Win [root@xy ~]# cat /etc/squid/squid.conf [obfuscated] http_port 80 vhost vport cache_peer 74.55.276.X parent 80 0 originserver sourcehash cache_peer 74.55.276.Y parent 80 0 originserver sourcehash collapsed_forwarding on refresh_stale_hit 600 seconds acl all src 0/0 http_access allow all cache_mem 32 MB cache_swap_low 90 cache_swap_high 95 cache_dir ufs /var/squid/cache 10000 16 256 maximum_object_size 4096 KB maximum_object_size_in_memory 1024 KB
  12. 12. Thanks for watching, contact me for questions Ralf Schwoebel, CEO Tradebit, Inc. [email_address] http://www.tradebit.com/ Contact the speaker

×