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

Architecture Of Large Scale Websites