javascript - How to Handle Infinite hits to your public url -
i developing web application using webapi
, angularjs
. application public classified web site lot of urls public. question : if writes simple infinite loop , starts hitting server like:
<script type="text/javascript"> $(function () { while (true) { $.get("https://mypublicurl", function (data) { }); }; }); </script>
it make expensive server serve unnecessary requests no reason. best practices avoid such situation?
there services can use mitigate dos attacks, 1 of known , easy start cloudflare: https://www.cloudflare.com/ddos/
the basic tier free , affords protection, can try out , see if suits you.
there things can mitigate simple attacks such 1 in example, more complicated attacks (ddos etc) need handled outside.
Comments
Post a Comment