Reading a Proxy's Connection Count
Use socket, request and destination counts for their own purposes instead of treating each connection as a browser tab.
Thirty established connections does not mean thirty websites or browser tabs.
A page can use several origins and connections. Idle connections can remain available for reuse. HTTP/2 can carry concurrent exchanges on one connection; inside CONNECT, a non-intercepting proxy sees the tunnel rather than an exact count of those inner requests.
| What needs limiting? | Measure |
|---|---|
| Open-file pressure | Connections and descriptors |
| Transfer speed | Bytes over time |
| Destination access | Visible, authorized targets |
| Browser tabs | Browser-level state |
Client-side and server-side sockets are different counts too. Cache hits, connection reuse and parent proxies change their relationship.
Squid's maxconn ACL can help with a supported simultaneous-connection policy. It does not count websites, and source-based accounting may group several people behind one NAT.
A connection limit is still useful when its goal is protecting connection capacity. Label reports “concurrent client connections” and choose the limit around that resource, rather than selling it as an exact browsing allowance.