Active queue management policies and in particular Random Early Detection (RED) are being advocated by theInternet Engineering Task Force (IETF) as additional mechanisms in Internet routers to control congestion and keep network utilization high. RED's performance is highly dependent on the settings of its ve control parameters. However, no rm guidelines exist on con guring RED parameters and the current suggestions fail to provide the desired performance over a wide range of scenarios, specially in the presence of many ows. In this paper, we propose a mechanism to con gure RED parameters based on evaluating the expected instantaneous length of the queue. We show thatbysetting the RED parameters minth and maxth to lie on either side of this expected queue length, we can ensure that the queue is not underutilized and ows cut their rates before the onset of congestion. This setting also allows the operating point to perform satisfactorily over a wide range of ow counts thereby allowing for a higher degree of scalability. We also show that our proposed mechanism increases the queue goodput, reduces losses and timeouts and increases the fairness when compared to existing guidelines. Our proposals have been veri ed using extensive simulations.