Post on 08-Jul-2015
Bancos de Dados na AWS
José Papo
@josepapo
josepapo@amazon.com
Opções de Bancos de Dados
Relacional NoSQL
Bancos de Dados - Modelos
Banco de Dados no
Amazon EC2
Sua escolha de software
de banco de dados
Bring Your Own License
(BYOL)
Amazon Relational
Database Service (RDS)
SQL Server, MySQL ou
Oracle oferecidos como
serviço
Licenciamento Flexível:
BYOL ou Licença Incluída
Amazon DynamoDB
NoSQL
Modelo não relacional
Overhead zero de
administração
Auto-gestão Database as a Service
Bancos de Dados “As a Service”
Amazon RDS
+
ElastiCache MySQL, Oracle, SQL
Server
Memcached
DynamoDB
Apps que precisam de BDs relacionais escaláveis Apps que precisam de Escalabilidade Massiva
YesSQL NoSQL
Q1 Tempo
Demanda
Bancos de Dados – Modo Tradicional • Desperdício de
Capacidade
• Custo de
manutenção
• Consome mais
tempo
O que os Clientes Diziam
Upgrades de servidores
Upgrades de storage
Backup e recovery
Upgrades e patches
Falhas de Hardware
Fonte: http://www.forrester.com/Events/Content/0,5180,-1110,00.ppt
“Nos ajude a focar na aplicação – Diminua tempo gasto em manutenção para usarmos em mais tempo de desenvolvimento e tuning de banco”
Distribuição de Tempo
Performance and
tuning
Security planning
Backup rec
load/unload 5%
25%
5%
5%
20%
40%
License/doc training
Scripting coding
Install, upgrade, patch,
migration
Tempo
Demanda
Banco de Dados – A Nova Maneira
• Elasticidade
• Foco na App
• Imediato
Amazon Relational Database Service
RDS é um serviço escalável de bancos de dados relacionais que é
simples, fácil de escalar, confiável e efetivo em custo
Serviço Gerenciado
Escalabilidade Simples
Vários Engines de BDs
Funciona c/ EC2 & ElastiCache
Disponibilidade com Multi-AZ
Amazon Relational Database Service (RDS)
Bancos de Dados Relacionais
Amazon RDS Melhora
Disponibilidade Melhora
Throughput Reduz Latência
Escalabilidade Simples
Multi AZ
Read Replicas
ElastiCache
ElastiCache Read Replicas Escalabilidade Simples
Escale verticalmente sua
instancia e storage
Escale horizontalmente
via sharding
Backup automático
Restore simples
Escalabilidade Simples
Escalabilidade de Leituras com Amazon
ElastiCache e Read Replicas
Reduz Latência de
Leitura com ElastiCache
Read replica para
escalabilidade de leitura
Relatórios podem ser
executados nas réplicas
Alta Disponibilidade – Uso de Multi-AZ
Tolerância a Falhas
Replicação Síncrona
Failover Automático
Alguns Clientes do Amazon RDS
Jogos Web Mobile/Social Mídia
Flipboard Case Study
Introduction
Your Social Magazine for Apple Mobile Devices
Delivers relevant articles and photos based on usage and
interactions within your social networks
Launched 6 months after the initial team put together
Over 5 million users and 2 billion page “flips” per month
Operating in the Cloud : Managing Complex, Real Time Data
Challenge 6 months to deploy a real-time, socially relevant magazine
Constantly changing user interests
Architecture Ability to change all hardware and software elastically
Frequently changing system requirements
App needs Complex queries on user and relevancy data
Milliseconds count. So, does uptime
Solution Highly performant, reliable, proven database technology
Amazon RDS MySQL
The Data View of the World
SimpleDB RDS MySQL
ElastiCache
Flipboard Application
Reliable and
Complex data,
Queries
Operational
Configuration
and State Data
Memcache for
performance
A friend who recently shared a photo
Friends, Magazines …
anyone relevant to
me who published
something very
recently that I care
about seeing
Show Me More, Please!
Amazon RDS Tips For Success
1. Leverage the Cloud for what it does best. Don’t bring old DC habits.
2. Scale up for better performance.
3. Use RDS for complex, real-time data
4. Use Read Replicas for write and read heavy databases. They are awesome.
5. Leverage existing SQL knowledge and experience.
6. Use copies of your database for testing new code. It’s trivial and saves time.
7. Scale horizontally with sharding. Plan for it before you need it.
SQL ou NoSQL?
O Desafio da Escalabilidade
Aquisição de Hardware e Software
Sharding
Caching
Gestão deCluster
Gestão de Falhas
Requisito: performance
consistente e previsível
Realidade:
performance degrada
$!
Escalabilidade
Pe
rfo
rma
nce
Amazon DynamoDB
DynamoDB é um serviço NoSQL gerenciado que fornece performance
previsível e extremamente rápida com escalabilidade
Fácil Administração
SSD’s para Baixa Latência
Capacidade Reservada
Storage e Throughput potencialmente ilimitado
DynamoDB – Benefícios
Performance Rápida e Previsível
• Latência baixa
Fácil Administração
• Escalabilidade Simples
• Alocação automática de recursos e alta disponibilidade incluída
Sempre Durável
• Performance sem compromissos
• Sem redução em consistência ou durabilidade para conseguir throughput
ADMIN
Throughput Provisionado
Reserve os IOPS que deseja por tabela
Aumente ou diminua via API ou Console
Pague por throughput e storage (não instancias)
• $0.01 por hora a cada 10 unidades de Capacidade de
Write
• $0.01 por hora a cada 50 unidades de Capacidade de
Read
• $1.00 por GB-mês de Storage
Alguns Clientes do DynamoDB
Earth Networks Case Study
Introduction
Gathers and analyzes atmospheric observations from a
global sensor network to promote a better understanding
of the planet
Proprietary lightning network output used to pinpoint
lightning activity - best indicator of dangerous weather
Owner of the WeatherBug brand (mobile, desktop, Web)
Problem
Geospatial queries
Scalable • 6 million existing mobile users
• 100% YOY mobile growth
• Severe Weather Outbreaks
Fast • Speed + Accuracy = Safety
Reduce Time to Market
Cost of Ownership
Generate lightning alert notifications, in proximity to the user’s location, on a mobile device. Need
Constraints
Lightning Demo
Analysis
Provider Product Throughput
per Instance
Engineering
Cost
Cost of
Ownership
Microsoft SQL Server 2008 Medium Low High
MySQL MySQL Medium High* High*
Earth Networks In Memory Quadtree High High Medium
Amazon Mem-Cache High Medium Medium
Amazon DynamoDB High Low Low
* Not currently supported by Earth Networks
Reflection
DynamoDB Advantages • Easy to Provision
• Built-in Consistency
• Scalable
• High Availability
DynamoDB Wish List • Durability across regions in addition to inside a region
• Auto-scale down without a throttle on change
• Item size limit of 64k
Teste os serviços de Bancos de Dados da AWS!
Amazon RDS – Oferta Gratuita
• Visite - aws.amazon.com/rds
DynamoDB – Oferta Gratuita
• Visite - aws.amazon.com/dynamodb