In this video we'll learn about how Dynamo uses the primary key to split your tables into different partitions and how to use a smart partition key reduced the chances of you getting a hot partition which causes errors.
Пікірлер: 31
@JavierSanchez-co6gn Жыл бұрын
Mate, the best explanation on partitions, I finally got it thanks to you!
@nehakale9427Ай бұрын
This is an amazing on-point explanation!! Kudos!!
@CompleteCoding7 күн бұрын
Glad it was helpful!
@markgeraldcalacal37664 жыл бұрын
I am glad that I found your channel. Thanks for the AWS tutorials.
@CompleteCoding4 жыл бұрын
My pleasure Mark
@scottscott2322 жыл бұрын
Absolutely, absolutely fantastic. I thoroughly appreciate your deliberate pace which gave me time to soak up this this really complex topic. I've looked at so many videos, and none of them explained it to the point that I understand. Your video did. Many thanks. I appreciate it. Happy new year, 2022.
@CompleteCoding2 жыл бұрын
Super glad that I could help. Happy 2022
@jamimonn3 жыл бұрын
I learned something today which I don't know before. Very good explanation.
@CompleteCoding3 жыл бұрын
Glad it was helpful!
@FreelancerGoranCirkovic4 жыл бұрын
Thank you for this lesson!
@CompleteCoding4 жыл бұрын
My pleasure Goran
@xavierromerocarrion1369Ай бұрын
Top quality content. Thanks
@simranbanwait Жыл бұрын
Nicely explained.
@danielbaena46913 жыл бұрын
Great video, thank you!
@CompleteCoding3 жыл бұрын
Glad you liked it!
@davidnunez93634 жыл бұрын
Thanks for the explanation!
@CompleteCoding4 жыл бұрын
No problem!
@crazyjpr20092 жыл бұрын
amazing information in 9 min
@CompleteCoding Жыл бұрын
Glad it was helpful!
@karanyogi70913 жыл бұрын
Thank you.
@CompleteCoding3 жыл бұрын
You're welcome!
@rachellejanssen26554 жыл бұрын
I'm a bit confused about the partition key and sort key. If you'd have a back and forth chat with a chatbot, would that mean that every session would be a key-value pair with something like an id (string), timestamp (time), and messages(array of objects) property? I would have ID as partition key but no sort key in that case, correct? At least I can't imagine something to sort.
@CompleteCoding4 жыл бұрын
I'm planning to do a very in detail video into partition keys and sort keys in the next week or two. It's a massive topic so might need to be split into a few videos. For your messaging scenario there are a few ways to do it. One clean way might be to have the partition key as a session ID and then a sort key of {customer/agent/bot}#{timestamp} with just a message field with each message. You could then do a few things. You could query things like Get every message with sessionID of 15382 => all messages for the conversation Get every message with sessionID of 15382 and where sort key starts with "customer" => all customer messages Get every message with sessionID of 15382 and where sort key starts with "customer#2020.07.16" => all customer messages on 16th of July Get every message with sessionID of 15382 and where sort key is greater than "customer#2020.07.16" => all customer messages since the start of 16th of July. As you can see you can do some pretty cool things but also it can be pretty complex.
@rachellejanssen26554 жыл бұрын
@@CompleteCoding oh sorting by date, that's a good one! thank :)
@soumyajitdutta4283 жыл бұрын
Hello I had a question. Does it mean suppose I have a orders table. Order Batch Id is a partition key and Date is the sort key. so suppose i have 50 batch id , does it mean i will have 50 partitions in dynamodb?. And I am talking in streams retrospect. as I know from streams , number of shards = no of partitions. So does 50 partition key means 50 shards at the end of day?
@CompleteCoding3 жыл бұрын
Yes, you would have 50 partitions. A Partition in Dynamo is just groups of data that has the same partition key. Each group can then be stored on a different SSD. When you run a query, you pass a partition key to query. This means you only need to access a single partition, so it only has to look on a single SSD so is fast. The only reason to care about choosing an appropriate partition key is so that there aren't any partitions that are massive (multi TB of data) so need to be split across multiple SSDs. There are no shards in Dynamo.
@randknutson52392 жыл бұрын
Great help. could you share your references?
@CompleteCoding2 жыл бұрын
Spread throughout the aws docs and "The Dynamo Book", but here's a good starting point docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.Partitions.html
@shayangolafshani5902 жыл бұрын
Video starts at 1:50, summary of video topics at 8:00.
@ddeeps90412 жыл бұрын
1.25x and thank me later
@CompleteCoding Жыл бұрын
I do this too for a lot of tutorials and courses. I do get a lot of people saying that my speed makes it easier to understand as their english isn't that good.