1. A system, comprising: multiple flow analysis units, which are configured to analyze flows of communication packets; at least one classification unit, which is configured to accept one or more of the communication packets in a flow and to classify the flow so as to determine whether the flow is to be analyzed by the flow analysis units; and a front-end processor, which is configured to receive input packets from a communication network, to associate each input packet with a respective input flow, to forward at least one input flow to the classification unit for classification, and to forward one or more input flows, which were classified by the classification unit as requested for analysis, to the flow analysis units.