When I think about the most frustrating way to lose at StarCraft 2, one thing jumps to the front of my mind: A Protoss cannon rush. For me there is nothing worse than being in the middle of a nice game plan, when all of a sudden I see a cannon being warped in on the edge of my base. I send a unit to check it out, and they get killed by a cannon placed a little back from the first. I send as many units as I can to try and take out the cannons or probe, but its too late. The Protoss probe has just made another cannon near my minerals and I know the match is over.
This form of defeat was happening so often for me I almost lost my mind. Thankfully, after losing to the cannon rush almost every possible way, I finally found a system of defense that made my base cannon proof. The basic idea is simple, it just takes more focus than regular early game building.
First of all, its good to know how much time you have before you have to worry about an enemy probe showing up in your base. An easy way to find this out is to sometime send a worker to your opponents base at the beginning of the map as fast as you can. Generally by the time you can afford you first building, the enemy can have a probe nearing your base. At this point, right before you build your first building, it is important to take a worker and scout around the parameter of your base briefly, then send your worker to the front of the base for initial construction. While your worker is building the first building, keep a close eye on the minimap for any unusual activity near your building site. If you see anything suspicious, do not hesitate to send a worker who is collecting minerals over scout around.
Until you have a decent amount of troops at the entrance to your base, or have the entrance to your base walled off, you are still at risk for a cannon rush. The best way to counter this is by building your next structures around the edges of your base, eliminating any dark areas. By bunching all your building in one place, a probe can still sneak just out of the line of sight and warp in a pylon, but if there is no where for the probe to hide, your chances of detecting the probe increase dramatically.
As a final note its very difficult to lose by cannons as Zerg as long as you send your overlords around to scout a bit. As Terran and Protoss though, By using early scouting, and building around the edges of your base, you will probably never lose to a cannon rush again.
I hope you enjoyed this Starcraft 2 information, have fun and keep playing!