• Like
  • Save
Sharding
Upcoming SlideShare
Loading in...5
×
 

Sharding

on

  • 798 views

 

Statistics

Views

Total Views
798
Views on SlideShare
798
Embed Views
0

Actions

Likes
0
Downloads
6
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Sharding Sharding Presentation Transcript

  • Sharding and More weng.wei@zalora.sg
  • • Sharding is about scaling• scaling up VS scaling out
  • Scaling Out• Add more nodes• Each node shared nothing
  • Key / Value• server = serverlist[ hash(key) % len(serverlist) ]
  • Relational DB• On Primary Key• On Index
  • Middle layer• MySQL Proxy
  • Client Side• Memcached client• ORM
  • Limitation• No joining • Join on the same shard is OK• Data maintenance
  • Pre-Sharding• Move database is easier than move data
  • Problem of sharding• serverlist[ hash(key) % len(serverlist)
  • Consistent Hash• ketama from last.fm • De facto Standard for memcached
  • Do we use sharding?• Memcached Client• MySQL for different ventures
  • SQL vs NoSQL• NoSQL is “Not Only SQL”• NoSQL completes SQL, but not replaces it
  • NoSQL is about• Performance?• Scaling (easier to shard)?• Flexibility (schema-less)?
  • Performance• Memcacahed is faster than MySQL?• SQL faster than K/V?• Memory faster than disk?
  • MySQL for K/V• handler socket
  • Schema - less• Friendfeed’s solution • Table as secondary index, then shard
  • • No silver bullet• Trade off