This work aims at optimizing how Squid uses helpers such as redirectors, authenticators, external acls etc to allow a single helper to process multiple requests and to lessen the context switching overhead by allowing requests to be batched together.
Initially there is no helper protocol changes except that requests and responses are prefixed by a integer indicating which request slot/channel the request belongs to. Each helper process has 1-N such slots/channels (N set by configuration).
1 <space> <request 1> \n 2 <space> <request 2> \nresults in
1 <space> <response 1> \n 2 <space> <response 2> \n
Note: Responses may be received in another order than the requests was sent.
If configuration is set to 0 slots (the default) then the old one request at a time protocol is used.
In future stateful helpers may be extended with terminal messages. A suggestion for such protocol is that the space after the slot number is replaced by a - on terminal messages, or that non-terminal messages use a + sign.
1 <minus> <space> <data...> \n 1 <minus> <data...> \n +1 <space> <data...> \n
To be written..
The internal API needs to be both refactored and redesigned to support this for stateful helpers in a clean manner. Design phase pending for such API.