CS6650 Building Scalable Distributed Systems
This assignment builds on assignment 2. The main aim is to persist the tuples generated by the your client.
It’s likely that the AWS restrictions on the number of instances you can start will mean you can’t use the load balancer. Feel free to increase capacity of servers - just report what you used for gathering results and watch your $$s!
In assignment 2, your consumer created an in-memory hash map to skier and lift ride information.
Your first task is to modify the consumer to persist the results to a database.
You should choose Redis (https://redis.io/) as your persisent store.
Redis is a simple Key-Value store with native hash map support
The data model you design in the database should enable queries like:
The challenge is to write to the database ideally as fast as you can consume messages from RabbitMQ. This may be challenging based on the EC2 resources you choose, so experiments required. You can tune Redis by looking at the parameters used to periodically store data to disk.
Test this configuration by reporting the same results as assignment 2 for 128, 256 clients. Feel free to empty the database between tests. It might help ;)
Next, add a new RMQ consumer and database instance for storing data pertinent to the ski resort. Choose any database you like for this service. Redis is fine.
The consumer should ingest the same data as the Skier Microservice. The data model should be designed to answer questions like:
Again, test to see if you can write to the database as quickly as the data is published to RMQ.
Test this configuration (without the skier microservice) by reporting the same results as assignment 2 for 128, 256 clients
First, run tests for 128 and 256 with both microservices and see what happens.
It’s likely you will see significant backlogs in your queues, servlet and maybe even consumers.
If you do, you have two choices:
You don’t have to do both. But your aim is to try and deliver more stable throughput and eliminate client errors that may occur when no mitigation measures were used.
Submit your work to Canvas Assignment 3 as a pdf document. The document should contain:
You can install Redis on AWS Linux or utilize AWS Elasticache which is a managed Redis service. Unfortunately Elasticache is not offered as part of the AWS Learner Lab so that makes it tricky if you are using that service!
Install instructions on AWS Linux are here or if Medium access is painful here.
The tutorial for ElasticCache is here.