+ All Categories
Home > Technology > Redis on AWS

Redis on AWS

Date post: 01-Jul-2015
Category:
Upload: robert-lehmann
View: 6,466 times
Download: 1 times
Share this document with a friend
Description:
Presentation held in the seminar on "NotOnlySQL databases." Builds upon slides in the former presentation "Redis — memcached on steroids." Features challenges when deploying Redis on Amazon Web Services within the context of the Yahoo! Cloud Serving Benchmark.
33
Redis is more than just a key-value store, it’s a lifestyle. –– Mathias Meyer
Transcript
Page 1: Redis on AWS

“Redis ismore than justa key-value store,it’s a lifestyle.

–– Mathias Meyer

Page 2: Redis on AWS

a data structure server

hash tables

sets

sorted sets

Fundamental data structuresfor a fundamental API

lists

Page 3: Redis on AWS

user1234567890field0: abc…field1: def…field2: ghi…field3: jkl…field4: mno…field5: pqr…field6: stu…field7: vwx…field8: yzä…field9: öüß…

Page 4: Redis on AWS

hash tables

user1234567890field0: abc…field1: def…field2: ghi…field3: jkl…field4: mno…field5: pqr…field6: stu…field7: vwx…field8: yzä…field9: öüß…

insertread

updatedelete

HMSETHMGETHMSET

DEL

CRUD

RedisClient.java

Page 5: Redis on AWS

a data structure server

hash tables

sets

sorted sets

Fundamental data structuresfor a fundamental API

lists

Page 6: Redis on AWS

factory settings hand-tuned

hash-max-zipmap-value 2048

2.54MB 1.62MB

0.5M initial size

Page 7: Redis on AWS
Page 8: Redis on AWS

The Harry Potter Approach

WWVDWhat Would Voldemort Do

101 @Override102 public int scan(…) {104 logger.warn(⁞ "Voldemort does not support Scan semantics");105 return OK;106 }

db/voldemort/src/com/yahoo/ycsb/db/VoldemortClient.java

Page 9: Redis on AWS

sorted sets

Page 10: Redis on AWS

user1 user2 user3 user5 user8

1 2 3 5 8…

Page 11: Redis on AWS

user1 user2 user3 user5 user8

not that easy

Page 12: Redis on AWS

user1 user2 user3 user5 user8

not that easy

record name can be anythingthus: position = hash(name)

Page 13: Redis on AWS

sorted sets

50% performance hit

Page 14: Redis on AWS
Page 15: Redis on AWS

workload A

thro

ugh

pu

t

target

Page 16: Redis on AWS

workload E

thro

ugh

pu

t

target

Page 17: Redis on AWS

workload F

thro

ugh

pu

t

target

Page 18: Redis on AWS

“I think the… problem is… believing thatthere can be“one true datastore”.Different technologies excel at different things.

–– Weixi Yen

Page 19: Redis on AWS

“I think the… problem is… believing thatthere can be“one true datastore”.Different technologies excel at different things.

–– Weixi Yen

Page 20: Redis on AWS

Memory storage is #1

Redis key space

http://spotfireblog.tibco.com/wp-content/uploads/in-memory-analytics.jpg

Page 21: Redis on AWS

bandwidth contentionnetworkmemory

Page 22: Redis on AWS

200 ops/secsingle-threaded

Page 23: Redis on AWS

user1234567890field0: abc…field1: def…field2: ghi…field3: jkl…field4: mno…field5: pqr…field6: stu…field7: vwx…field8: yzä…field9: öüß…

= 1 KB

Page 24: Redis on AWS

user1234567890field0: abc…field1: def…field2: ghi…field3: jkl…field4: mno…field5: pqr…field6: stu…field7: vwx…field8: yzä…field9: öüß…

= 1 KBfactory page size := 32 bytes

Page 25: Redis on AWS

user1234567890field0: abc…field1: def…field2: ghi…field3: jkl…field4: mno…field5: pqr…field6: stu…field7: vwx…field8: yzä…field9: öüß…

= 1 KBfactory page size := 32 bytes

values must be swapped in their entirety,even for complex types

Page 26: Redis on AWS

user1234567890field0: abc…field1: def…field2: ghi…field3: jkl…field4: mno…field5: pqr…field6: stu…field7: vwx…field8: yzä…field9: öüß…

= 1 KBfactory page size := 32 bytes

values must be swapped in their entirety,even for complex types

= 32 pages

Page 27: Redis on AWS

user1234567890field0: abc…field1: def…field2: ghi…field3: jkl…field4: mno…field5: pqr…field6: stu…field7: vwx…field8: yzä…field9: öüß…

= 1 KBfactory page size := 32 bytes

values must be swapped in their entirety,even for complex types

= 32 pages vm-page-size et al

Page 28: Redis on AWS

user1234567890field0: abc…field1: def…field2: ghi…field3: jkl…field4: mno…field5: pqr…field6: stu…field7: vwx…field8: yzä…field9: öüß…

= 1 KB

= 32 pages

50% performance hit

Page 29: Redis on AWS

32-bit 64-bit

4 GB 8 TB

large pointers

Page 30: Redis on AWS

redis-cli INFO

Page 31: Redis on AWS

Memory storage is #1

meh, persistence

http://www.flickr.com/photos/generationbass/4827013488/

memory overhead

Page 32: Redis on AWS

Memory storage is #1

meh, persistence

http://www.flickr.com/photos/generationbass/4827013488/

memory overhead

load phase fails randomly

Page 33: Redis on AWS

http://www.flickr.com/photos/31748439@N06/3026024436/

there are no silver bullets


Recommended