The Bombardier Beetle has a special chamber like a munitions factory, where it combines two chemicals together to form an explosive blast on demand. The two chemicals are Hydroquinone and Hydrogen Peroxide.
The defence mechanism not only requires sophisticated chemistry but also a valve system such that an inlet valve cuts off more fuel while an exhaust valve opens out and shoots boiling caustic liquid at the attacker.
The beetle invariably wins when attacked by a bird, frog, and ant or a spider. It has even been observed that a wolf spider can lose a leg in such encounter.
The Bombardier Beetle system is similar to the V1 of World War II in the repeated explosions that it used in that case for propulsion.