Mitigating DoS and DDoS: with Special Emphasis on Application Layer Attacks