A method and system for performing tasks when processing a client service request. The service request is processed by a group of processing elements including a main processing element and at least one offloading processing element. A subset of tasks is assigned to at least one of the offloading processing elements. When a service request is received from the client at the group of processing elements, each offloading processing element determines whether processing of the service request requires performing a task contained in the subset of tasks assigned to the respective offloading processing element. If processing of the service request requires performing tasks comprised in the subset of tasks assigned to the respective offloading processing element, those tasks are performed and outputs of the tasks are transmitted back directly from the offloading processing element to the client.