50
Talking About Twitter's Architecture Grupo 9: 54807 João Reis 55455 Jaime Bernardo 57743 António Sousa

Talking About Twitter s Architecture

Embed Size (px)

Citation preview

Page 1: Talking About Twitter s Architecture

Talking About Twitter'sArchitecture

Grupo 9:54807 João Reis55455 Jaime Bernardo57743 António Sousa

Page 2: Talking About Twitter s Architecture

Talking About Twitter'sArchitecture

The importance of scalable architectures!

Page 3: Talking About Twitter s Architecture

What is twitter?

Page 4: Talking About Twitter s Architecture

The Need

Page 5: Talking About Twitter s Architecture

The Need

Page 6: Talking About Twitter s Architecture

The Need

Page 7: Talking About Twitter s Architecture

The Need

How do we keep everyone updated about our life?

How do we keep updated about everyone's life?

Page 8: Talking About Twitter s Architecture

The Solution

Page 9: Talking About Twitter s Architecture

Microblogging

Page 10: Talking About Twitter s Architecture
Page 11: Talking About Twitter s Architecture
Page 12: Talking About Twitter s Architecture

A Great Idea

Page 13: Talking About Twitter s Architecture
Page 14: Talking About Twitter s Architecture
Page 15: Talking About Twitter s Architecture
Page 16: Talking About Twitter s Architecture
Page 17: Talking About Twitter s Architecture

Hammer View

Page 18: Talking About Twitter s Architecture

What Happened?

Page 19: Talking About Twitter s Architecture

Twitter got popular

Page 20: Talking About Twitter s Architecture

As it often happens...

Page 21: Talking About Twitter s Architecture

twitter's Bottlenecks

Page 22: Talking About Twitter s Architecture

twitter's Bottlenecks• no monitoring, no graphs, no statistics

Page 23: Talking About Twitter s Architecture

twitter's Bottlenecks• no monitoring, no graphs, no statistics

• memcached

• single mySQL database

Page 24: Talking About Twitter s Architecture

twitter's Bottlenecks• no monitoring, no graphs, no statistics

• memcached

• single mySQL database

• Abuses

Page 25: Talking About Twitter s Architecture

twitter's Bottlenecks• no monitoring, no graphs, no statistics

• memcached

• single mySQL database

• Abuses

• Plan to partition in the future

Page 26: Talking About Twitter s Architecture

how can they solve this?

Page 27: Talking About Twitter s Architecture

Solution

completely re-write the application

Page 28: Talking About Twitter s Architecture
Page 29: Talking About Twitter s Architecture

how are they doing it?

Page 30: Talking About Twitter s Architecture

Databases

• more machines • index everything

• denormalize

Page 31: Talking About Twitter s Architecture
Page 32: Talking About Twitter s Architecture

Starling

• Distributed Queuing • Transactional Playback

• Fast

• Simple

• Speaks Memcache's Language

• 100% Pure Ruby

Page 33: Talking About Twitter s Architecture
Page 34: Talking About Twitter s Architecture
Page 35: Talking About Twitter s Architecture

API

• Representational State Tranfer (REST) • HTTP Requests

• XML

• RSS

• ATOM

Page 36: Talking About Twitter s Architecture

Use The Community

Open Source

StarlingAPI

Feedback

Page 37: Talking About Twitter s Architecture
Page 38: Talking About Twitter s Architecture

Abuses

• Build tools to detect

• Be ruthless. Delete them as users.

Page 39: Talking About Twitter s Architecture

Performance Monitoring

Page 40: Talking About Twitter s Architecture

Has it worked?

Page 41: Talking About Twitter s Architecture

New services

Hundreds of updates per minuteBesides normal usage

Page 42: Talking About Twitter s Architecture

Is it finished?

Page 43: Talking About Twitter s Architecture

It's a work in progress

Still has some downtime, from time to time.

Regular updates.

Page 44: Talking About Twitter s Architecture

Lessons to learn

Page 45: Talking About Twitter s Architecture

Lessons to learn• Scale early.

Page 46: Talking About Twitter s Architecture

Lessons to learn• Scale early.• Create performance monitors.

Page 47: Talking About Twitter s Architecture

Lessons to learn• Scale early.• Create performance monitors.• Involve the community.

Page 48: Talking About Twitter s Architecture

Lessons to learn• Scale early.• Create performance monitors.• Involve the community. • Foresee abusive uses.

Page 49: Talking About Twitter s Architecture

Lessons to learn• Scale early.• Create performance monitors.• Involve the community. • Foresee abusive uses.• Don't use inadequate

architectures.

Page 50: Talking About Twitter s Architecture

QUESTIONS?