+ All Categories
Home > Documents > BespoKV: Application Tailored Scale-Out Key-Value...

BespoKV: Application Tailored Scale-Out Key-Value...

Date post: 10-Jul-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
25
BespoKV: Application Tailored Scale-Out Key-Value Stores Ali Anwar, Yue Cheng, Hai Huang, Jingoo Han, Hyogi Sim, Dongyoon Lee, Fred Douglis, and Ali R. Butt BespoKV
Transcript
Page 1: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

BespoKV: Application Tailored Scale-Out Key-Value Stores

Ali Anwar, Yue Cheng, Hai Huang, Jingoo Han, Hyogi Sim, Dongyoon Lee, Fred Douglis, and Ali R. Butt

BespoKV

Page 2: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Role of Distributed KV stores in HPC

• Use of emerging storage technologies has open up new opportunities for the use of KV stored in HPC• Examples of this use includes dynamic consistency control, coupling

applications, and storing intermediate results• Matching HPC application demands and needs require

customizations that existing KV stores do not provide• As a result, a variety of distributed KV stores have been developed

1

Page 3: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Fundamental challenges in developing KV stores 1. Developing a new distributed

KV store is never an easy task!2. Distributed systems are

notoriously bug-prone and incorrect implementation causes crash!

Cassandra-6023ZooKeeper-335

HBase-3380Redis-1381

3. User requirements are changing all the time!

2

Redis: 20K LoC – 9 yearsCassandra: 390k LoC – 10 yearsHyperDex: 52k LoC – 7 years

Page 4: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Fundamental challenges in developing KV stores 1. Developing a new distributed

KV store is never an easy task!2. Distributed systems are

notoriously bug-prone and incorrect implementation causes crash!

Cassandra-6023ZooKeeper-335

HBase-3380Redis-1381

3. User requirements are changing all the time!

3

Redis: 20K LoC – 9 yearsCassandra: 390k LoC – 10 yearsHyperDex: 52k LoC – 7 years

Page 5: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

BespoKV: A new paradigm for building distributed KV store services

4

1: A modular architecture that generalizes common features and can significantly reduce

engineering effort

2: A functional partitioning

abstraction that is resilient to buggy code with fault

isolation

3: A versatile platform that is easy to use, can support a flexible range of deployment options, and reasonably fast

BespoKV

Page 6: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Scale-out a non-distributed KV store

Datastore

clientclient client

Datastore

Proxy

clientclient client

Proxy

Datastore Datastore

1) Client-side partitioning 2) Proxy-assisted partitioning

Mcrouter Twemproxy

5

Page 7: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

6

Scale-out a non-distributed KV store

Proxy

clientclient client

Proxy

S1 S1

S1Shard 1

3) Proxy-assisted partitioning & replication

Proxy

clientclient client

BespoKV control plane

4) BespoKV-based flexible partitioning & replication

S2 S2

S2Shard 2S1 S1

S1Shard 1S2 S2

S2Shard 2

BespoKV

Page 8: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Comparison with state-of-the-art

7

System Replicate Multiple Backend

MultipleConsistency

MultipleTopologyShard Automatic

Recovery Programmable

BespoKV

Page 9: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

BespoKV architecture

BespoKVcontrol plane

BespoKVdata plane

Controlet Controlet Controlet

Datalet Datalet Datalet

StorageStorageStorage

Coordinator

Client lib Client libReplication Consistency

Topology Recovery

BespoKV controlet

Developer-defined BespoKV datalets ...

Get(k)Put(k, )

...

Shared Log

Distributed Lock Manger

. . .

8

Page 10: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Using BespoKV

9

Client lib Controlet Coordinator Control plane

Data plane

Replication Topology Consistency Fault tolerance

1 void Put(Str key, Obj val) {2 HashTbl.insert(key , val)3 }45 Obj Get(Str key) {6 return HashTbl(key)7 }

Datalet App. developer

{“Topology”: “Master-Slave”,“Consistency”: “Strong”,“Replication”: 3,...

}

Bootstrap config.

Datalet Datalet Datalet Datalet Datalet

Page 11: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

BespoKV flexibility & versatilityBespoKV supports wide range of distributed KV services

Topology + Consistency combinations: 1. Master-slave + Strong consistency2. Master-slave + Eventual consistency3. Active-active + Strong consistency4. Active-active + Eventual consistency5. …

• Range queries• Per-request consistency• Hybrid AA+MS topology• Heterogeneous configuration• Dynamic adaptation to consistency/topology changes• ...

10

Practical KV stores

New query types

Flexible configurations

Page 12: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

BespoKV use cases

• Hierarchical and heterogeneous storage of HPC

• Distributed cache for deep learning

• Building burst buffer file systems

• Accelerating the file system metadata performance

• Resource and process management

11

Page 13: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Controlet Datalet Controlet Datalet Controlet Datalet

Client lib

Coordinator

Head Mid Tail

1. Put(k,v) 6. Ack

2. putHead(k,v);3. putMid(k,v);4. putTail(k,v);5. Ack; Ack

Example 1 : Master-Slave Strong Consistency (MS+SC) Write path

12

Page 14: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Controlet Datalet Controlet Datalet Controlet Datalet

Client lib

Coordinator

Head Mid Tail

1. Get(k) 3. Ack(v)

Example 1: Master-Slave Strong Consistency (MS+SC) Read path

2. getD(key)

13

Page 15: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Controlet LSM Controlet B+ Controlet Log

Monitoring

Coordinator

Master Slave 1 Slave 2

1a. Put(k,v)3a. Ack

2a. putLSM(k,v)

Example 2 : HPC monitoring and AnalyticsMaster-Slave Eventual Consistency (MS+EC)

Client libAnalyticsClient lib

1b. Get(k)

2b. GetB+(k)

3b. Ack(v)4a. asyncPutB+/Log(k,v)

14

Page 16: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

BespoKV Implementation

• Prototype implementation using C/C++• Docker container based cross-platform compatibility • 5 datalet applications • Implemented from scratch (3)• Ported from existing standalone KV store applications (2)

• 4 readily available controlets• 2 custom parsers + Google protobuf support

15

Welcome to download & try at:https://github.com/tddg/BespoKV

BespoKV

Page 17: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

BespoKV Implementation

Core IO

Event handler

Messaging

Log handler

Coordinator

Lock Server

Client lib

Google protobuf

Redis + SSDB

HT

Log

MT

Type

Template code shared by datalet

applications

Components # LoC Sub Total

BespoKV

Parsers

Apps

5617

307

1,772

382

1,031

943

1,528

262

333

[966+] 107

[966+] 286

[966+] 98

11,580

595

1,457

Developer provided protocol

16

Page 18: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Develop time

2 days

KV store development made easy!

HT

107

966

Log

286

966

MT

98

966

Core IO

Template

Protocol

Redis

333

LevelDB

333

Datalet

#LoC

Developer-provided protoBespoKV proto

3 days

MS+SC MS+EC AA+SC AA+EC[150]+191 [150]+37 [150]+62 [150]+38

Controlet

#LoC

Develop time

6 days

17

Page 19: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Experimental Setup

• For scalability, we perform evaluation on Google Cloud Engine• 48 nodes• Each node has 4 cores and 15 GB memory• 1 Gbps connectivity

• For performance testing, we use local testbed• 12 nodes• Each node has 8 cores and 64 GB memory• 10 Gbps connectivity

• We use two workloads obtained from typical HPC services: job launch, and I/O forwarding and three workloads from the Yahoo! Cloud Serving Benchmark (YCSB)

18

Page 20: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Q1: Are BespoKV-enabled distributed KV stores scalable?

19Eventual consistency

Page 21: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Q1: Are BespoKV-enabled distributed KV stores scalable?

20Eventual consistency

Page 22: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Q2: How does BespoKV compare to existing proxy-based KV stores?

21

Unif 95% GETZipf 95% GET

Unif 50% GETZipf 50% GET

Thro

ughp

ut (1

03 QPS

)

0

500

1000

tRedisMS+SC MS+ECAA+EC

Dyno+RedisAA+EC

Twem+RedisMS+EC

BespoKV+Redis Dynomite+Redis Twemproxy+Redis

Page 23: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

22

0

0.4

0.8

1.2

1.6

2

0 50 100 150 200

Lat

ency

(m

s)

Throughput (103 QPS)

(b) 50% Get.

MS+SCMS+ECAA+SCAA+EC

CassandraVoldemort

0

0.2

0.4

0.6

0.8

1

1.2

1.4

0 50 100 150 200 250

Lat

ency

(m

s)

Throughput (103 QPS)

(a) 95% Get.

Q3: How does BespoKV compare to existing natively-distributed KV stores?

Page 24: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

Summary

23

• BespoKV can take a single-server data store and transparently enables a scalable, fault-tolerant distributed KV store service

• BespoKV can significantly reduce the engineering effort to develop interesting KV store services

• Evaluation shows that BespoKV is flexible, adaptive to new user requirements, achieves high performance, and scales horizontally

Page 25: BespoKV: Application Tailored Scale-Out Key-Value Storessc18.supercomputing.org/proceedings/tech_paper/tech_paper_files/pap585s5.pdfFundamental challenges in developing KV stores 1.Developing

24

Thank You!

Questions & contact: Ali Anwar, [email protected]://dssl.cs.vt.edu/


Recommended