Problem
When we want to stress test the server, if there is a normal request load coming from NewDot, then we are not able to accomplish the stress test.
Solution
There is a feature in Web-Expensify where when we need to do stress testing on the server, we begin duplicating API requests from the client, according to a specific load multiplier. PHP sets a X-Load-Test header on all API requests, and the frontend then uses that the duplicate requests (adding a mockRequest: true parameter).
I need to do the same basic thing in App. It would be something like this:
- Add a middleware to the network layer (there are already many middlewares) that looks for the X-Load-Test header on every request
- Sets the multiplier somewhere (doesn't need to be in Onyx, can just be in memory)
- Have some code (maybe another middleware) that duplicates the requests based on the multiplier and adding mockRequest: true
cc @flodnv
Issue Owner
Current Issue Owner: @mallenexpensify
Problem
When we want to stress test the server, if there is a normal request load coming from NewDot, then we are not able to accomplish the stress test.
Solution
There is a feature in Web-Expensify where when we need to do stress testing on the server, we begin duplicating API requests from the client, according to a specific load multiplier. PHP sets a
X-Load-Testheader on all API requests, and the frontend then uses that the duplicate requests (adding amockRequest: trueparameter).I need to do the same basic thing in App. It would be something like this:
cc @flodnv
Issue Owner
Current Issue Owner: @mallenexpensify