From: Alex Rousskov Date: Wed, 7 Jul 2010 00:45:34 +0000 (-0600) Subject: SMP support, part 1: Essential non-caching functionality. X-Git-Tag: SQUID_3_2_0_1~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abf4be2be005b247ae6cf7ffd4a173ee60ff6867;p=thirdparty%2Fsquid.git SMP support, part 1: Essential non-caching functionality. Added workers squid.conf option to specify how many main Squid processes to fork and maintain. Zero means old no-daemon mode. One means the old non-SMP mode. Added support for process_name and process_number macros and if-statement conditionals in squid.conf. Search for .pre changes for documented details. These features allow the admin to configure each worker process differently if needed. Support multiple workers listening on the same HTTP[S] port (port sharing). This allows multiple workers to split the load without any special rules. Support or prohibit port sharing for WCCP, DNS, ICP, HTCP, SNMP, and Ident protocols, depending on protocol-specific restrictions. Sharing is implemented by registering listening socket descriptors with the Coordinator process and obtaining them from the Coordinator as needed. Here are protocol-specific notes: WCCP: Restricted to the Coordinator process due to how WCCP works. Workers do not need access to the WCCP code. DNS: Done by each worker with no sharing. Fixed source ports not supported unless each worker is given its own outgoing address because we do not want to match outgoing queries and incoming responses across processes. SNMP: Workers share incoming and outgoing sockets. ICP and HTCP _clients_: Cannot be supported in SMP environment unless each process has its own address (i.e., unique IP address and/or unique [ICP] port) because we do not want to match outgoing queries and incoming responses across processes. ICP and HTCP _servers_: share listening sockets. Ident clients do not need to share sockets because they use unique ports. Support management signals (squid -k ...) in SMP mode, acting as a single Squid instance. Refork dying workers, similar to how we reforked dying process in non-SMP daemon mode. Merged from lp smp branch r10306. --- abf4be2be005b247ae6cf7ffd4a173ee60ff6867