NoSQL Introduction

2,411 views

Published on

The road to infinite scalability.

Published in: Technology

NoSQL Introduction

  1. 1. NoSQL introduction The road to infinite scalability Ahmed Soliman Head of Research and Development Cloud Niners Information Systems L.L.C
  2. 2. @AhmedSoliman
  3. 3. www.ahmedsoliman.com
  4. 4. SQL Databases == RDBMS* *yes, this a common convention
  5. 5. How do you scale a SQL database?
  6. 6. clustering partitioning sharding caching partitioning
  7. 7. What is a database true scalability?
  8. 8. Horizontal scale* *more servers creates more capacity
  9. 9. Transparency *business logic should be separated from concerns of scaling server resources
  10. 10. No Single Point Of Failure
  11. 11. Ok, let’s see how SQL do?
  12. 12. Vertical Scalability* * more capacity means bigger box
  13. 13. Horizontal Scalability* *aka, partitioning or sharding
  14. 14. Read-only slaves
  15. 15. So, how to solve this problem?
  16. 16. Simple! By redefining the question :)
  17. 17. Is relational databases always the right solution?
  18. 18. Relational properties* *do you mean ACID?
  19. 19. Atomicity Consistency Isolation Durability
  20. 20. Do you “really’ need that?
  21. 21. You might feel that you do
  22. 22. Trust me, you don’t
  23. 23. welcome to the web scale
  24. 24. More than 400 million active users
  25. 25. Over 160 million objects (pages, groups, etc.)
  26. 26. More than 25 billion pieces of contents* *links, videos, blog posts, notes, photos, etc.
  27. 27. SQL databases cannot handle the web scale
  28. 28. Why?
  29. 29. It costs 100,000$ to setup a SQL cluster* *think of the hardware requirements
  30. 30. Cost is not proportional to load
  31. 31. Cost is not proportional to load Although it should!
  32. 32. So, why is that?
  33. 33. This will be explained in the next presentation(s)
  34. 34. enter the world of NoSQL
  35. 35. Non Relational
  36. 36. Key-Value store
  37. 37. Key = “value”
  38. 38. Based on DHT* *distributed hash table
  39. 39. document store
  40. 40. Schema free database
  41. 41. {name: “mongo”, type:”db”}
  42. 42. PERFORMANCE
  43. 43. SQL Database It takes SQL Server 2008 160 seconds to insert 50,000 rows
  44. 44. NoSQL Database It takes MongoDB Server 5 seconds to insert the same number of records
  45. 45. Man! This is REALLY fast.
  46. 46. Built-in Map-Reduce
  47. 47. Geospatial Support
  48. 48. Conclusion
  49. 49. Google, Yahoo, Facebook, LinkedIn, Twitter, Digg, etc.
  50. 50. Horizontal scalability
  51. 51. Horizontal scalability Commodity hardware
  52. 52. Horizontal scalability Commodity hardware High performance
  53. 53. Horizontal scalability Commodity hardware High performance Fault tolerance
  54. 54. Horizontal scalability Commodity hardware High performance Fault tolerance Eventual consistency
  55. 55. Horizontal scalability Commodity hardware High performance Fault tolerance Eventual consistency *optional
  56. 56. Horizontal scalability Commodity hardware High performance Fault tolerance Eventual consistency *optional And lots more...
  57. 57. Q&A

×