Friendster Architecture

Todd Hoff's picture

Friendster is one of the largest social network sites on the web. it emphasizes genuine friendships and the discovery of new people through friends.

Site: http://www.friendster.com/

Information Sources

  • Friendster - Scaling for 1 Billion Queries per day

    Platform

  • MySQL
  • Perl
  • PHP
  • Linux
  • Apache

    What's Inside?

  • Dual x86-64 AMD Opterons with 8 GB of RAM
  • Faster disk (SAN)
  • Optimized indexes
  • Traditional 3-tier architecture with hardware load balancer in front of the databases
  • Clusters based on types: ad, app, photo, monitoring, DNS, gallery search DB, profile DB, user infor DB, IM status cache, message DB, testimonial DB, friend DB, graph servers, gallery search, object cache.

    Lessons Learned

  • No persistent database connections.
  • Removed all sorts.
  • Optimized indexes
  • Don’t go after the biggest problems first
  • Optimize without downtime
  • Split load
  • Moved sorting query types into the application and added LIMITS.
  • Reduced ranges
  • Range on primary key
  • Benchmark -> Make Change -> Benchmark -> Make Change (Cycle of Improvement)
  • Stabilize: always have a plan to rollback
  • Work with a team
  • Assess: Define the issues
  • A key design goal for the new system was to move away from maintaining session state toward a stateless architecture that would clean up after each request
  • Rather than buy big, centralized boxes, [our philosophy] was about buying a lot of thin, cheap boxes. If one fails, you roll over to another box.

  • Comments

    What are the sources of

    What are the sources of your information? A lot of this information could be easily speculated.

    Re: What are the sources of

    I think this is the source:
    http://conferences.oreillynet.com/presentations/mysql05/pattishall_datha...

    It's from 2005, otherwise good stuff.

    Re: Friendster Architecture

    I think friendster use squid as reverse proxy.

    here is the picture :
    http://wildavy.files.wordpress.com/2008/05/friendster_squid.png

    i've got that message before the maintenance pages shown.

    Re: Friendster Architecture

    Great article, keep up the good work.
    ----------------------------------------------------
    برامج نت|free software|افضل المواقع العربية|منتدى
    برامج نت
    |العاب فلاش - العاب بنات|برامج|دليل
    المواقع
    |عيادة طب |
    الأرشيف|برامج مشروحة|برامج ترجمة|برامج الفاكس|برامج طباعة|برامج تحرير|برامج التقاط الصور والشاشات|برامج سطح المكتب|برامج البريد الالكتروني|برامج خدمات البريد الاكتروني|برامج القوائم البريدية|برامج ادوات البريد الاكتروني|برامج مكافحة الرسائل المزعجة|برامج الإنترنت|برامج مشاهده القنوات الفضائيه|برامج تسربع الانترنت|برامج تحميل الملفات والصور|برامج المحادثة|برامج ماسنجر|اتصال دولي - الرسائل القصيره|إدوات خدمية وتعاريف قطع جهاز|برامج نسخ الأحتياطي|ادارة الملفات|تقارير الاداء|ضغط وفك ضغط الملفات|الصيانة والمعالجة|ادارة النظام|برامج تحرير الذاكره|الحفظ الاحتياطي|برامج الاداره والتحكم|برامج شبكات|برامج الحماية|برامج مكافحة الفايروسات|مكافحة ملفات التجسس|برامج صد الهاكرز والمخترقين|برامج تشفير ملفات|اخر تحديثات|برامج الرسوم والتصاميم|برامج الفلاش|برامج تحرير الصور|برامج استعراض الصور|برامج ادوات الصور الرقمية|برامج تحويل صور|برامج التقاط الصور|اضافات الصور|برامج جوالات سوني أريكسون

    Comment viewing options

    Select your preferred way to display the comments and click "Save settings" to activate your changes.

    Post new comment

    The content of this field is kept private and will not be shown publicly.
    • Web page addresses and e-mail addresses turn into links automatically.
    • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><div ?=?><p ?=?> <img ?=?><h1 ?=?><h2 ?=?><h3 ?=?>
    • Lines and paragraphs break automatically.
    • Glossary terms will be automatically marked with links to their descriptions
    • You may link to webpages through the weblinks registry

    More information about formatting options

    To combat spam, please enter the code in the image.