51
MySQL on the cloud, from virtual machines to serverless options Renato Losio, Funambol

machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

Page 1: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

MySQL on the cloud, from virtual

machines to serverless options

Renato Losio, Funambol

Page 2: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Renato & Funambol

Page 3: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

DevOps

HA

serverlessK8s

autoscaling

Docker

S3

infrastructure as code

orchestration

Page 4: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 5: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Instance-based databases

Connection limits

Networking issues

Provisioning issues

Scaling issues

Infrastructure as code issues

Page 6: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

blue/green

Page 7: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 8: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

before or after?Decoupling schema changes from code changes

Page 9: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Public cloud providers

AWS

IBM Cloud

Google Cloud Platform

Azure

IBM

Google

Oracle Alibaba

VMware

Page 10: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

MySQL & AWS

Page 11: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

11

Page 12: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

3 options

Page 13: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

MySQL on EC2

Rely on EBS

Full control: root access

Flexibility

Easy vertical scaling

Set your own replication

Backup & failover

Very latest MySQL, Percona

Fully control the database

Page 14: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Virtual machine

AZ

Page 15: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

RDS MySQL

Managed service

(almost) 10 years old

Vertical scaling

Sync replication

Backup & point in time recovery

Other RDS engines available

Performance Insights

Managed and scalable MySQL

Page 16: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Managed service

AZ

RDS

Page 17: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Amazon Aurora

MySQL/PostgreSQL compatible

Vertical scaling

Proprietary technology

Automatically allocates storage

Automatic, six-way replication

Backtrack: turn back time

Multi-Master (preview)

built for the cloud, fully managed

Page 18: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

automation

Page 19: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

How you scale vertically an instance

size for the peak load?

Page 20: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 21: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 22: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 23: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

fake autoscalingSDK

bash (CLI)

minor version

IOPSCPU

Lambda

storage latency

Page 24: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Why are they not available out of the box?

Page 25: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

DBA

Page 26: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 27: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

outage

Page 28: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 29: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

29

Page 30: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

panic button?

too temptingcomplains

cto calling

db suffering

low costs

Page 31: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

31

Database frozen

Page 32: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Cannot change it back. You are paying for it.

Page 33: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Multiples changes

not simultaneously

order is hard to predict

multiple failovers

Page 34: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

db.m4.xlarge→ db.m4.2xlarge400 GB → 800 GB

- 12h (instance+storage)- 13m (instance)

- 11h 45m (storage)

Page 35: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

35Modifying...

Page 36: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

No risks? As good as before?

Really?

Page 37: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

RDS is running out of IOPS What can I do?

How do I know how long I can burst?

Page 38: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Running out of IOPS

lower IOPS after burstlatency spike

burst

Page 39: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 40: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 41: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Peak or sustained

traffic?

Page 42: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

42

Page 43: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

serverless

Page 44: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

RDSmemory

PIOPS

vCPU

memory

optimized

networking

35+ instance types

6 engines

burstable

standard

Page 45: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 46: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Aurora Serverless

Endpoint without instance size

Easy scaling

Pay-per-use

Auth IAM roles

MySQL 5.6 compatible (preview

Postgres)

GA since Aug 2018

JDBC / ODBC

auto-scaling configuration

Page 47: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Aurora Serverless might not be able to find a

scaling point if you have long-running queries or

transactions in progress, or temporary tables or

table locks in use.

Page 48: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

Serverless Aurora or Autoscaling Aurora?

Aurora Serverless Data API (beta)

Page 49: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

super exciting?development/test

weekly reporting

unpredictable load

intermittent

Page 50: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL
Page 51: machines to cloud, from virtual serverless options MySQL ...€¦ · RDS MySQL Managed service (almost) 10 years old Vertical ... Managed service AZ RDS. Amazon Aurora MySQL/PostgreSQL

thanks!join at Slido.com with #devops2019

all pictures from author or Unsplash