The current Internet servers are susceptible to network attacks. The DDoS attacks consume the network bandwidth and degrade the services provided by the servers. This paper proposed a mechanism to provide security and quality of service (QoS) for a server pool with the support at the edge router. It focuses on the protection of the services based on the priority of different traffic flows and the anomaly degrees of the traffic. Anomaly traffic will be detected using a lightweight anomaly detection method. The result of anomaly detection is sent to the queue management component for resource allocation. Traffic flows are treated with different priorities. The multimedia flows are guaranteed the bandwidthallocation; while the bandwidth allocated for anomaly traffic flows are restricted according to the degrees of the anomaly. Simulation results demonstrate the improvement of service provision for the legitimate traffic flows under a DDoS attack.