A method, a system, and a computer program product implements traffic shaping by processing as a synchronous request, tasks representing one or more units of work contained within the request. Before a request is sent through the network, the request is inspected in order to derive the amount of work that the request would generate in the network. A traffic manager queries the amount of work in that request compared to the amount of work that the network can support and generates a number of traffic envelopes. Based on the results of this query, “task pruning” may be implemented to break the request into smaller manageable task that fit into the traffic envelopes. Task pruning may also enable only a subset of the work to be performed. Thus, a measure of the amount of work, rather than the amount of data, within a request is considered when scheduling the request.