I am sharding my data into multiple mysql databases, but sometimes I will need to gather information from multiple shards. How can I query multiple mysql databases in parallel in php?
I’ve seen some examples of asynchronous curl requests and shell_exec, but is there a more direct way?
The new mysqlnd driver can perform asynchronous queries. Documentation is sparse, but there are some examples (also relating to sharding) in a presentation here.