Are going to come back let's talk about dining with be retried capacity and it's which is the throughput
parameters for your table and the associated pricing.
So what's the read capacity units.
So when you configure the table with the table you will be asked.
You have to enter the primary key you have to enter the read capacity units and the right capacity units.
There are three things.
And of course the name if you want to add any one read capacity and it represents what does a heat capacity
and to present one strongly consistent 3 per second or two if eventually consistent reads per second
for an item up to four key kilobyte in size.
So if you have one item that is up to.
So one two three or four kilobyte insights.
Then one read per second for this item is what we call eat or eat capacity unit if you need to read
an item that is larger than 4 kilobyte.
Then what do we need one great capacity unit can give you up to one read per second for an item for
kilobytes.
Now if I need to do 8.
So that means you need to reach capacity.
If I need to do 12 three read capacity and so on and so forth.
So are going to be will need to consume additional capacity units.
The total number of free capacity units required depends on the item size and whether you want eventually
consistent or strongly consistent with.
So here when we said that one capacity and it represents one read for an item that is for kilobyte in
size.
So that is a strong consistency.
If we're talking about revenger consistency then you have to read per second.
So you can have two items of full color bite or one item up to 8 kilobyte that can be read by one recovery
unit.
So to simplify this even further let's say your target is to get to 1000 kilobyte per second rate.
Now the question becomes what do you want do you want to do eventually consistency or strong consistency.
Why is it different because one need capacity that is enough to read for kilobyte per second of the
range of consistency or wondred capacity it is enough to do it kilobyte per second.
So if you want to get to 1000 kilobyte per second of fried performance and you are talking about strong
consistency then you need how many capacity capacity you need.
I need 1000.
Divide by 4 which is that kilobytes per unit.
And this is four kilobytes this is per second for one and this is per second for the desiré two I need
250 read capacity units.
If I wanted to do eventually consistency it would be half of that because we are talking about 4 and
8.
So it will be hundred and twenty five for the capacity unit.
Very easy to think about it from that perspective.
Now what if my item size is two and a half kilobytes its not for do I divide by two and a half here.
No because the definition of that it is an item up to 4 kilobytes in size.
What if my item is 5 kilobyte in size that means each item will require to read capacity and so basically
we are not doing fractions here.
It's either up to four if the item sells up to four one week capacity or if the item size is less than
eight.
So multiples of four then you need to reach capacity and if the item size is up to 12 then you need
three capacity units per item.
So that's how it works and that's how the math works.
Hopefully it's easier now to understand what's the right capacity it.
On the other hand one road capacity and it represents one right per second for an item up to 1 kilobyte
in size.
Why did we not talk about eventually and strong because this is a right action and right action has
nothing to do with eventual consistency and strong consistency that only for Read actions if you need
to write an item larger than one kilobyte then will you be will need to consume additional capacity
units.
So now if I have if I want to write an item that is for kilobyte size then what do I need then I need
for.
Exactly four right capacity units.
So as you can see here for capacity units to write an item of one of four kilobyte where as one read
capacity on it we're talking about strong consistency can read can I use it can I use it I can use it
to read for kilobyte if it is strong consistency and one read capacity on it was enough to read eight
kilobytes if it was eventual consistency.
So what does that tell me that tells you that using dynamo be for read intensive applications for gaming
and apps and all that is going to be less costly compared to exactly the right operations.
So if you have less rights and a lot of Freed's they're going to be is going to be a cost effective
solution.
If you have more rights than Greed's then that is going to be exactly that going to be more expensive.
When we talk about it because there isn't right capacity on it are more or less the same cost.
I'm talking about the unit.
And with the heat capacity units that the total number of freight capacity units it depends on the item
size that you would like to write pricing.
As a rule of thumb reeds are cheaper than rights when using the animal.
As we just.
So with the one kilobyte and four kilobytes What do you pay for when using that MTV you pay for that
provision throughput the read and write throughput for the table in hourly rates.
So this is how much it costs per hour for the throughput that you have.
You are charged for the provision throughput regardless whether used or not if you created a table and
then you specified and it Fyffe read capacity on it and 5 right capacity on it or 25 and 25 then you're
going to be charged for that.
And usually you have a three tier.
I believe the first 25 read and write the best units are free indexed data storage.
So if you have any data in its history that you have saved and you're indexing through here then that
is also going to be chargeable Internet data transfer.
If you are querying the database from outside the region but if it is within the region you don't do
that.
You don't pick and there is a free account across all tables 25 free capacity units and 25 right capacity
units per month.
So you have these free but what if you have defined three tables and the three tables are getting 203
capacity units and 150 drive capacity on units for instance then 25 will be free.
And you would pay for that.
All right.
So let's take a break and talk in the next lecture about a very important feature of denim would be
which is scalability.
I'll see you then.