I am at design phase for a load test setup using headless chrome controlled by Puppeteer. Whats the best approach to follow? I have thought of below two approaches.
Say I need to simulate 1000 users login.
Using await puppeteer.launch() api, create 1000 headless chrome instances. And then access the login page, type user / password, hit the log in button. This looks strait forward, but it may take lot of system resources and simulation of 1000 user logins may not be possible (will it be?)
Launch only one chrome instance. Create 1000 CDP sessions. However I am not sure if this approach will work, because of same cache (userDataDir) path. Is it possible to set different cache for each CDP session.
Or is there any better approach for load testing using Puppeteer?