Unless you're sure that your browsers open new HTTP connections for each tab, you're not really testing what you think you're testing. Instead, try this from a command line:
curl http://yaws_host:yaws_port/path/to/your/yaws/page.yaws
curl http://yaws_host:yaws_port/path/to/your/yaws/page.yaws
Yes, run it twice, as that is guaranteed to use two separate connections. You will then see that Yaws uses two distinct Erlang processes and TCP connections to handle the two requests:
Process Identifier: <0.59.0> Port: #Port<0.1181> Client: {{127,0,0,1},64977} YAWS pid: <0.59.0>
Process Identifier: <0.64.0> Port: #Port<0.3268> Client: {{127,0,0,1},64978} YAWS pid: <0.64.0>
As for where the Yaws code for dealing with connections resides, you can look in yaws_server.erl, in particular at the acceptor/1
function which launches processes to accept connections and the do_listen/2
function which opens sockets for listening.