Save 37% off PRO during our Black Friday Sale! »

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

312bbf425110c1e63fb48e52d5b61a1b?s=47 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.

312bbf425110c1e63fb48e52d5b61a1b?s=128

Javier Maestro

September 26, 2011
Tweet

Transcript

  1. A Silicon Valley-like startup... in Spain :) J. Javier Maestro

    – jjmaestro@tuenti.com Backend Engineer – Core & Scalability Team
  2. Tuenti is...

  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. Now, seriously... * the TV, Rockband and Paintball team building

    are real, though! :)
  10. 2006

  11. None
  12. None
  13. Today

  14. None
  15. None
  16. None
  17. None
  18. +200 employees 65% engineers 18 nationalities

  19. Back to the Future?

  20. None
  21. Tuenti Facts

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

    +4 million daily uploaded photos
  23. BIG Numbers +30 billion monthly page views +27k web requests/second

    +12Gbps peaks (including CDNs) +4Gbps just the datacenter +1000 servers
  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
  25. La palabra más buscada en Google España (Google Zeitgeist 2009

    y 2010 YTD)
  26. None
  27. None
  28. None
  29. “The Spanish friendship map” by Barcelona Media

  30. None
  31. Viral

  32. None
  33. None
  34. None
  35. None
  36. None
  37. Tech Teams

  38. Frontend

  39. None
  40. Mobile

  41. None
  42. Architecture

  43. None
  44. Dev Tools

  45. None
  46. Testing Framework

  47. None
  48. QA Quality Assurance

  49. None
  50. Systems

  51. None
  52. IT (crowd :)

  53. None
  54. Design & UX

  55. None
  56. Backend

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

    Cleaning Staff
  59. Magic stuff...

  60. In the beginning… One or few servers for the entire

    application Monolithic structure Bottleneck: Database reads
  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
  62. Replication Master / Slave architecture Split up reads and writes

    Optimized configurations Bottleneck: dataset size
  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
  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)
  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
  66. Archiving Storing less-frequently- used data in alternative storage Keeps main

    table size within known limits Flexibility when choosing alternative storage
  67. Client-side routing Use browser logic to load balance over frontend

    farms Reduce server load Remove a potential SPOF
  68. Content Delivery Networks Static content Optimized for massive scaling Everything

    has a price – choose your optimizations wisely
  69. Join us! http://jobs.tuenti.com

  70. Internships Thesis Associate Engineer Engineer Senior Engineer

  71. Thank you! jjmaestro@tuenti.com talent@tuenti.com