We have an expressJS API utilising mongoDB Atlas which will be deployed live to AWS. We want to stress and load test this API before users begin using it.
The question is whether to perform the load tests locally, or whether to deploy to AWS within a testing environment and load test the deployed API.
Could anyone provide any advice on this subject?
If you're capable to kick off a local environment with the same specifications like the cloud - it should be no or little difference in the results.
But you need to ensure that the local is the exact replica including:
If not - you still can do some testing of the aspects which are not directly connected with Mongo, i.e. using profiler tools to find potentially problematic code parts, etc.
The only approach you shouldn't touch with a ten-feet pole is running load tests against a scaled-down environment