Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Look Mom No Hands! Moving from a managed relati...

Codemotion
November 13, 2019

Look Mom No Hands! Moving from a managed relational database to a serverless one_Renato Losio _Codemotion Berlin 2019

A relational database is often a bottleneck, hard to scale, harder to manage: from AWS to Google Cloud, the major cloud providers offer different options to run a MySQL or a MySQL compatible database on the cloud. You can spin up virtual machines and configure your own cluster or rely on managed services, but the new trend is serverless databases that offer both traditional interfaces and HTTP API access. Can they be the future? Is Amazon Aurora Serverless really serverless?

About:
Renato Losio Principal Cloud Architect - Funambol

Renato Losio is a software and cloud architect, a digital nomad and a slow runner. He has many years of experience as a software engineer, tech lead and cloud services specialist in Italy, UK, Portugal and Germany. He currently lives in Berlin and works remotely as principal cloud architect for Funambol inc. Location-based services and relational databases are his main working interests. A certified AWS professional, he holds a MSc degree in Physics and a MSc in Computing Science.

Codemotion

November 13, 2019
Tweet

More Decks by Codemotion

Other Decks in Technology

Transcript

  1. Look Mom No Hands! Moving from a managed relational database

    to a serverless one Renato Losio, Funambol 12-13 November, 2019
  2. 10

  3. MySQL on VM Rely on EC2 + EBS Full control:

    root access Flexibility Easy vertical scaling Set your own replication Backup & failover Very latest MySQL, Percona server-full databases
  4. RDS MySQL Managed service 10 years old Vertical scaling Sync

    replication Backup & point in time recovery Other RDS engines available Performance Insights (new) Autoscaling storage Managed and scalable MySQL
  5. Amazon Aurora MySQL/PostgreSQL compatible Vertical scaling Proprietary technology 5 years

    old Automatic, six-way replication Backtrack: turn back time Multi-Master built for the cloud, fully managed
  6. Aurora Serverless Endpoint without instance size Easy scaling Pay-per-use Auth

    IAM roles MySQL 5.6 compatible (and Postgres) MySQL since 2018, Postgres 2019 MySQL TCP connection auto-scaling configuration
  7. A DB cluster that automatically starts up, shuts down, and

    scales up or down capacity based on your application's needs.
  8. 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.
  9. var params = { resourceArn: 'STRING_VALUE', /* required */ secretArn:

    'STRING_VALUE', /* required */ sql: 'STRING_VALUE', /* required */ (...) database: 'STRING_VALUE', parameters: [ { name: 'STRING_VALUE', value: { blobValue: new Buffer('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */, booleanValue: true || false, doubleValue: 'NUMBER_VALUE', isNull: true || false, longValue: 'NUMBER_VALUE', stringValue: 'STRING_VALUE' } }, /* more items */ ], }; rdsdataservice.executeStatement(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
  10. limitations? new & iterating No MySQL 5.7+ managing pools no

    auditing delay / sleep VPC only configuration