This lesson covers running and testing ScyllaDB Alternator. Topics include getting started, how to run it, testing and performance and how to run it on ScyllaDB Cloud.
Let’s look at a
few examples how to use it. So first of all. Alternator is just ScyllaDB, to run Alternator you run ScyllaDB
you don’t need to run another cluster or whatever and you just need to pass to ScyllaDB
you just need to pass the parameter Alternator-port when you run ScyllaDB and then it basically
listens on this port that you decided for the. DynamoDB API and if you wanted to
try to run it yourself today, you can run this docker command it takes ScyllaDB’s nightly
build and just runs it with Alternator port 8000 and now you have DynamoDB API
running on your docker on Port 8000, so you can do this yourself after this talk and
in 5-minutes have DynamoDB API running on your machine. So let’s test if it actually worked
so this is just, the idea of course is to have any unmodified DynamoDB client just to work
on top of ScyllaDB, so I just took the AWS command I give it the endpoint-url
give it the IP address of the docker and the port I chose then the DynamoDB
create-table and it just works, it creates the table and it just works and then we wanted to see
see that much more complicated example actually works, not just a simple create-table so one
of the things we tried, we took from Amazon, Amazon has an example application that demonstrates
demonstrates DynamoDB and actually demonstrates many of its features
all sorts of keys of different types, attributes, conditional
updates, secondary indexes, a lot of DynamoDB features.. This application is like a game server of tic-tac-toe
it’s not very sophisticated game but it’s just demonstrates a lot of the features of DynamoDB
and it allows enough players to connect to a server and play games together and it keeps track
of all the ongoing games, the users, the boards of the different games and as I said
it uses a lot of DynamoDB features and it actually works, here are some screenshots from a working game
another thing we wanted to try is much more intensive test, the tic-tac-toe game doesn’t have a lot of requests
per second so we did a test where we had a cluster of three fairly big nodes
on AWS, each in a separate availability zone of the same region.. We preloaded 1.1 terabyte of data which was 1
billion items of 1.1 kilobytes each and then started YCSB, YCSB is Yahoo! Cloud Services Benchmark
it’s a benchmark for all sorts of databases and so on, it also works on
Cassandra and ScyllaDB and DynamoDB, so we ran it using the DynamoDB API, told it to do 50% reads and 50% writes
in Zipfian distribution and this is an example of the monitoring, so you can
see here we did about 120000 requests
per second, so this is actually a pretty intensive workload because if you calculate
how much it would cost to do 120000 requests per second, half of them reads half of them
writes, it would actually cost DynamoDB $85 per hour if we calculate the price
just of the VMs when we run ScyllaDB than it’s much, much cheaper – $7.5 per hour
All these prices are provisioned prices, you have to decide if you want 120000 requests per second in three nodes, but you’re
not committing for full year, for example, if you do commit for full year then both of these
prices will even go down and everything I can show you on this monitoring is that we
have about 4 terabytes of data, because we have three copies of the data and of course
as we saw on many presentations we can get a lot of interesting information from these
monitoring, here you can see statistics per node, on the left, different lines for the
different nodes, so each of the three nodes did about 40000 requests per second and you can
have statistics per shard also and it get also generic ScyllaDB statistics that you are probably already used to like
the cache hits and you also get Alternator specific statistics like how many requests you got
for each type, so the DynamoDB get item request did 20000 per instance per second and the update
item did another 20000. So we saw how you can run Alternator yourself on a VM, on your laptop or
whatever. We also have, this is new from this week with we also have better availability
of this feature also on ScyllaDB Cloud, until now ScyllaDB Cloud was CQL compatible and now you
have also DynamoDB API compatibility and basically when you go to ScyllaDB Cloud
you want to create a ScyllaDB cluster, you can choose between versions so instead of ScyllaDB Enterprise
you can choose ScyllaDB Alternator and when it’s ready it tells you “ScyllaDB Alternator”
I think this is slightly older version, now it says BETA instead
of 0.01 or something, and now then you can see the
IP addresses of the different nodes that you started and you can also get an example of
how you run a command, like I showed earlier with AWS CLI for example, if you
want to know how to use this new cluster that you just created. Here is another view of this
cluster and ScyllaDB Cloud also let’s you see all sorts of monitoring information with it’s
own UIs, so here just some stuff I created a screenshot of.