Instituto Superior Técnico
Master's Degree in Computer Science and Engineering
Thesis 2022/2023
This work introduces Rendezvous, a system that offers correctness guarantees and prevents consistency violations in microservice applications, including cross-service inconsistencies defined by Antipode authors. The work stands out for capturing all service remote calls and database operations while leaving datastores unmodified, contrary to solutions like FlightTracker.
The system is composed of a metadata server that stores the state of the request and services' actions, including writes to objects that are not immediately visible, especially in a cluster of multiple databases operating in multiple regions. It exposes an API for services to register new information at any point, which can be later queried to retrieve the set of dependencies and status that define the progress of the request or to enforce a consistent view over former actions.
Rendezvous was capable of correcting all inconsistencies with an average latency overhead of 7%. The evaluation was performed in two benchmarks (PostNotification and DeathStarBench) that presented an average of 83% of inconsistencies.
📄 Request Workflow Monitor for Microservice-based Web Applications (Instituto Superior Técnico, Masters Thesis)
The thesis also laid the foundation for a new iteration of Rendezvous tailored to cloud platforms (code available in the words23 branch), proposing a method for enhancing Function-as-a-Service (FaaS) platforms by transparently incorporating the framework into applications.
📄 Rendezvous: Where Serverless Functions Find Consistency (WORDS '23)
Metadata Server API
Register Request- register a new requestRegister Branch- register a new branchClose Branch- close a branchWait Request- wait until a request is completed for a given contextCheck Request- check request status for a given statusCheck Request by Regions- check request status per region for a given status
Client Shim API
write(k, v, m)- intermediates communication between a subsystem and a datastore and injects rendezvous metadata
Datastore Monitor Shim API
find(m)- lookup for injected metadata in a datastore and return an acknowledgment to datastore monitor
- C++ (version used: 11.4.0)
- Python (version used: 3.10.12)
- Docker (version used: 20.10.21)
- Docker Compose (version used: 1.29.2)
- gRPC
- Protobuf
- CMake
- GoogleTest
- nlohmann JSON
- spdlog
Install Python dependencies for official evaluation:
pip install -r server-eval/requirements.txt[OPTIONAL] If running deployment on host machine without Docker, then install C++ dependencies:
pip install -r datastore-monitor/requirements.txt
./deps.shGo to metadata-server/config and configure your params json file as well as the connections in the connections folder.
You can use metadata-server/config/connections/single.json to run a single server locally.
Make sure you have installed all the necessary local dependencies for Python and C++.
Build project:
docker build -t rendezvous .Run metadata server either with docker-compose or docker:
docker-compose run metadata-server-eu
docker run -it -p 8000:8000 rendezvous ./rendezvous.sh run server eu single.jsonEnsure you have a cleaned environment
./rendezvous.sh local cleanBuild and run project specifying the region and the connections filename (located in metadata-server/config/connections/) parameters
./rendezvous.sh local build
./rendezvous.sh local run server {eu, us} {docker.json, local.json, remote.json, single.json}Test metadata server with GoogleTests framework
./rendezvous.sh local run testsPrior to the following steps, make sure that your metadata server is running locally.
Generate Protobuf files in Python
./rendezvous.sh local build-py-protoRun a client in Python that you can interact with to send requests
./rendezvous.sh local run clientYou can also run a dummy datastore monitor in Python that you can interact with to test the connection and subscriptions
./rendezvous.sh local run monitorSetup EC2 Key Pairs
- Go to AWS EC2 Key Pairs in
eu-central-1and create a new key pairrendezvous-eu, add permissionssudo chmod 500 rendezvous-eu.pem, and copy to~/.ssh/rendezvous-eu.pem. - Do the same but now for
us-east-1and name the key pair asrendezvous-us.
Although Rendezvous was deployed in the host OS for the official evaluation, you can test Post-Notification microbenchmark using Docker.
Install aws cli if not yet done and configure your credentials with aws configure.
For each region (eu-central-1 and us-east-1), start two EC2 instances:
- AMI:
Ubuntu 22.04 LTS - Instance type: user preference (can be
t2.micro) - Keypair:
rendezvous-euin EU orrendezvous-usin US - Select the
antipode-mqVPC and the previously created Security Groupantipode-mq-rendezvous - Make sure to ENABLE assignment of public IP
Now that both instances are running, go to your local project folder:
- Edit the main
rendezvous.shscript parameters for public IPs and keypair paths - Edit the metadata server
metadata-server/config/remote.jsonconfig with the public IPs - Make sure that both servers' connections identified by
rendezvousindatastore-monitor/config/connections.yamlmatch the following:eu-central-1:rendezvous-eu:8001us-east-1:rendezvous-us:8002
Build and deploy metadata server:
./rendezvous.sh docker build
./rendezvous.sh docker deployDeploy any desired datastore monitor and stop at the end if you want to switch to another:
./rendezvous.sh docker start {dynamo, s3, cache, mysql}
./rendezvous.sh docker stop[REMINDER] At the end, don't forget to terminate both instances in eu-central-1 and us-east-1!
This section presents a quick guide on how to deploy Rendezvous for all three evaluations.
[WARNING] Make sure you already setup VPC and Datastores according to the README of the antipode-post-notification repository!
- Go to AWS EC2 Instances in
eu-central-1and launch a new instance with the following settings:- AMI:
Ubuntu 22.04 LTS - Instance type:
t2.medium(cheaper instances with fewer vCPUs will not be able to build the project with CMake) - Select the previously created keypair
rendezvous-eu - For now you can use the default VPC and Security Group settings
- AMI:
- In the local project folder, edit the
rendezvous.shscript with the public IP and keypair path of the new instance - Deploy the project with
./rendezvous.sh remote deploy. Note that this might take a long time. If you encounter any problems (especially running the dependencies script./deps.shor building the C++ project./rendezvous.sh local build, both remotely) you should do it mannually - In AWS EC2 Instances, select your instance and go to ACTIONS -> IMAGES AND TEMPLATES -> CREATE IMAGE to create a new
rendezvousAMI - When the AMI is ready, select it, go to ACTIONS -> COPY AMI, choose the US East (N. Virginia) (
us-east-1) and copy the AMI
Now you have two rendezvous AWS EC2 AMIs in eu-central-1 and us-east-1 =)
For both eu-central-1 and us-east-1 do the following:
- Create a new Security Group
rendezvousfor the Post-Notification VPCantipode-mq- Name:
antipode-mq-rendezvous
- Name:
- Add the following inbound rules
- SSH from any IPv4 source (0.0.0.0/0)
- Custom TCP from any IPv4 source (0.0.0.0/0). Port is
8001if in EU and8002if in US.
For each region (eu-central-1 and us-east-1), start two EC2 instances:
- AMI: previous created
rendezvousimage from 'My AMIs' - Instance type:
t2.xlarge(4 vCPU and 16 GiB RAM) - Keypair:
rendezvous-euin EU orrendezvous-usin US - Select the
antipode-mqVPC and the previously created Security Groupantipode-mq-rendezvous - Make sure to ENABLE assignment of public IP
Now that both instances are running, go to your local project folder:
- Edit the main
rendezvous.shscript parameters for public IPs and keypair paths - Edit the metadata server
metadata-server/config/connections/remote.jsonconfig with the public IPs - Make sure that both servers' connections identified by
rendezvousindatastore-monitor/config/connections.yamlmatch the following:eu-central-1:localhost:8001us-east-1:localhost:8002
Update the config file with the new ips to the remote instances:
./rendezvous.sh remote updateDeploy any desired datastore monitor and stop at the end if you want to switch to another:
./rendezvous.sh docker start {dynamo, s3, cache, mysql}
./rendezvous.sh docker stop[REMINDER] At the end, don't forget to terminate both instances!
For this benchmark, Rendezvous is deployed automatically using Docker along with the remaining microservices of DeathStarBench.
You just simply need to build Rendezvous and you are ready to go with the README instructions of the antipode-deathstarbench repository:
docker build -t rendezvous .In the antipode-deathstarbench repository, the plots and results are obtained by configuring antipode-deathstarbench/plots/configs/rendezvous.yml:
./plot plots/configs/rendezvous.yml --plots throughput_latency_with_consistency_window
./plot plots/configs/rendezvous.yml --plots storage_overhead
./plot plots/configs/rendezvous.yml --plots rendezvous_infoFor this evaluation, we deployed 1 metadata server and 1-5 clients in AWS using EC2 instances in eu-central-1 with the previously created AMI:
- Go to AWS EC2 and launch 1 instance for the
metadata serverand 5 instances for theclients(you can select the number of instances to launch instead of doing it manually). For each instance, use the following settings:- AMI: previous created
rendezvousimage from 'My AMIs' - Instance type:
t2.xlargefor themetadata serverandt2.largefor theclients - Keypair:
rendezvous-eu - Select the
antipode-mqVPC and the previously created Security Groupantipode-mq-rendezvous - Make sure to ENABLE assignment of public IP
- AMI: previous created
- Configure your instance connections in
server-eval/configs/settings.yaml - If desired, configure your deployment types in
server-eval/configs/master.yaml(by default, these correspond to the combinations used in the official evaluation):- If
words23is enabled, the metadata variations corresponds to number of datastores (ideally ranging 1, 5, 10, 15 and 20) - Otherwise, the metadata variations corresponds to number of regions (ideally ranging 1, 10 and 100) used in the thesis evaluation.
- If
You can now relax and run the evaluation from the server-eval folder
./master.pyPlot the graphs for the thesis evaluation
./plot.py thesis