Skip to content

[Due for payment 2026-05-22] Duplicate network requests for stress testing based on the X-Load-Test header #88480

Description

@tgolen

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 OwnerCurrent Issue Owner: @mallenexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2EngineeringImprovementItem broken or needs improvement.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions