What we want to achieve here is to have 2x active pool members, each containing different data sets but part of a single VS.
Requests will be sent to both servers. (looking for a username for example) and only one of the servers will contain the data.
The requests will be sent to both servers.
The server without the data will give an error (4XX HTTP status code)
The server with the data will give a success (2XX HTTP status)
The F5 should then take the data from the successful server and send it to the client.
Is this possible?
That's a fascinating (and unexpected) use case. I'm pretty sure it's probably doable, but it would need some serious iRule skills. I would recommend you talk to our professional services group if you don't get something from the community here. They can likely help you out.
You should investigate the SIDEBAND irule commands.
The way I would do it is to extract a relevant key from the request, have a light "query" request that you sideband with the key to both the pool members to identify the pool member that holds the response, then pass the heavyweight actual request to the identified pool member to get the complete response.
An easier solution is HTTP::retry
There is an example on that page that should do what you want without too much modification.
If you are making a POST request you need an HTTP::collect to get the payload for resubmisssion.