I need to run a Locust load test across multiple machines and debug a single user's HTTP requests. How do I configure master and worker nodes, including how workers get the test script? Also, what's the recommended way to debug a single user to see all HTTP communication?
Navigate to the 'Distributed load generation' section of the documentation. Identify the commands for starting a Locust master and worker nodes, and how workers obtain the locustfile. Navigate to the 'Running tests in a debugger' section. Identify the Locust function used for debugging a single user and its purpose for printing HTTP communication. Synthesize the collected information to answer the user's questions.
State the command to start the master: `locust --master`. State the command to start workers: `locust --worker --master-host=<master_ip>`. Explain that workers can fetch the locustfile from the master using the `--web-host` flag, which makes the master serve the file. Identify `locust.debug.run_single_user` as the function for debugging a single user. Explain that `locust.debug.run_single_user` implicitly registers an event handler to print HTTP communication/request statistics.