Some kinds of DOS prevention rely on firewall, router, etc.

What can be done in the application?

thanks