title: Firebase cloud function dart kill all functions
body: <p>I am searching for preventing attacks like Ddos, I am not sure I came across a solution.</p>
  <p><strong>Case 1</strong></p>
  <p>in which from every request putting a increment value in firestore database. After certain value such as 100000 a cloud function will trigger which will destroy / deactivate all my cloud functions.</p>
  <p><strong>Case 2</strong></p>
  <p>Is there any easy way using if else in cloud functions.</p>
  <p>I am new to Firebase cloud functions
  I am writing cloud functions in dart</p>
  <p>Is there any way to write security rules for calling function</p>
  <p>Is there any way to limit invocations</p>
  <p>Can cdn or another service integration help in this situation. I dnt want surprise bill</p>