Mischievous user clicking button repeatedly to trigger ajax : how do I prevent it?

Mischievous user clicking button repeatedly to trigger ajax : how do I prevent it?

I'm considering a case where a mischievous user repeatedly clicks (3-4 times per second) an ON / OFF button that triggers AJAX ajax on my web application. I tested this on my local machine and didn't see any problem. 

My specific application makes entry to the database upon every toggle of the ON / OFF switch. I'm wondering what kind of protection should I have for my switch? 

What kind of issues can repeated ajax submission cause?