Launched a Simple Crate AMI EC2 Instance and opened up the ports for Crate on 4200 and 5000 for Flask.
When I run the EC2 instance with Crate AMI, the speeds are slower but still fast enough (~1-2 Second), but when I call the same with the Flask Endpoint which calls the Crate DB (on the same instance) by passing a query to it, it takes close to 10 seconds.
I tested the endpoint on a localhost and there was no change to the speed execution as such. Hence, I've ruled out the code being the problem.
My questions:
- Why are the queries being run through the Flask-Restful endpoint on EC2 so slow?
- Does it make a difference in speed performance to make an EC2 AMI from scratch and install CrateDB into it, than an out-of-the-box Crate AMI?