Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tuenti: A Silicon Valley-like startup... in Spain :) [2011]

Javier Maestro
September 26, 2011

Tuenti: A Silicon Valley-like startup... in Spain :) [2011]

This talk is a brief presentation of what is Tuenti, from the company history and structure to some fun-facts about how big we are and how much Spanish youth is using us to live their online social experience. At the end, I focus on the Backend Engineering in Tuenti and explain some general scalability aspects about how to build and evolve a web-app to sustain rapid growth.

Tuenti is the leading spanish invitation-only private social networking website that has been referred to as the "Spanish Facebook". According to ComScore, it is the most trafficked website in the country, having more monthly page views in Spain than Facebook and Google combined.

The site has rapidly grown in four years with millions of active daily users and was one of the most searched terms in Google's 2008 and 2009 Zeitgeists. We currently have more than 25 billion monthly page views and we are processing, storing and serving more than 2.5 million new photos every day (with peaks up to 5 million), with over 6 Gbps of image traffic at peak.

Javier Maestro

September 26, 2011
Tweet

More Decks by Javier Maestro

Other Decks in Technology

Transcript

  1. A Silicon Valley-like startup... in Spain :)
    J. Javier Maestro – [email protected]
    Backend Engineer – Core & Scalability Team

    View Slide

  2. Tuenti is...

    View Slide

  3. View Slide

  4. View Slide

  5. View Slide

  6. View Slide

  7. View Slide

  8. View Slide

  9. Now, seriously...
    * the TV, Rockband and Paintball team building are real, though! :)

    View Slide

  10. 2006

    View Slide

  11. View Slide

  12. View Slide

  13. Today

    View Slide

  14. View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. +200 employees
    65% engineers
    18 nationalities

    View Slide

  19. Back to the
    Future?

    View Slide

  20. View Slide

  21. Tuenti Facts

    View Slide

  22. BIG Numbers
    +10 million users
    +150 million daily chat messages
    +4 million daily uploaded photos

    View Slide

  23. BIG Numbers
    +30 billion monthly page views
    +27k web requests/second
    +12Gbps peaks (including CDNs)
    +4Gbps just the datacenter
    +1000 servers

    View Slide

  24. BIG Numbers
    50% of users on site daily, averaging
    3 sessions per day
    82 minutes per day
    20% of users use mobile features
    daily

    View Slide

  25. La palabra más buscada en Google España
    (Google Zeitgeist 2009 y 2010 YTD)

    View Slide

  26. View Slide

  27. View Slide

  28. View Slide

  29. “The Spanish friendship map” by Barcelona Media

    View Slide

  30. View Slide

  31. Viral

    View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. View Slide

  36. View Slide

  37. Tech Teams

    View Slide

  38. Frontend

    View Slide

  39. View Slide

  40. Mobile

    View Slide

  41. View Slide

  42. Architecture

    View Slide

  43. View Slide

  44. Dev Tools

    View Slide

  45. View Slide

  46. Testing
    Framework

    View Slide

  47. View Slide

  48. QA
    Quality Assurance

    View Slide

  49. View Slide

  50. Systems

    View Slide

  51. View Slide

  52. IT (crowd :)

    View Slide

  53. View Slide

  54. Design & UX

    View Slide

  55. View Slide

  56. Backend

    View Slide

  57. View Slide

  58. +much more!
    User Support
    Sales, Marketing
    Law, Finance
    Office Staff
    Cleaning Staff

    View Slide

  59. Magic stuff...

    View Slide

  60. In the beginning…
    One or few servers for the
    entire application
    Monolithic structure
    Bottleneck: Database reads

    View Slide

  61. Cache
    Switch out heavy DB reads
    for light cache reads
    Significant reduction in DB
    load
    Typical page load has
    under 2 or 3 queries, and
    up to hundreds of cache
    reads
    Bottleneck remains the
    same as before

    View Slide

  62. Replication
    Master / Slave
    architecture
    Split up reads and
    writes
    Optimized
    configurations
    Bottleneck: dataset
    size

    View Slide

  63. Data Separation
    Divide your schema into
    logical blocks
    One cluster per data type
    More complicated to
    manage in code.
    Bottleneck: Overload on a
    given data type

    View Slide

  64. Data Partitioning
    Divide a single table into
    parts and spread them
    over several clusters
    Almost limitless
    scalability
    Not free – Code
    complexity increases
    significantly
    Bottleneck: dataset size
    (again)

    View Slide

  65. Cache Partitioning
    Partitioning does not
    need to be limited to
    databases
    Partitioned
    Memcached and
    frontend farms
    Improves internal
    network usage
    Cross partitioning
    scheme between
    cache and database

    View Slide

  66. Archiving
    Storing less-frequently-
    used data in alternative
    storage
    Keeps main table size
    within known limits
    Flexibility when
    choosing alternative
    storage

    View Slide

  67. Client-side routing
    Use browser logic to load balance over
    frontend farms
    Reduce server load
    Remove a potential SPOF

    View Slide

  68. Content Delivery Networks
    Static content
    Optimized for massive scaling
    Everything has a price – choose your
    optimizations wisely

    View Slide

  69. Join us!
    http://jobs.tuenti.com

    View Slide

  70. Internships
    Thesis
    Associate Engineer
    Engineer
    Senior Engineer

    View Slide

  71. View Slide