amazon s3 storage engine plugin for mysql

47
A Storage Engine for Amazon S3 How to store a hundred billion BLOBs without buying a single disk.

Upload: kapil-mohan

Post on 13-Jun-2015

5.340 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Amazon S3 storage engine plugin for MySQL

A Storage Engine for Amazon S3

How to store a hundred billion BLOBs without buying a single disk.

Page 2: Amazon S3 storage engine plugin for MySQL

Who is this guy?

Page 3: Amazon S3 storage engine plugin for MySQL

http://fallenpegasus.com/code

Page 4: Amazon S3 storage engine plugin for MySQL

Storage Engine

Page 5: Amazon S3 storage engine plugin for MySQL

Protocol Translator

Page 6: Amazon S3 storage engine plugin for MySQL

TraditionalStorage Engines

use the local disk

Page 7: Amazon S3 storage engine plugin for MySQL

Network Storage Engines

Page 8: Amazon S3 storage engine plugin for MySQL

Federated

ODBC

HTTP

MemCacheD

and...

Page 9: Amazon S3 storage engine plugin for MySQL

S3

Page 10: Amazon S3 storage engine plugin for MySQL

What is S3?

Page 11: Amazon S3 storage engine plugin for MySQL

Petabytes?!

Page 12: Amazon S3 storage engine plugin for MySQL

This can't be free

Page 13: Amazon S3 storage engine plugin for MySQL

Why do I want to use it?

Page 14: Amazon S3 storage engine plugin for MySQL

“An empty disk costs the same as a full one.”

Page 15: Amazon S3 storage engine plugin for MySQL

Can I move myexisting database over?

Page 16: Amazon S3 storage engine plugin for MySQL

Translating S3 to MySQL• AWS Account → CREATE SERVER

• S3 Bucket → Table

• S3 Item → Row

• S3 Item Key → VARCHAR PRIMARY KEY

• S3 Item Contents → BLOB or VARCHAR

Page 17: Amazon S3 storage engine plugin for MySQL

CREATE SERVER 'MyAWSAcct'

FOREIGN DATA WRAPPER 'AWS'

OPTIONS

(USER 'aws id string',

PASSWORD 'aws secret string');

Page 18: Amazon S3 storage engine plugin for MySQL

CREATE TABLE 'bierce' (

'word' VARCHAR(255) NOT NULL PRIMARY KEY,

'defn' BLOB)

CHARSET=utf-8

ENGINE=AWSS3

CONNECTION='awss3 DevilDictionary $server MyAWSAcct';

Page 19: Amazon S3 storage engine plugin for MySQL

SELECT defn FROM bierce WHERE word='WIT';

Page 20: Amazon S3 storage engine plugin for MySQL

SELECT defn FROM bierce WHERE word='WIT';

WIT, n. The salt with which the American humorist spoils his intellectual cookery by leaving it out.

Page 21: Amazon S3 storage engine plugin for MySQL

INSERT INTO bierce (word, defn) VALUES

('AUTHOR',

'One noted for confusing bitterness with humor.');

Page 22: Amazon S3 storage engine plugin for MySQL

DELETE FROM bierce WHERE word='AUTHOR';

Page 23: Amazon S3 storage engine plugin for MySQL

So, what's it good for?

Page 24: Amazon S3 storage engine plugin for MySQL

“If you build it,they will come.”

Page 25: Amazon S3 storage engine plugin for MySQL

• Saving EC2 work

• SQL CMS for S3 virtual hosting

• Huge list of persistent primary keys

• Big slow BLOBs, to join against fast local tables.

• “The Image Server Problem”

• ... and more

Page 26: Amazon S3 storage engine plugin for MySQL

Transactions?

Page 27: Amazon S3 storage engine plugin for MySQL

What do you mean,“No temporal guarantees”?!

Page 28: Amazon S3 storage engine plugin for MySQL

No WHERE clausemeans

“MAKE MONEY FAST”for Amazon

Page 29: Amazon S3 storage engine plugin for MySQL

The Future(watch me wave my hands)

Page 30: Amazon S3 storage engine plugin for MySQL

• Code Improvement

• S3 & HTTP Metadata

• Multiple Data Columns

• Information Schema

• Security & Authentication

• Transfer & Storage Compression

• Streaming BLOB

• More Storage Engines

Page 31: Amazon S3 storage engine plugin for MySQL

Code Improvement

Page 32: Amazon S3 storage engine plugin for MySQL

S3 & HTTPMetadata

Page 33: Amazon S3 storage engine plugin for MySQL

Multiple Data Columns

Page 34: Amazon S3 storage engine plugin for MySQL

Sharing a solution withHTTP and MemCacheD

Engines

Page 35: Amazon S3 storage engine plugin for MySQL

Information Schema

Page 36: Amazon S3 storage engine plugin for MySQL

Security &Authentication

Page 37: Amazon S3 storage engine plugin for MySQL

Transfer & StorageCompression

Page 38: Amazon S3 storage engine plugin for MySQL

(new slide)Streaming BLOBs

like PBXT

Page 39: Amazon S3 storage engine plugin for MySQL

More storage engines

Page 40: Amazon S3 storage engine plugin for MySQL

More storage engines• “A Storage Engine for AWS SQS”

• There are more AWS services rolling out

• Replication distribution via S3

• Cluster persistent storage via S3

• ... and the EC2 holy grail:

Page 41: Amazon S3 storage engine plugin for MySQL

“A Generic SchemaStorage Engine for S3”

Page 42: Amazon S3 storage engine plugin for MySQL

Back to the present...

Page 43: Amazon S3 storage engine plugin for MySQL

“Where do I get it?”

Page 44: Amazon S3 storage engine plugin for MySQL

“Where do I get it?”

• MySQL 5.1

• GPL

• http://fallenpegasus.com/code

Page 45: Amazon S3 storage engine plugin for MySQL

“You never write,you never call...”

Page 46: Amazon S3 storage engine plugin for MySQL

• Suggestions

• Use Cases

• Bug Reports

• Patches

• Feature Requests

• Support Requests

• Gigs & Proposals

[email protected]

Page 47: Amazon S3 storage engine plugin for MySQL

Questions?