A scaling question in electron for a sniffer service


I am building a sniffer service that receives a url and loads it in headless electron (using xvfb). My question is how can I scale it to handle maximum numbers of url request possible on a single server.

Service spawns as many electron instances as the number of cpu cores.
Each electron instance manages a pool of opened browserwindow. It aquires a free browserwindow from the pool and loads url in it for sniffing. After sniffing it releases back the browserwindow to pool.

My api at a given server will be able to handle this many requests at a time: #cpus X # browserWindowsOpenedAtATime

Question: Should I use webview instead of browserwindow for each url request. I will disable node access on it for security. Does webview consume less memory than browserwindow?

Should I setup it so that pool has webviews as worker?

X browserWindow with Y webviews each. Pool will have XY webviews as workers.

I am planning to test all the scenarios. I just saw electron recently, so wanted advice from people who have had some experience with it.