Cassandra Day - Core Cassandra

来源于:https://github.com/DataStax-Academy/cassandra-day-2019
详细介绍了Cassandra的架构、一致性、写操作等。

展开查看详情

1. DataStax Cassandra Day DataStax Solution Days Cassandra Introduction Introduction to Cassandra © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

2. You’ve Worked Hard © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

3. Finally, it’s Taking off! © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

4. Are You Ready? © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

5. Well, You May be But, Ready… What about Your Data? © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

6.© 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

7. Start with “Why?” Why do I need DSE & Apache Cassandra™? • Only DataStax Enterprise offers CARDS – and you need it all: • Contextual – relevant data in context • Available – always on, no downtime • Realtime – response time in MS • Distributed – many servers in datacenters around the world • Scalable – near linear increase for each additional server © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

8. How does Cassandra do it? Here’s our agenda: • We’ll take a quick look at a Cassandra cluster • Then, we’ll discuss Cassandra’s architectural • Finally, we’ll do some more hands-on • Load some data • Write CQL queries against the data • Demonstrate the power of replication © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

9. Apache Cassandra™ First Touch © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

10. What Does Cassandra Look Like? The basic structure of data Cartoon Keyspace a ces eysp tain K on C b l es Ta © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

11. What Does Cassandra Look Like? The basic structure of data ables T tain n Co itions rt Pa © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

12. What Does Cassandra Look Like? The basic structure of data ti ons rti Pa ntain umns Co Col s and w Ro h ave and eys o K sh t a t ha s th oken T © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

13. Want to try it? Let’s look at a cluster • Open a browser • Go to http://<your IP address>:9091 • Open notebook • ”Core Cassandra: First Touch” © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

14. Apache Cassandra™ First Touch Quick review • Key Take-aways: • Clusters contain keyspaces • Keyspaces contain tables • Tables contain partitions • Partitions contain rows and columns • CQL has syntax similar to SQL © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

15. Cassandra Architecture © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

16. Problems with Traditional RDBM Each record is in one location • Update in place – causes bottlenecks • Reduced throughput and latency • Single point of failure • Availability risk • Dogmatic consistency Your Record is here and only here © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

17. Cassandra And there Features Your Record is here And here • Distributed And here • Available • Responsive • Scalable And there • Log-structured • No bottlenecks • Tunable consistency © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

18. Cassandra is Distributed • Cassandra clusters have many nodes © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

19. Cassandra is Distributed • Cassandra clusters have many nodes • How does Cassandra manage all the nodes? © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

20. Cassandra is Distributed • Each cluster has many nodes • How does Cassandra manage all the nodes? • There is no boss-node © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

21. Cassandra is Distributed • Cassandra clusters have many nodes • How does Cassandra manage all the nodes? • There is no boss-node • The nodes collaborate © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

22. Horizontal vs. Vertical Scaling • Vertical scaling requires one large expensive machine • Horizontal scaling requires multiple less-expensive commodity hardware © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

23. Scales Linearly © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

24. Scales Linearly © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

25. Scales Linearly © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

26. Cassandra’s Token Ring and Data Replication © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

27. How the Ring Works 59 (data) ? © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

28. How the Ring Works 59 (data) ? © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics

29. Replication within the Ring 0 88 59 13 (data) 75 RF=1 RF=2 RF=3 25 63 38 50 © 2019 DataStax. Use only with permission. • Cassandra Day • Cassandra Basics