co-found Netflix to offer online movie rentals. 1999 - Netflix launches the subscription service, offering unlimited rentals for one low monthly subscription. 2000 - Netflix launches the personalized movie recommendation system that uses Netflix members’ ratings to accurately predict choices for all Netflix members. 2002 - Netflix makes its initial public offering (IPO on Nasdaq under the ticker “NFLX” with 600,000 members in the US.) 2005 - The number of Netflix members rises to 4.2 million. 2007 - Netflix introduces streaming, which allows members to instantly watch television shows and movies on their personal computers. 2008 - Netflix partners with consumer electronics companies to stream on the Xbox 360, Blu-ray disc players and TV set-top boxes. 2009 - Netflix partners with consumer electronics companies to stream on the PS3, Internet connected TVs and other Internet connected devices. 2010 - Netflix is available on the Apple iPad, iPhone and iPod Touch, the Nintendo Wii, and other Internet connected devices. Netflix launches its service in Canada. 2011 - Netflix launches throughout Latin America and the Caribbean. 2012 - Netflix became available in Europe including the United Kingdom, Ireland and in the Nordic Countries. Netflix wins its first Primetime Emmy Engineering Award. 2013 - Netflix expanded to the Netherlands. Netflix garners 31 primetime Emmy nominations including outstanding drama series, comedy series and documentary or nonfiction special for “House of Cards”, “Orange is the new black”, and “The Square” respectively. House of Cards won three Primetime Emmy Awards. Netflix was the first internet TV network nominated for the primetime Emmy. 2014 - In 2014 Netflix launched in 6 new countries in Europe (Austria, Belgium, France, Germany, Luxembourg and Switzerland). Netflix wins 7 creative Emmy Awards for House of Cards and Orange is the New Black. Netflix now has over 50 million members globally https://pr.netflix.com/WebClient/loginPageSalesNetWorksAction.do?contentGroupId=10477
• Muito código, comunidade, livros, ferramentas,... • Padrões difundidos de escalabilidade Você provavelmente* não vai “quebrar o banco” nos primeiros 10M usuários.
(grafos, documentos,…) • Baixa* latência (<10ms) • Requer (!= deseja) banco de dados sem schema • Grande* (> 10s TBs) volume de dados • Ingestão de eventos complexos em tempo real
de dados com o Amazon Relational Database Service • MySQL • PostgresSQL • Oracle • MS SQL • Amazon Aurora Amazon Route 53 Usuário Web Elastic IP Amazon RDS
Balancer • Instância Web Redundante – Em outra Availability Zone • RDS Multi-AZ sa-east-1a sa-east-1b Elastic Load Balancing Usuário s Web Web RDS DB Mestre RDS DB Secundário
Usuários Web Web Web Web RDS DB Mestre RDS DB Secundário RDS DB Replica RDS DB Replica Web Web Web Web RDS DB Replica RDS DB Replica INSERT SELECT SYNC ASYNC
de dados: a. Armazenar o conteúdo estático no Amazon S3 b. Mover as sessões HTTP no Amazon ElastiCache ou Amazon DynamoDB c. Distribuir o conteúdo estático e dinâmico pelo Amazon CloudFront Sexta Arquitetura:
(Self-healing) • Baixíssima latência • Caches locais com Memcached • Caches replicados e persistentes com Redis • O AWS Auto Discovery client simplifica o redimensionamento do cluster sem impacto para a aplicação
• Auto Scaling com diversos grupos e alarmes • Service Oriented Architecture e Microservices • Distribuição eficiente de conteúdo • Cache de consultas frequentes
bancos de dados relacionais • Federation ~ separar os bancos por função • Sharding ~ separar os bancos por nós • Bancos de Dados Não Relacionais (Grafos, Documentos, Chave-Valor, …)
ORM pode ajudar • Sem limites para escalabilidade • Operação complexa • Separação por função ou chave • SGBDR ou NoSQL User ShardID 002345 A 002346 B 002347 C 002348 B 002349 A Shard C Shard B Shard A
Serviços Gerenciados (DynamoDB) • Casos de uso: – Rankings, Leaderboards e Dashboards – Ingestão de dados em tempo real – Dados temporários – Tabelas problemáticas – Tabelas de metadados
Gerenciados - ELB, Amazon S3, Amazon SNS, Amazon SQS, Amazon SWF, Amazon SES e outros. • Prefira começar com SQL • Otimize caches dentro e fora de sua infraestrutura • Automatize Tudo
Decomponha camadas em serviços menores • Use AutoScaling quando for adequado • Aproveite os serviços gerenciados • Adote NoSQL se e quando for necessário • Reinvente seu negócio, não a roda