Sharding
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Sharding

on

  • 854 views

 

Statistics

Views

Total Views
854
Views on SlideShare
854
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 Presentation Transcript

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