Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Architecture Of Large Scale Websites

5,518 views

Published on

Architecture Of Large Scale Websites

Published in: Technology

Architecture Of Large Scale Websites

  1. 1. Architecture of Large-Scale Websites Yu Feng 06/08/2008
  2. 2. Agenda <ul><ul><li>Static Content </li></ul></ul><ul><ul><li>Image Servers </li></ul></ul><ul><ul><li>Database </li></ul></ul><ul><ul><li>Cache </li></ul></ul><ul><ul><li>Mirror </li></ul></ul><ul><ul><li>Load Balance </li></ul></ul>
  3. 3. Static Content <ul><ul><li>Use CMS (Content Management System) </li></ul></ul><ul><ul><ul><li>Can be managed easily (add/remove/modify) </li></ul></ul></ul><ul><ul><ul><li>Channels </li></ul></ul></ul>
  4. 4. Static Content (cont’d) <ul><ul><li>Make it static as much as possible </li></ul></ul><ul><ul><ul><li>Dynamic pages are always much slower </li></ul></ul></ul><ul><ul><ul><li>Static pages are more cache-friendly </li></ul></ul></ul><ul><ul><ul><li>The ways that high traffic sites do </li></ul></ul></ul><ul><ul><ul><ul><li>Netease, Sina, Mop </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Convert dynamic pages to static ones (BBS) </li></ul></ul></ul></ul></ul>
  5. 5. Image Servers <ul><ul><li>Use separate image servers </li></ul></ul><ul><ul><ul><li>Images </li></ul></ul></ul><ul><ul><ul><ul><li>Small size </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Large amount </li></ul></ul></ul></ul><ul><ul><ul><li>Reduce the stress of the main server </li></ul></ul></ul><ul><ul><ul><li>Can be optimized </li></ul></ul></ul><ul><ul><ul><ul><li>nginx </li></ul></ul></ul></ul><ul><ul><ul><ul><li>lighttpd </li></ul></ul></ul></ul>
  6. 6. Database <ul><ul><li>Improve the design of your database </li></ul></ul><ul><ul><ul><li>Tables </li></ul></ul></ul><ul><ul><li>Tuning </li></ul></ul><ul><ul><ul><li>Your application </li></ul></ul></ul>
  7. 7. Database (cont’d) <ul><ul><li>Use database clusters </li></ul></ul><ul><ul><ul><li>Oracle </li></ul></ul></ul><ul><ul><ul><li>MySQL </li></ul></ul></ul><ul><ul><ul><ul><li>MySQL Replication Master/Slave) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>MySQL-Proxy </li></ul></ul></ul></ul>
  8. 8. Cache <ul><ul><li>Why caching is important? </li></ul></ul>
  9. 9. Cache (cont’d) <ul><ul><li>Apache </li></ul></ul><ul><ul><li>Squid </li></ul></ul><ul><ul><li>Ncache </li></ul></ul><ul><ul><li>Memcached </li></ul></ul><ul><ul><li>… </li></ul></ul>
  10. 10. Mirror <ul><ul><li>Different entrance </li></ul></ul>
  11. 11. Load Balance <ul><ul><li>DNS </li></ul></ul><ul><ul><li>What is a L4/L7 switch? </li></ul></ul>
  12. 12. Load Balance (cont’d) <ul><ul><li>Hardware </li></ul></ul><ul><ul><ul><li>F5, Aleton </li></ul></ul></ul>
  13. 13. Load Balance (cont’d) <ul><ul><li>LVS </li></ul></ul><ul><ul><li>HAProxy </li></ul></ul>
  14. 14. The End Thanks

×