scaling datastax in docker

25
Joel Jacobson Scaling DataStax in Docker

Upload: datastax

Post on 06-Jan-2017

440 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Scaling DataStax in Docker

Joel JacobsonScaling DataStax in Docker

Page 2: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 2

How it started

Internal project at dotCloud

Pivoted to Docker Inc.

Execution using libcontainer

Huge adoption

Page 3: Scaling DataStax in Docker

What is Docker?and why is it important?

Page 4: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 4

3 key concepts

Images

Registries

Containers

Page 5: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 5

Example Dockerfile image

Page 6: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 6

Why are containers important?Speeding up application development

Better resource utilization

Mobility

Faster provisioning

Microservices

Page 7: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 7

Why are containers important?

WEB UI BILLINGCUSTOMER

MYSQL

EXT SERVICE

DB ADAPTER

PAYMENTS

SERVICE X

SERVICE YREST API

EXT SERVICE

Page 8: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 8

Why are containers important?WEB UI

BILLINGREST API

CUSTOMERREST API

CASSANDRA SPARKSOLR

PAYMENTSREST API

SERVICE XREST API

SERVICE YREST API

EXT SERVICEEXT SERVICE

Page 9: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 9

Why are containers important?

Page 10: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 10

Why are containers important?

Page 11: Scaling DataStax in Docker

DataStax Enterprise in Docker

Page 12: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 12

Why are containers important?

Build once, deploy anywhere

Flexibility for sharing binaries and libraries across applications

Process of managing, maintaing and deploying turn key

Officially supported since DSE 4.8

Page 13: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 13

DSE processesCore DSE JVM

One or more Spark executor processes

Single Spark worker process

Multiple processes for the Hadoop stack

Ad-hoc process (Spark job server, SparkSQL, CLI etc.)

OpsCenter agent

Page 14: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 14

DataStax Enterprise configuration

Cassandra configuration (seeds, cluster_name etc)

Where to manage Cassandra data

Optimal JVM heap size

Optimal garbage collector

Page 15: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 15

DataStax Enterprise configuration

Default capability limits of Docker break mlockall

Add –XX:+AlwaysPreTouch to the JVM arguments

ulimits inherited from Docker daemon

Disable swap on host OS

Page 16: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 16

Networking

Default networking (via Linux bridge) not recommended

Instead use docker run –net=host

Use pipework or weave for consistent IP addresses

Page 17: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 17

Storage

Everything in /var/lib/cassandra;

commitlog

saved_caches

data directories

Use supported filesystem

Page 18: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 18

Storage

Data volumes can be shared and reused amoung containers

Changes are made directly

Changes to a volume will not be included when you update an image

Data volumes persist if container is deleted

Page 19: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 19

Storage

docker run –v <some root dir>/<dse_image_name>-data:/data –v <some root dir>/<dse_image_name>-conf:/conf –v <some root dir>/<dse_image_name>-logs:/logs –d <dse_image_name>

Page 20: Scaling DataStax in Docker

DSE Docker Demo

Page 21: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 21

Futures

Splitting up DSE processes into separate containers

Integration with Kubernetes, Mesos

Deployment model on public/private clouds

Page 22: Scaling DataStax in Docker

© DataStax, All Rights Reserved. 22

SummaryConfigure OS and JVM

Map storage volumes

Avoid bridge/NAT networking

Test. Test. Test.

Page 23: Scaling DataStax in Docker

Useful Information

Page 25: Scaling DataStax in Docker

Thank you