Denial of Service (DoS) attacks aim to make a service unavailable by consuming its resources. A DoS attack could be accidental or intentional. Distributed DoS (DDoS) attacks use many compromised machines coordinated by a botnet to launch attacks. While perfect prevention is difficult, steps like resource quotas, abuse analysis, and network filtering can help mitigate DoS and DDoS attacks by limiting resource consumption and blocking malicious traffic streams.