NoSQL Databases and Monitoring - Database Futures...

35
PES CERN IT Department CH-1211 Gen` eve 23 Switzerland www.cern.ch/it CERN IT Department NoSQL Databases and Monitoring Database Futures Workshop erˆ ome Belleman Christos Margiolas CERN – IT-PES June 2011

Transcript of NoSQL Databases and Monitoring - Database Futures...

Page 1: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

NoSQL Databases and MonitoringDatabase Futures Workshop

Jerome Belleman Christos MargiolasCERN – IT-PES

June 2011

Page 2: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

2 – NoSQL Databasesand Monitoring

Outline

1 Monitoring Context

2 NoSQL Databases for Monitoring Purposes

3 Examples

4 Outlook

Page 3: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

3 – MonitoringContext

Section 1

Monitoring Context

Page 4: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

4 – MonitoringContext

CERN Batch System Monitoring

Investigate more advanced features of the batch system

Reduce problem identification time

Lego-like, interchangeable set of building blocks

Batch System

Collection

Transport

Processing StorageAnalysis

Live Historical

Page 5: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

5 – MonitoringContext

What to Monitor?

Number of jobs

Users

Hosts

Slots

Queues

. . .

Ñ Correlations & heavy analytics

Live representations

Historical representations

Ñ Browse metrics over time

Page 6: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

6 – MonitoringContext

How Much to Monitor?

¡ 200 000 jobs/day

¡ 3 700 nodes

¡ 30 000 cores

Page 7: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

7 – MonitoringContext

What Do We Need?

2 Flexible schemas

2 Scalability

2 Data collection Ñ Many small writes, very often

2 Heavy analytics Ñ Massive reads, quite often

2 Horizontal & vertical aggregations

2 Time views

Ñ Let’s investigate the use of a NoSQL database

Page 8: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

8 – NoSQL Databasesfor Monitoring

Purposes

Section 2

NoSQL Databases for Monitoring Purposes

Page 9: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

9 – NoSQL Databasesfor Monitoring

Purposes

General Concepts

NoSQLù Non Relational

A broader set of structured storage

Different consistency models

Different classes of NoSQL databases

Page 10: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

10 – NoSQLDatabases for

Monitoring Purposes

Different Classes of NoSQL Databases

Column-oriented databases (e.g. Google BigTable,Apache HBase, Apache Cassandra)

Key-value stores (e.g. Amazon Dynamo, ProjectVoldemort, MongoDB, Riak, Google BigTable,Apache Cassandra)

Document stores (e.g. Apache CouchDB, MongoDB)

We’ve been looking at Cassandra.

Page 11: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

11 – NoSQLDatabases for

Monitoring Purposes

Key-Value Stores such as Cassandra

k0 c0,0 c0,1 c0,2 c0,3 c0,4

k1 c1,0 c1,1 c1,2

k2 c2,0 c2,1 c2,2 c2,3 c2,4 c2,5

k3 c3,0 c3,1

k4 c4,0 c4,1 c4,2 c4,3

k5 c5,0 c5,1 c5,2

Page 12: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

12 – NoSQLDatabases for

Monitoring Purposes

Key-Value Store Schema Design

No relationships between multiple tables

Multiple tables with different keys

Ó

New query Ñ New table

Ó

Redundancy

Constraints on the application level

Page 13: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

13 – NoSQLDatabases for

Monitoring Purposes

How Fast?

(Quite) Simple-minded; e.g. relaxed about consistency

High throughput

Horizontal scalability

No need for object-relational mapping

Page 14: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

14 – NoSQLDatabases for

Monitoring Purposes

Suitable for Monitoring?

SQL NoSQL For Monitoring?

Immediateconsistency

Eventualconsistency

High throughputHigherthroughput

Rigid schemas Flexible schemas

H. Scalability H. Scalability

Indexes Another table

DB-Levelconstraints

Applicationconstraints

Page 15: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

14 – NoSQLDatabases for

Monitoring Purposes

Suitable for Monitoring?

SQL NoSQL For Monitoring?

Immediateconsistency

Eventualconsistency

X

High throughputHigherthroughput

Rigid schemas Flexible schemas

H. Scalability H. Scalability

Indexes Another table

DB-Levelconstraints

Applicationconstraints

Page 16: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

14 – NoSQLDatabases for

Monitoring Purposes

Suitable for Monitoring?

SQL NoSQL For Monitoring?

Immediateconsistency

Eventualconsistency

X

High throughputHigherthroughput

X

Rigid schemas Flexible schemas

H. Scalability H. Scalability

Indexes Another table

DB-Levelconstraints

Applicationconstraints

Page 17: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

14 – NoSQLDatabases for

Monitoring Purposes

Suitable for Monitoring?

SQL NoSQL For Monitoring?

Immediateconsistency

Eventualconsistency

X

High throughputHigherthroughput

X

Rigid schemas Flexible schemas XH. Scalability H. Scalability

Indexes Another table

DB-Levelconstraints

Applicationconstraints

Page 18: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

14 – NoSQLDatabases for

Monitoring Purposes

Suitable for Monitoring?

SQL NoSQL For Monitoring?

Immediateconsistency

Eventualconsistency

X

High throughputHigherthroughput

X

Rigid schemas Flexible schemas XH. Scalability H. Scalability XIndexes Another table

DB-Levelconstraints

Applicationconstraints

Page 19: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

14 – NoSQLDatabases for

Monitoring Purposes

Suitable for Monitoring?

SQL NoSQL For Monitoring?

Immediateconsistency

Eventualconsistency

X

High throughputHigherthroughput

X

Rigid schemas Flexible schemas XH. Scalability H. Scalability XIndexes Another table XDB-Levelconstraints

Applicationconstraints

Page 20: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

14 – NoSQLDatabases for

Monitoring Purposes

Suitable for Monitoring?

SQL NoSQL For Monitoring?

Immediateconsistency

Eventualconsistency

X

High throughputHigherthroughput

X

Rigid schemas Flexible schemas XH. Scalability H. Scalability XIndexes Another table XDB-Levelconstraints

Applicationconstraints

Page 21: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

14 – NoSQLDatabases for

Monitoring Purposes

Suitable for Monitoring?

SQL NoSQL For Monitoring?

Immediateconsistency

Eventualconsistency

X

High throughputHigherthroughput

X

Rigid schemas Flexible schemas XH. Scalability H. Scalability XIndexes Another table XDB-Levelconstraints

Applicationconstraints

Page 22: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

15 – NoSQLDatabases for

Monitoring Purposes

What Do We Need?

2 Flexible schemas

2 Scalability

2 Data collection Ñ Many small writes, very often

2 Heavy analytics Ñ Massive reads, quite often

2 Horizontal & vertical aggregations

2 Time views

Ñ Let’s investigate the use of a NoSQL database

Page 23: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

15 – NoSQLDatabases for

Monitoring Purposes

What Do We Need?

2� Flexible schemas

2 Scalability

2 Data collection Ñ Many small writes, very often

2 Heavy analytics Ñ Massive reads, quite often

2 Horizontal & vertical aggregations

2 Time views

Ñ Let’s investigate the use of a NoSQL database

Page 24: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

15 – NoSQLDatabases for

Monitoring Purposes

What Do We Need?

2� Flexible schemas

2� Scalability

2 Data collection Ñ Many small writes, very often

2 Heavy analytics Ñ Massive reads, quite often

2 Horizontal & vertical aggregations

2 Time views

Ñ Let’s investigate the use of a NoSQL database

Page 25: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

15 – NoSQLDatabases for

Monitoring Purposes

What Do We Need?

2� Flexible schemas

2� Scalability

2� Data collection Ñ Many small writes, very often

2 Heavy analytics Ñ Massive reads, quite often

2 Horizontal & vertical aggregations

2 Time views

Ñ Let’s investigate the use of a NoSQL database

Page 26: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

15 – NoSQLDatabases for

Monitoring Purposes

What Do We Need?

2� Flexible schemas

2� Scalability

2� Data collection Ñ Many small writes, very often

2� Heavy analytics Ñ Massive reads, quite often

2 Horizontal & vertical aggregations

2 Time views

Ñ Let’s investigate the use of a NoSQL database

Page 27: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

15 – NoSQLDatabases for

Monitoring Purposes

What Do We Need?

2� Flexible schemas

2� Scalability

2� Data collection Ñ Many small writes, very often

2� Heavy analytics Ñ Massive reads, quite often

2� Horizontal & vertical aggregations

2 Time views

Ñ Let’s investigate the use of a NoSQL database

Page 28: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

15 – NoSQLDatabases for

Monitoring Purposes

What Do We Need?

2� Flexible schemas

2� Scalability

2� Data collection Ñ Many small writes, very often

2� Heavy analytics Ñ Massive reads, quite often

2� Horizontal & vertical aggregations

2� Time views

Ñ Let’s investigate the use of a NoSQL database

Page 29: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

16 – Examples

Section 3

Examples

Page 30: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

17 – Examples

A Time Series Database: OpenTSDB

On top of Apache HBase

Horizontal aggregation Ñ Free time browsing

Vertical aggregation Ñ Drill down details

Page 31: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

18 – Examples

Batch Accounting with Cassandra

Local Jobs

jobIduserNamesubmitTimequeue

Grid Jobs

gridJobIdsitejobId

fred 3:04 1nh 42 cern16

bob 6:10 8nh 70 ral21

alice 9:49 1nh28

bob 12:08 1nh 83 ral37

21 37bob

6:10

8nh

70

ral

12:08

1nh

83

ral

Page 32: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

18 – Examples

Batch Accounting with Cassandra

Local Jobs

jobIduserNamesubmitTimequeue

Grid Jobs

gridJobIdsitejobId

fred 3:04 1nh 42 cern16

bob 6:10 8nh 70 ral21

alice 9:49 1nh28

bob 12:08 1nh 83 ral37

21 37bob

6:10

8nh

70

ral

12:08

1nh

83

ral

Page 33: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

19 – Outlook

Section 4

Outlook

Page 34: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

20 – Outlook

Outlook

Scalability and throughput through simplicity

Complacency regarding consistency acceptable formonitoring

Flexibility

Many available open-source implementations

New schema design approach

Ñ We’re investigating the use of a NoSQL database

Page 35: NoSQL Databases and Monitoring - Database Futures Workshopjeromebelleman.gitlab.io/talks/belleman-nosql.pdf · Monitoring Purposes Di erent Classes of NoSQL Databases Column-oriented

PES

CERN IT DepartmentCH-1211 Geneve 23

Switzerlandwww.cern.ch/it

CERNITDepartment

21 – Outlook

Thanks!

Questions?